Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codegen/layouts/api-endpoint.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ None
{% hint style="success" %}
Returns:
{{#if response.batchResources}}batch response{{#each response.batchResources}}
- `{{this.batchKey}}`: Array of [{{this.escapedResourceType}}s]({{#if this.responsePath}}{{this.responsePath}}{{else}}./{{/if}}){{/each}}{{else}}**{{#if response.resourceType}}{{#if (eq response.responseType "resource_list")}}Array of [{{response.escapedResourceType}}s]({{#if response.responsePath}}{{response.responsePath}}{{else}}./{{/if}}){{else}}[{{response.escapedResourceType}}]({{#if response.responsePath}}{{response.responsePath}}{{else}}./{{/if}}){{/if}}{{else}}void{{/if}}**{{/if}}
- `{{this.batchKey}}`: Array of {{#if this.responsePath}}[{{this.escapedResourceType}}s]({{this.responsePath}}){{else}}{{this.escapedResourceType}}s{{/if}}{{/each}}{{else}}**{{#if response.resourceType}}{{#if (eq response.responseType "resource_list")}}Array of {{#if response.responsePath}}[{{response.escapedResourceType}}s]({{response.responsePath}}){{else}}{{response.escapedResourceType}}s{{/if}}{{else}}{{#if response.responsePath}}[{{response.escapedResourceType}}]({{response.responsePath}}){{else}}{{response.escapedResourceType}}{{/if}}{{/if}}{{else}}void{{/if}}**{{/if}}

{% endhint %}

Expand Down
4 changes: 2 additions & 2 deletions codegen/lib/layout/api-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export function setEndpointLayoutContext(
)

let responsePath = null
if (responseResource != null) {
if (responseResource != null && !responseResource.isUndocumented) {
responsePath = path
.relative(endpoint.path, responseResource.routePath)
.replace('..', '.') // gitbook expects first level to be .
Expand All @@ -196,7 +196,7 @@ export function setEndpointLayoutContext(
(r) => r.resourceType === batchResource.resourceType,
)
let batchResponsePath = null
if (batchResourceDef != null) {
if (batchResourceDef != null && !batchResourceDef.isUndocumented) {
batchResponsePath = path
.relative(endpoint.path, batchResourceDef.routePath)
.replace('..', '.')
Expand Down
Loading