Skip to content

Commit a22e38a

Browse files
committed
fix deprecation notice
1 parent 3dc71cd commit a22e38a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ export function createDeprecationNotice({
2323
return guard(deprecated, () =>
2424
createAdmonition({
2525
children:
26-
clean(description) ??
27-
"This endpoint has been deprecated and may be replaced or removed in future versions of the API.",
26+
description && description.length > 0
27+
? clean(description)
28+
: "This endpoint has been deprecated and may be replaced or removed in future versions of the API.",
2829
})
2930
);
3031
}

0 commit comments

Comments
 (0)