docusaurus-theme-openapi-docs 0.0.0-574 → 0.0.0-576
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/theme/ApiDemoPanel/Request/index.js +3 -2
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +5 -5
- package/lib-next/theme/ApiDemoPanel/Request/index.js +4 -2
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +15 -5
- package/package.json +3 -3
- package/src/theme/ApiDemoPanel/Request/index.tsx +4 -2
- package/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx +15 -5
|
@@ -31,7 +31,8 @@ function Request({
|
|
|
31
31
|
const postman = new _postmanCollection.default.Request(item.postman);
|
|
32
32
|
const metadata = (0, _internal.useDoc)();
|
|
33
33
|
const {
|
|
34
|
-
proxy
|
|
34
|
+
proxy,
|
|
35
|
+
hide_send_button
|
|
35
36
|
} = metadata.frontMatter;
|
|
36
37
|
const params = {
|
|
37
38
|
path: [],
|
|
@@ -49,7 +50,7 @@ function Request({
|
|
|
49
50
|
<summary>
|
|
50
51
|
<div className={`details__request-summary`}>
|
|
51
52
|
<h4>Request</h4>
|
|
52
|
-
{item.servers && <_Execute.default postman={postman} proxy={proxy} />}
|
|
53
|
+
{item.servers && !hide_send_button && <_Execute.default postman={postman} proxy={proxy} />}
|
|
53
54
|
</div>
|
|
54
55
|
</summary>
|
|
55
56
|
<div className={_stylesModule.default.optionsPanel}>
|
|
@@ -67,7 +67,7 @@ function SecuritySchemes(props) {
|
|
|
67
67
|
{Object.keys(rest).map((k, i) => {
|
|
68
68
|
return <span key={k}>
|
|
69
69
|
<strong>{k}: </strong>
|
|
70
|
-
{rest[k]}
|
|
70
|
+
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
71
71
|
</span>;
|
|
72
72
|
})}
|
|
73
73
|
</pre>
|
|
@@ -104,7 +104,7 @@ function SecuritySchemes(props) {
|
|
|
104
104
|
{Object.keys(rest).map((k, i) => {
|
|
105
105
|
return <span key={k}>
|
|
106
106
|
<strong>{k}: </strong>
|
|
107
|
-
{rest[k]}
|
|
107
|
+
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
108
108
|
</span>;
|
|
109
109
|
})}
|
|
110
110
|
</pre>
|
|
@@ -162,7 +162,7 @@ function SecuritySchemes(props) {
|
|
|
162
162
|
{Object.keys(rest).map((k, i) => {
|
|
163
163
|
return <span key={k}>
|
|
164
164
|
<strong>{k}: </strong>
|
|
165
|
-
{rest[k]}
|
|
165
|
+
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
166
166
|
</span>;
|
|
167
167
|
})}
|
|
168
168
|
</pre>
|
|
@@ -200,7 +200,7 @@ function SecuritySchemes(props) {
|
|
|
200
200
|
{Object.keys(rest).map((k, i) => {
|
|
201
201
|
return <span key={k}>
|
|
202
202
|
<strong>{k}: </strong>
|
|
203
|
-
{rest[k]}
|
|
203
|
+
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
204
204
|
</span>;
|
|
205
205
|
})}
|
|
206
206
|
{flows && <span>
|
|
@@ -243,7 +243,7 @@ function SecuritySchemes(props) {
|
|
|
243
243
|
{Object.keys(rest).map((k, i) => {
|
|
244
244
|
return <span key={k}>
|
|
245
245
|
<strong>{k}: </strong>
|
|
246
|
-
{rest[k]}
|
|
246
|
+
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
247
247
|
</span>;
|
|
248
248
|
})}
|
|
249
249
|
</pre>
|
|
@@ -20,7 +20,7 @@ function Request({ item }) {
|
|
|
20
20
|
const response = useTypedSelector((state) => state.response.value);
|
|
21
21
|
const postman = new sdk.Request(item.postman);
|
|
22
22
|
const metadata = useDoc();
|
|
23
|
-
const { proxy } = metadata.frontMatter;
|
|
23
|
+
const { proxy, hide_send_button } = metadata.frontMatter;
|
|
24
24
|
const params = {
|
|
25
25
|
path: [],
|
|
26
26
|
query: [],
|
|
@@ -38,7 +38,9 @@ function Request({ item }) {
|
|
|
38
38
|
<summary>
|
|
39
39
|
<div className={`details__request-summary`}>
|
|
40
40
|
<h4>Request</h4>
|
|
41
|
-
{item.servers &&
|
|
41
|
+
{item.servers && !hide_send_button && (
|
|
42
|
+
<Execute postman={postman} proxy={proxy} />
|
|
43
|
+
)}
|
|
42
44
|
</div>
|
|
43
45
|
</summary>
|
|
44
46
|
<div className={styles.optionsPanel}>
|
|
@@ -59,7 +59,9 @@ function SecuritySchemes(props) {
|
|
|
59
59
|
return (
|
|
60
60
|
<span key={k}>
|
|
61
61
|
<strong>{k}: </strong>
|
|
62
|
-
{rest[k]
|
|
62
|
+
{typeof rest[k] === "object"
|
|
63
|
+
? JSON.stringify(rest[k], null, 2)
|
|
64
|
+
: String(rest[k])}
|
|
63
65
|
</span>
|
|
64
66
|
);
|
|
65
67
|
})}
|
|
@@ -98,7 +100,9 @@ function SecuritySchemes(props) {
|
|
|
98
100
|
return (
|
|
99
101
|
<span key={k}>
|
|
100
102
|
<strong>{k}: </strong>
|
|
101
|
-
{rest[k]
|
|
103
|
+
{typeof rest[k] === "object"
|
|
104
|
+
? JSON.stringify(rest[k], null, 2)
|
|
105
|
+
: String(rest[k])}
|
|
102
106
|
</span>
|
|
103
107
|
);
|
|
104
108
|
})}
|
|
@@ -162,7 +166,9 @@ function SecuritySchemes(props) {
|
|
|
162
166
|
return (
|
|
163
167
|
<span key={k}>
|
|
164
168
|
<strong>{k}: </strong>
|
|
165
|
-
{rest[k]
|
|
169
|
+
{typeof rest[k] === "object"
|
|
170
|
+
? JSON.stringify(rest[k], null, 2)
|
|
171
|
+
: String(rest[k])}
|
|
166
172
|
</span>
|
|
167
173
|
);
|
|
168
174
|
})}
|
|
@@ -201,7 +207,9 @@ function SecuritySchemes(props) {
|
|
|
201
207
|
return (
|
|
202
208
|
<span key={k}>
|
|
203
209
|
<strong>{k}: </strong>
|
|
204
|
-
{rest[k]
|
|
210
|
+
{typeof rest[k] === "object"
|
|
211
|
+
? JSON.stringify(rest[k], null, 2)
|
|
212
|
+
: String(rest[k])}
|
|
205
213
|
</span>
|
|
206
214
|
);
|
|
207
215
|
})}
|
|
@@ -248,7 +256,9 @@ function SecuritySchemes(props) {
|
|
|
248
256
|
return (
|
|
249
257
|
<span key={k}>
|
|
250
258
|
<strong>{k}: </strong>
|
|
251
|
-
{rest[k]
|
|
259
|
+
{typeof rest[k] === "object"
|
|
260
|
+
? JSON.stringify(rest[k], null, 2)
|
|
261
|
+
: String(rest[k])}
|
|
252
262
|
</span>
|
|
253
263
|
);
|
|
254
264
|
})}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-576",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"buffer": "^6.0.3",
|
|
52
52
|
"clsx": "^1.1.1",
|
|
53
53
|
"crypto-js": "^4.1.1",
|
|
54
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
54
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-576",
|
|
55
55
|
"file-saver": "^2.0.5",
|
|
56
56
|
"immer": "^9.0.7",
|
|
57
57
|
"lodash": "^4.17.20",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=14"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "c493a8c7f0f3ee3a4e76cc296a1f6703ee5240ff"
|
|
78
78
|
}
|
|
@@ -25,7 +25,7 @@ function Request({ item }: { item: NonNullable<ApiItem> }) {
|
|
|
25
25
|
const response = useTypedSelector((state: any) => state.response.value);
|
|
26
26
|
const postman = new sdk.Request(item.postman);
|
|
27
27
|
const metadata = useDoc();
|
|
28
|
-
const { proxy } = metadata.frontMatter;
|
|
28
|
+
const { proxy, hide_send_button } = metadata.frontMatter;
|
|
29
29
|
|
|
30
30
|
const params = {
|
|
31
31
|
path: [] as ParameterObject[],
|
|
@@ -48,7 +48,9 @@ function Request({ item }: { item: NonNullable<ApiItem> }) {
|
|
|
48
48
|
<summary>
|
|
49
49
|
<div className={`details__request-summary`}>
|
|
50
50
|
<h4>Request</h4>
|
|
51
|
-
{item.servers &&
|
|
51
|
+
{item.servers && !hide_send_button && (
|
|
52
|
+
<Execute postman={postman} proxy={proxy} />
|
|
53
|
+
)}
|
|
52
54
|
</div>
|
|
53
55
|
</summary>
|
|
54
56
|
<div className={styles.optionsPanel}>
|
|
@@ -65,7 +65,9 @@ function SecuritySchemes(props: any) {
|
|
|
65
65
|
return (
|
|
66
66
|
<span key={k}>
|
|
67
67
|
<strong>{k}: </strong>
|
|
68
|
-
{rest[k]
|
|
68
|
+
{typeof rest[k] === "object"
|
|
69
|
+
? JSON.stringify(rest[k], null, 2)
|
|
70
|
+
: String(rest[k])}
|
|
69
71
|
</span>
|
|
70
72
|
);
|
|
71
73
|
})}
|
|
@@ -104,7 +106,9 @@ function SecuritySchemes(props: any) {
|
|
|
104
106
|
return (
|
|
105
107
|
<span key={k}>
|
|
106
108
|
<strong>{k}: </strong>
|
|
107
|
-
{rest[k]
|
|
109
|
+
{typeof rest[k] === "object"
|
|
110
|
+
? JSON.stringify(rest[k], null, 2)
|
|
111
|
+
: String(rest[k])}
|
|
108
112
|
</span>
|
|
109
113
|
);
|
|
110
114
|
})}
|
|
@@ -169,7 +173,9 @@ function SecuritySchemes(props: any) {
|
|
|
169
173
|
return (
|
|
170
174
|
<span key={k}>
|
|
171
175
|
<strong>{k}: </strong>
|
|
172
|
-
{rest[k]
|
|
176
|
+
{typeof rest[k] === "object"
|
|
177
|
+
? JSON.stringify(rest[k], null, 2)
|
|
178
|
+
: String(rest[k])}
|
|
173
179
|
</span>
|
|
174
180
|
);
|
|
175
181
|
})}
|
|
@@ -209,7 +215,9 @@ function SecuritySchemes(props: any) {
|
|
|
209
215
|
return (
|
|
210
216
|
<span key={k}>
|
|
211
217
|
<strong>{k}: </strong>
|
|
212
|
-
{rest[k]
|
|
218
|
+
{typeof rest[k] === "object"
|
|
219
|
+
? JSON.stringify(rest[k], null, 2)
|
|
220
|
+
: String(rest[k])}
|
|
213
221
|
</span>
|
|
214
222
|
);
|
|
215
223
|
})}
|
|
@@ -257,7 +265,9 @@ function SecuritySchemes(props: any) {
|
|
|
257
265
|
return (
|
|
258
266
|
<span key={k}>
|
|
259
267
|
<strong>{k}: </strong>
|
|
260
|
-
{rest[k]
|
|
268
|
+
{typeof rest[k] === "object"
|
|
269
|
+
? JSON.stringify(rest[k], null, 2)
|
|
270
|
+
: String(rest[k])}
|
|
261
271
|
</span>
|
|
262
272
|
);
|
|
263
273
|
})}
|