docusaurus-plugin-openapi-docs 0.0.0-567 → 0.0.0-569
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.
|
@@ -66,7 +66,9 @@ function createResponseHeaders(responseHeaders) {
|
|
|
66
66
|
style: { marginLeft: "1rem" },
|
|
67
67
|
children: [
|
|
68
68
|
Object.entries(responseHeaders).map(([headerName, headerObj]) => {
|
|
69
|
-
|
|
69
|
+
var _a, _b;
|
|
70
|
+
const { description, example } = headerObj;
|
|
71
|
+
const type = (_b = (_a = headerObj.schema) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : "any";
|
|
70
72
|
return (0, utils_1.create)("li", {
|
|
71
73
|
className: "schemaItem",
|
|
72
74
|
children: [
|
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-569",
|
|
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": "
|
|
71
|
+
"gitHead": "4b50df749f384af595fab65cf8fa687ad612d84e"
|
|
72
72
|
}
|
|
@@ -62,46 +62,45 @@ function createResponseHeaders(responseHeaders: any) {
|
|
|
62
62
|
create("ul", {
|
|
63
63
|
style: { marginLeft: "1rem" },
|
|
64
64
|
children: [
|
|
65
|
-
Object.entries(responseHeaders).map(
|
|
66
|
-
|
|
67
|
-
description,
|
|
68
|
-
|
|
69
|
-
example,
|
|
70
|
-
}: any = headerObj;
|
|
65
|
+
Object.entries(responseHeaders).map(
|
|
66
|
+
([headerName, headerObj]: [any, any]) => {
|
|
67
|
+
const { description, example }: any = headerObj;
|
|
68
|
+
const type = headerObj.schema?.type ?? "any";
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
70
|
+
return create("li", {
|
|
71
|
+
className: "schemaItem",
|
|
72
|
+
children: [
|
|
73
|
+
createDetailsSummary({
|
|
74
|
+
children: [
|
|
75
|
+
create("strong", { children: headerName }),
|
|
76
|
+
guard(type, () => [
|
|
77
|
+
create("span", {
|
|
78
|
+
style: { opacity: "0.6" },
|
|
79
|
+
children: ` ${type}`,
|
|
80
|
+
}),
|
|
81
|
+
]),
|
|
82
|
+
],
|
|
83
|
+
}),
|
|
84
|
+
create("div", {
|
|
85
|
+
children: [
|
|
86
|
+
guard(description, (description) =>
|
|
87
|
+
create("div", {
|
|
88
|
+
style: {
|
|
89
|
+
marginTop: ".5rem",
|
|
90
|
+
marginBottom: ".5rem",
|
|
91
|
+
},
|
|
92
|
+
children: [
|
|
93
|
+
guard(example, () => `Example: ${example}`),
|
|
94
|
+
createDescription(description),
|
|
95
|
+
],
|
|
96
|
+
})
|
|
97
|
+
),
|
|
98
|
+
],
|
|
99
|
+
}),
|
|
100
|
+
],
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
),
|
|
105
104
|
],
|
|
106
105
|
})
|
|
107
106
|
);
|