Skip to content

Commit 75e45d5

Browse files
authored
Add support for security vendor extensions (#457)
* Add support for vendor extensions * Add code security for testing * Revert back to petstore
1 parent 214e90e commit 75e45d5

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

demo/docusaurus.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ const config = {
233233
template: "api.mustache", // Customize API MDX with mustache template
234234
downloadUrl:
235235
"https://raw.githubusercontent.com/PaloAltoNetworks/docusaurus-openapi-docs/main/demo/examples/petstore.yaml",
236+
hideSendButton: true,
236237
},
237238
cos: {
238239
specPath: "examples/openapi-cos.json",

packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ function SecuritySchemes(props: any) {
6565
return (
6666
<span key={k}>
6767
<strong>{k}: </strong>
68-
{rest[k]}
68+
{typeof rest[k] === "object"
69+
? JSON.stringify(rest[k], null, 2)
70+
: String(rest[k])}
6971
</span>
7072
);
7173
})}
@@ -104,7 +106,9 @@ function SecuritySchemes(props: any) {
104106
return (
105107
<span key={k}>
106108
<strong>{k}: </strong>
107-
{rest[k]}
109+
{typeof rest[k] === "object"
110+
? JSON.stringify(rest[k], null, 2)
111+
: String(rest[k])}
108112
</span>
109113
);
110114
})}
@@ -169,7 +173,9 @@ function SecuritySchemes(props: any) {
169173
return (
170174
<span key={k}>
171175
<strong>{k}: </strong>
172-
{rest[k]}
176+
{typeof rest[k] === "object"
177+
? JSON.stringify(rest[k], null, 2)
178+
: String(rest[k])}
173179
</span>
174180
);
175181
})}
@@ -209,7 +215,9 @@ function SecuritySchemes(props: any) {
209215
return (
210216
<span key={k}>
211217
<strong>{k}: </strong>
212-
{rest[k]}
218+
{typeof rest[k] === "object"
219+
? JSON.stringify(rest[k], null, 2)
220+
: String(rest[k])}
213221
</span>
214222
);
215223
})}
@@ -257,7 +265,9 @@ function SecuritySchemes(props: any) {
257265
return (
258266
<span key={k}>
259267
<strong>{k}: </strong>
260-
{rest[k]}
268+
{typeof rest[k] === "object"
269+
? JSON.stringify(rest[k], null, 2)
270+
: String(rest[k])}
261271
</span>
262272
);
263273
})}

0 commit comments

Comments
 (0)