docusaurus-plugin-openapi-docs 0.0.0-822 → 0.0.0-824

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,11 +12,10 @@ function createAdmonition({ children }) {
12
12
  return `:::caution deprecated\n\n${(0, utils_1.render)(children)}\n\n:::`;
13
13
  }
14
14
  function createDeprecationNotice({ deprecated, description, }) {
15
- return (0, utils_1.guard)(deprecated, () => {
16
- var _a;
17
- return createAdmonition({
18
- children: (_a = (0, utils_1.clean)(description)) !== null && _a !== void 0 ? _a : "This endpoint has been deprecated and may be replaced or removed in future versions of the API.",
19
- });
20
- });
15
+ return (0, utils_1.guard)(deprecated, () => createAdmonition({
16
+ children: description && description.length > 0
17
+ ? (0, utils_1.clean)(description)
18
+ : "This endpoint has been deprecated and may be replaced or removed in future versions of the API.",
19
+ }));
21
20
  }
22
21
  exports.createDeprecationNotice = createDeprecationNotice;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-openapi-docs",
3
3
  "description": "OpenAPI plugin for Docusaurus.",
4
- "version": "0.0.0-822",
4
+ "version": "0.0.0-824",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=14"
64
64
  },
65
- "gitHead": "45cf7902efde96e5b560f34d68113cfccda9f174"
65
+ "gitHead": "34abb2de0893a52b7e236e054e8d391f01ff0bc1"
66
66
  }
@@ -23,8 +23,9 @@ export function createDeprecationNotice({
23
23
  return guard(deprecated, () =>
24
24
  createAdmonition({
25
25
  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.",
28
29
  })
29
30
  );
30
31
  }