docusaurus-plugin-openapi-docs 0.0.0-505 → 0.0.0-507

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.
package/lib/index.js CHANGED
@@ -125,7 +125,7 @@ description: "{{{frontMatter.description}}}"
125
125
  sidebar_label: Introduction
126
126
  {{/api}}
127
127
  {{#api}}
128
- sidebar_label: {{{title}}}
128
+ sidebar_label: "{{{title}}}"
129
129
  {{/api}}
130
130
  {{^api}}
131
131
  sidebar_position: 0
@@ -151,7 +151,7 @@ info_path: {{{infoPath}}}
151
151
  id: {{{id}}}
152
152
  title: "{{{title}}}"
153
153
  description: "{{{frontMatter.description}}}"
154
- sidebar_label: {{{title}}}
154
+ sidebar_label: "{{{title}}}"
155
155
  hide_title: true
156
156
  custom_edit_url: null
157
157
  ---
@@ -25,6 +25,9 @@ function mergeAllOf(allOf) {
25
25
  example: function () {
26
26
  return true;
27
27
  },
28
+ "x-examples": function () {
29
+ return true;
30
+ },
28
31
  ignoreAdditionalProperties: true,
29
32
  },
30
33
  });
@@ -26,6 +26,9 @@ function mergeAllOf(allOf) {
26
26
  example: function () {
27
27
  return true;
28
28
  },
29
+ "x-examples": function () {
30
+ return true;
31
+ },
29
32
  },
30
33
  ignoreAdditionalProperties: true,
31
34
  });
@@ -107,7 +107,9 @@ function createItems(openapiData, sidebarOptions) {
107
107
  type: "info",
108
108
  id: infoId,
109
109
  unversionedId: infoId,
110
- title: openapiData.info.title,
110
+ title: openapiData.info.title
111
+ ? openapiData.info.title.replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'")
112
+ : "",
111
113
  description: openapiData.info.description
112
114
  ? openapiData.info.description.replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'")
113
115
  : "",
@@ -190,7 +192,7 @@ function createItems(openapiData, sidebarOptions) {
190
192
  id: baseId,
191
193
  infoId: infoId !== null && infoId !== void 0 ? infoId : "",
192
194
  unversionedId: baseId,
193
- title: title,
195
+ title: title ? title.replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'") : "",
194
196
  description: operationObject.description
195
197
  ? operationObject.description.replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'")
196
198
  : "",
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-505",
4
+ "version": "0.0.0-507",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=14"
70
70
  },
71
- "gitHead": "6041214545c0e4336fb4b478fc3399f993a0ee54"
71
+ "gitHead": "e32c9361d2d78f90d487460aeb0de86358760bfe"
72
72
  }
package/src/index.ts CHANGED
@@ -164,7 +164,7 @@ description: "{{{frontMatter.description}}}"
164
164
  sidebar_label: Introduction
165
165
  {{/api}}
166
166
  {{#api}}
167
- sidebar_label: {{{title}}}
167
+ sidebar_label: "{{{title}}}"
168
168
  {{/api}}
169
169
  {{^api}}
170
170
  sidebar_position: 0
@@ -191,7 +191,7 @@ info_path: {{{infoPath}}}
191
191
  id: {{{id}}}
192
192
  title: "{{{title}}}"
193
193
  description: "{{{frontMatter.description}}}"
194
- sidebar_label: {{{title}}}
194
+ sidebar_label: "{{{title}}}"
195
195
  hide_title: true
196
196
  custom_edit_url: null
197
197
  ---
@@ -26,6 +26,9 @@ export function mergeAllOf(allOf: SchemaObject[]) {
26
26
  example: function () {
27
27
  return true;
28
28
  },
29
+ "x-examples": function () {
30
+ return true;
31
+ },
29
32
  ignoreAdditionalProperties: true,
30
33
  },
31
34
  });
@@ -31,6 +31,9 @@ export function mergeAllOf(allOf: SchemaObject[]) {
31
31
  example: function () {
32
32
  return true;
33
33
  },
34
+ "x-examples": function () {
35
+ return true;
36
+ },
34
37
  },
35
38
  ignoreAdditionalProperties: true,
36
39
  });
@@ -131,7 +131,9 @@ function createItems(
131
131
  type: "info",
132
132
  id: infoId,
133
133
  unversionedId: infoId,
134
- title: openapiData.info.title,
134
+ title: openapiData.info.title
135
+ ? openapiData.info.title.replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'")
136
+ : "",
135
137
  description: openapiData.info.description
136
138
  ? openapiData.info.description.replace(
137
139
  /((?:^|[^\\])(?:\\{2})*)"/g,
@@ -237,7 +239,7 @@ function createItems(
237
239
  id: baseId,
238
240
  infoId: infoId ?? "",
239
241
  unversionedId: baseId,
240
- title: title,
242
+ title: title ? title.replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'") : "",
241
243
  description: operationObject.description
242
244
  ? operationObject.description.replace(
243
245
  /((?:^|[^\\])(?:\\{2})*)"/g,