diff --git a/codegen/layouts/api-endpoint.hbs b/codegen/layouts/api-endpoint.hbs index 65f729768..6ab618519 100644 --- a/codegen/layouts/api-endpoint.hbs +++ b/codegen/layouts/api-endpoint.hbs @@ -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 %} diff --git a/codegen/lib/layout/api-endpoint.ts b/codegen/lib/layout/api-endpoint.ts index 186e34ec7..1b38780af 100644 --- a/codegen/lib/layout/api-endpoint.ts +++ b/codegen/lib/layout/api-endpoint.ts @@ -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 . @@ -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('..', '.')