diff --git a/.changeset/few-files-compete.md b/.changeset/few-files-compete.md new file mode 100644 index 0000000000..fcc83a91a0 --- /dev/null +++ b/.changeset/few-files-compete.md @@ -0,0 +1,5 @@ +--- +'gitbook': patch +--- + +OpenAPI operation title fallback in sections diff --git a/packages/gitbook/src/lib/document-sections.ts b/packages/gitbook/src/lib/document-sections.ts index de2fdaab2c..3f8dbb13a5 100644 --- a/packages/gitbook/src/lib/document-sections.ts +++ b/packages/gitbook/src/lib/document-sections.ts @@ -46,7 +46,7 @@ export async function getDocumentSections( sections.push({ id: block.meta.id, tag: operation.method.toUpperCase(), - title: operation.operation.summary ?? operation.path, + title: operation.operation.summary || operation.path, depth: 1, deprecated: operation.operation.deprecated, });