docusaurus-plugin-openapi-docs 0.0.0-982 → 0.0.0-983
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/openapi/openapi.js +1 -1
- package/package.json +2 -2
- package/src/openapi/openapi.ts +2 -1
package/lib/openapi/openapi.js
CHANGED
|
@@ -150,7 +150,7 @@ function createItems(openapiData, options, sidebarOptions) {
|
|
|
150
150
|
}
|
|
151
151
|
// Handle vendor JSON media types
|
|
152
152
|
const bodyContent = (_o = operationObject.requestBody) === null || _o === void 0 ? void 0 : _o.content;
|
|
153
|
-
if (bodyContent) {
|
|
153
|
+
if (bodyContent && Object.keys(bodyContent).length > 0) {
|
|
154
154
|
const firstBodyContentKey = Object.keys(bodyContent)[0];
|
|
155
155
|
if (firstBodyContentKey.endsWith("+json")) {
|
|
156
156
|
const firstBody = bodyContent[firstBodyContentKey];
|
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-
|
|
4
|
+
"version": "0.0.0-983",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=14"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "7bdead5f43febf7fecf0bf876548c1b3584620ab"
|
|
69
69
|
}
|
package/src/openapi/openapi.ts
CHANGED
|
@@ -191,7 +191,8 @@ function createItems(
|
|
|
191
191
|
|
|
192
192
|
// Handle vendor JSON media types
|
|
193
193
|
const bodyContent = operationObject.requestBody?.content;
|
|
194
|
-
|
|
194
|
+
|
|
195
|
+
if (bodyContent && Object.keys(bodyContent).length > 0) {
|
|
195
196
|
const firstBodyContentKey = Object.keys(bodyContent)[0];
|
|
196
197
|
if (firstBodyContentKey.endsWith("+json")) {
|
|
197
198
|
const firstBody = bodyContent[firstBodyContentKey];
|