docusaurus-theme-openapi-docs 0.0.0-beta.638 → 0.0.0-beta.640
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/SecuritySchemes/index.js +4 -3
- package/lib/theme/ApiDemoPanel/index.js +0 -6
- package/lib/theme/Markdown/Details/_Details.scss +25 -0
- package/package.json +3 -3
- package/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx +5 -3
- package/src/theme/ApiDemoPanel/index.tsx +0 -2
- package/src/theme/Markdown/Details/_Details.scss +25 -0
|
@@ -27,14 +27,15 @@ function SecuritySchemes(props) {
|
|
|
27
27
|
const selectedAuth = options[selected];
|
|
28
28
|
return react_1.default.createElement(
|
|
29
29
|
"details",
|
|
30
|
-
{ className: "openapi-
|
|
30
|
+
{ className: "openapi-security__details", open: false },
|
|
31
31
|
react_1.default.createElement(
|
|
32
32
|
"summary",
|
|
33
|
-
{ className: "openapi-
|
|
33
|
+
{ className: "openapi-security__summary-container" },
|
|
34
34
|
react_1.default.createElement(
|
|
35
35
|
"h4",
|
|
36
36
|
{ className: "openapi-demo__summary-header" },
|
|
37
|
-
"Authorization"
|
|
37
|
+
"Authorization: ",
|
|
38
|
+
selectedAuth[0].name ?? selectedAuth[0].type
|
|
38
39
|
)
|
|
39
40
|
),
|
|
40
41
|
selectedAuth.map((auth) => {
|
|
@@ -18,17 +18,11 @@ const postman_collection_1 = __importDefault(
|
|
|
18
18
|
const Curl_1 = __importDefault(require("@theme/ApiDemoPanel/Curl"));
|
|
19
19
|
const Request_1 = __importDefault(require("@theme/ApiDemoPanel/Request"));
|
|
20
20
|
const Response_1 = __importDefault(require("@theme/ApiDemoPanel/Response"));
|
|
21
|
-
const SecuritySchemes_1 = __importDefault(
|
|
22
|
-
require("@theme/ApiDemoPanel/SecuritySchemes")
|
|
23
|
-
);
|
|
24
21
|
function ApiDemoPanel({ item, infoPath }) {
|
|
25
22
|
const postman = new postman_collection_1.default.Request(item.postman);
|
|
26
23
|
return react_1.default.createElement(
|
|
27
24
|
"div",
|
|
28
25
|
null,
|
|
29
|
-
react_1.default.createElement(SecuritySchemes_1.default, {
|
|
30
|
-
infoPath: infoPath,
|
|
31
|
-
}),
|
|
32
26
|
react_1.default.createElement(Request_1.default, { item: item }),
|
|
33
27
|
react_1.default.createElement(Response_1.default, null),
|
|
34
28
|
react_1.default.createElement(Curl_1.default, {
|
|
@@ -38,3 +38,28 @@
|
|
|
38
38
|
details summary::-webkit-details-marker {
|
|
39
39
|
display: none;
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
.openapi-security__details {
|
|
43
|
+
margin-bottom: 1rem;
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
color: var(--ifm-font-color-base);
|
|
46
|
+
padding: unset;
|
|
47
|
+
border: thin solid var(--ifm-toc-border-color);
|
|
48
|
+
border-radius: var(--ifm-pre-border-radius);
|
|
49
|
+
box-shadow: unset !important;
|
|
50
|
+
--docusaurus-details-decoration-color: var(--ifm-font-color-base) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.openapi-security__details pre {
|
|
54
|
+
margin-bottom: unset;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.openapi-security__summary-container {
|
|
58
|
+
padding: 1rem;
|
|
59
|
+
list-style-type: none;
|
|
60
|
+
border-bottom: thin solid var(--ifm-toc-border-color);
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
}
|
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-beta.
|
|
4
|
+
"version": "0.0.0-beta.640",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"buffer": "^6.0.3",
|
|
49
49
|
"clsx": "^1.1.1",
|
|
50
50
|
"crypto-js": "^4.1.1",
|
|
51
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-beta.
|
|
51
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-beta.640",
|
|
52
52
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
53
53
|
"file-saver": "^2.0.5",
|
|
54
54
|
"immer": "^9.0.7",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=14"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "78bb9c3cb5278a19b341dda5fb3fdab5b1901ecc"
|
|
77
77
|
}
|
|
@@ -23,9 +23,11 @@ function SecuritySchemes(props: any) {
|
|
|
23
23
|
|
|
24
24
|
const selectedAuth = options[selected];
|
|
25
25
|
return (
|
|
26
|
-
<details className="openapi-
|
|
27
|
-
<summary className="openapi-
|
|
28
|
-
<h4 className="openapi-demo__summary-header">
|
|
26
|
+
<details className="openapi-security__details" open={false}>
|
|
27
|
+
<summary className="openapi-security__summary-container">
|
|
28
|
+
<h4 className="openapi-demo__summary-header">
|
|
29
|
+
Authorization: {selectedAuth[0].name ?? selectedAuth[0].type}
|
|
30
|
+
</h4>
|
|
29
31
|
</summary>
|
|
30
32
|
{selectedAuth.map((auth: any) => {
|
|
31
33
|
const isHttp = auth.type === "http";
|
|
@@ -11,7 +11,6 @@ import sdk from "@paloaltonetworks/postman-collection";
|
|
|
11
11
|
import Curl from "@theme/ApiDemoPanel/Curl";
|
|
12
12
|
import Request from "@theme/ApiDemoPanel/Request";
|
|
13
13
|
import Response from "@theme/ApiDemoPanel/Response";
|
|
14
|
-
import SecuritySchemes from "@theme/ApiDemoPanel/SecuritySchemes";
|
|
15
14
|
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
|
|
16
15
|
|
|
17
16
|
function ApiDemoPanel({
|
|
@@ -25,7 +24,6 @@ function ApiDemoPanel({
|
|
|
25
24
|
|
|
26
25
|
return (
|
|
27
26
|
<div>
|
|
28
|
-
<SecuritySchemes infoPath={infoPath} />
|
|
29
27
|
<Request item={item} />
|
|
30
28
|
<Response />
|
|
31
29
|
<Curl
|
|
@@ -38,3 +38,28 @@
|
|
|
38
38
|
details summary::-webkit-details-marker {
|
|
39
39
|
display: none;
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
.openapi-security__details {
|
|
43
|
+
margin-bottom: 1rem;
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
color: var(--ifm-font-color-base);
|
|
46
|
+
padding: unset;
|
|
47
|
+
border: thin solid var(--ifm-toc-border-color);
|
|
48
|
+
border-radius: var(--ifm-pre-border-radius);
|
|
49
|
+
box-shadow: unset !important;
|
|
50
|
+
--docusaurus-details-decoration-color: var(--ifm-font-color-base) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.openapi-security__details pre {
|
|
54
|
+
margin-bottom: unset;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.openapi-security__summary-container {
|
|
58
|
+
padding: 1rem;
|
|
59
|
+
list-style-type: none;
|
|
60
|
+
border-bottom: thin solid var(--ifm-toc-border-color);
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
}
|