diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts index 591fb0f52..ec754e50a 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts @@ -23,8 +23,9 @@ export function createDeprecationNotice({ return guard(deprecated, () => createAdmonition({ children: - clean(description) ?? - "This endpoint has been deprecated and may be replaced or removed in future versions of the API.", + description && description.length > 0 + ? clean(description) + : "This endpoint has been deprecated and may be replaced or removed in future versions of the API.", }) ); }