docusaurus-theme-openapi-docs 0.0.0-beta.655 → 0.0.0-beta.656
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/FormItem/index.js +2 -11
- package/lib/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +16 -0
- package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +17 -12
- package/lib/theme/ApiDemoPanel/Request/index.js +2 -12
- package/lib/theme/ApiItem/index.js +2 -2
- package/lib/theme/ApiTabs/_ApiTabs.scss +29 -22
- package/lib/theme/ApiTabs/index.js +4 -3
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +12 -13
- package/lib/theme/Markdown/Details/_Details.scss +39 -6
- package/lib/theme/MimeTabs/_MimeTabs.scss +13 -8
- package/lib/theme/ParamsItem/_ParamsItem.scss +10 -8
- package/lib/theme/ParamsItem/index.js +2 -4
- package/lib/theme/SchemaItem/_SchemaItem.scss +29 -11
- package/lib/theme/SchemaItem/index.js +9 -10
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +23 -16
- package/lib/theme/SchemaTabs/index.js +50 -54
- package/lib/theme/styles.scss +6 -1
- package/package.json +3 -3
- package/src/theme/ApiDemoPanel/FormItem/index.tsx +1 -8
- package/src/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +16 -0
- package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +12 -9
- package/src/theme/ApiDemoPanel/Request/index.tsx +3 -8
- package/src/theme/ApiItem/index.tsx +2 -2
- package/src/theme/ApiTabs/_ApiTabs.scss +29 -22
- package/src/theme/ApiTabs/index.js +4 -3
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +12 -13
- package/src/theme/Markdown/Details/_Details.scss +39 -6
- package/src/theme/MimeTabs/_MimeTabs.scss +13 -8
- package/src/theme/ParamsItem/_ParamsItem.scss +10 -8
- package/src/theme/ParamsItem/index.js +2 -4
- package/src/theme/SchemaItem/_SchemaItem.scss +29 -11
- package/src/theme/SchemaItem/index.js +9 -10
- package/src/theme/SchemaTabs/_SchemaTabs.scss +23 -16
- package/src/theme/SchemaTabs/index.js +50 -54
- package/src/theme/styles.scss +6 -1
|
@@ -33,17 +33,8 @@ function FormItem({ label, type, required, children, className }) {
|
|
|
33
33
|
required &&
|
|
34
34
|
react_1.default.createElement(
|
|
35
35
|
"span",
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
react_1.default.createElement(
|
|
39
|
-
"small",
|
|
40
|
-
null,
|
|
41
|
-
react_1.default.createElement(
|
|
42
|
-
"strong",
|
|
43
|
-
{ className: "required" },
|
|
44
|
-
" required"
|
|
45
|
-
)
|
|
46
|
-
)
|
|
36
|
+
{ className: "openapi-schema__required" },
|
|
37
|
+
"required"
|
|
47
38
|
),
|
|
48
39
|
react_1.default.createElement("div", null, children)
|
|
49
40
|
);
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
.openapi__method-endpoint {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
2
4
|
max-width: 100%;
|
|
3
5
|
width: fit-content;
|
|
4
6
|
padding: 0.65rem;
|
|
5
7
|
border: 1px solid var(--ifm-toc-border-color);
|
|
6
8
|
}
|
|
9
|
+
|
|
10
|
+
.openapi__method-endpoint-path {
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
margin-left: 0.5rem;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
font-weight: normal;
|
|
15
|
+
font-family: var(--ifm-font-family-monospace);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.openapi__divider {
|
|
19
|
+
width: 100%;
|
|
20
|
+
margin: 1.5rem 0;
|
|
21
|
+
border-bottom: 1px solid var(--ifm-toc-border-color);
|
|
22
|
+
}
|
|
@@ -58,20 +58,25 @@ function MethodEndpoint({ method, path }) {
|
|
|
58
58
|
});
|
|
59
59
|
};
|
|
60
60
|
return react_1.default.createElement(
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
react_1.default.Fragment,
|
|
62
|
+
null,
|
|
63
63
|
react_1.default.createElement(
|
|
64
|
-
"
|
|
65
|
-
{ className: "
|
|
66
|
-
|
|
64
|
+
"pre",
|
|
65
|
+
{ className: "openapi__method-endpoint" },
|
|
66
|
+
react_1.default.createElement(
|
|
67
|
+
"span",
|
|
68
|
+
{ className: "badge badge--" + colorForMethod(method) },
|
|
69
|
+
method.toUpperCase()
|
|
70
|
+
),
|
|
71
|
+
" ",
|
|
72
|
+
react_1.default.createElement(
|
|
73
|
+
"h2",
|
|
74
|
+
{ className: "openapi__method-endpoint-path" },
|
|
75
|
+
renderServerUrl(),
|
|
76
|
+
`${path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}`
|
|
77
|
+
)
|
|
67
78
|
),
|
|
68
|
-
" "
|
|
69
|
-
react_1.default.createElement(
|
|
70
|
-
"span",
|
|
71
|
-
null,
|
|
72
|
-
renderServerUrl(),
|
|
73
|
-
`${path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}`
|
|
74
|
-
)
|
|
79
|
+
react_1.default.createElement("div", { className: "openapi__divider" })
|
|
75
80
|
);
|
|
76
81
|
}
|
|
77
82
|
exports.default = MethodEndpoint;
|
|
@@ -306,21 +306,11 @@ function Request({ item }) {
|
|
|
306
306
|
},
|
|
307
307
|
},
|
|
308
308
|
"Body",
|
|
309
|
-
" ",
|
|
310
309
|
requestBodyRequired &&
|
|
311
310
|
react_1.default.createElement(
|
|
312
311
|
"span",
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
"small",
|
|
316
|
-
null,
|
|
317
|
-
react_1.default.createElement(
|
|
318
|
-
"strong",
|
|
319
|
-
{ className: "request-body required" },
|
|
320
|
-
" ",
|
|
321
|
-
"required"
|
|
322
|
-
)
|
|
323
|
-
)
|
|
312
|
+
{ className: "openapi-schema__required" },
|
|
313
|
+
"\u00A0required"
|
|
324
314
|
)
|
|
325
315
|
),
|
|
326
316
|
react_1.default.createElement(
|
|
@@ -128,12 +128,12 @@ function ApiItem(props) {
|
|
|
128
128
|
{ className: (0, clsx_1.default)("row", "theme-api-markdown") },
|
|
129
129
|
react_1.default.createElement(
|
|
130
130
|
"div",
|
|
131
|
-
{ className: "col col--7" },
|
|
131
|
+
{ className: "col col--7 openapi-left-panel__container" },
|
|
132
132
|
react_1.default.createElement(MDXComponent, null)
|
|
133
133
|
),
|
|
134
134
|
react_1.default.createElement(
|
|
135
135
|
"div",
|
|
136
|
-
{ className: "col col--5" },
|
|
136
|
+
{ className: "col col--5 openapi-right-panel__container" },
|
|
137
137
|
react_1.default.createElement(
|
|
138
138
|
BrowserOnly_1.default,
|
|
139
139
|
{
|
|
@@ -9,39 +9,44 @@
|
|
|
9
9
|
margin-bottom: var(--ifm-leading);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
.openapi-tabs__response-header {
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
.openapi-tabs__response-code-item {
|
|
13
|
-
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
height: 2.5rem;
|
|
17
|
+
border: 1px solid transparent;
|
|
17
18
|
margin-top: 0 !important;
|
|
18
19
|
margin-right: 0.5rem;
|
|
19
|
-
|
|
20
|
+
padding: 0.35rem 0.85rem;
|
|
20
21
|
border-radius: var(--ifm-global-radius);
|
|
21
|
-
|
|
22
|
-
font-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
font-weight: var(--ifm-font-weight-bold);
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
transition: 300ms;
|
|
25
|
+
color: var(--ifm-font-color-secondary);
|
|
26
|
+
|
|
27
|
+
&.success.active {
|
|
28
|
+
background-color: var(--ifm-color-success);
|
|
29
|
+
color: var(--ifm-color-white);
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
&.danger {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
32
|
+
&.danger.active {
|
|
33
|
+
background-color: var(--ifm-color-danger);
|
|
34
|
+
color: var(--ifm-color-white);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
&.info {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
37
|
+
&.info.active {
|
|
38
|
+
background-color: var(--ifm-color-info);
|
|
39
|
+
color: var(--ifm-color-white);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
&.active
|
|
42
|
+
&.active,
|
|
43
|
+
&:hover {
|
|
43
44
|
opacity: 1;
|
|
44
|
-
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:hover:not(.active) {
|
|
48
|
+
background-color: transparent;
|
|
49
|
+
border: 1px solid var(--ifm-toc-border-color);
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
|
|
@@ -59,7 +64,9 @@
|
|
|
59
64
|
|
|
60
65
|
/* Open API Response Code Tabs */
|
|
61
66
|
.openapi-tabs__response-header-section {
|
|
67
|
+
border-top: 1px solid var(--ifm-toc-border-color);
|
|
62
68
|
margin-top: 2rem;
|
|
69
|
+
padding-top: 2rem;
|
|
63
70
|
display: flex;
|
|
64
71
|
justify-content: space-between;
|
|
65
72
|
align-items: center;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useTabs,
|
|
13
13
|
} from "@docusaurus/theme-common/internal";
|
|
14
14
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
15
|
+
import Heading from "@theme/Heading";
|
|
15
16
|
import clsx from "clsx";
|
|
16
17
|
|
|
17
18
|
function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
@@ -83,7 +84,9 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
|
83
84
|
|
|
84
85
|
return (
|
|
85
86
|
<div className="openapi-tabs__response-header-section">
|
|
86
|
-
<
|
|
87
|
+
<Heading as="h2" id="responses" className="openapi-tabs__response-header">
|
|
88
|
+
Responses
|
|
89
|
+
</Heading>
|
|
87
90
|
<div className="openapi-tabs__response-container">
|
|
88
91
|
{showTabArrows && (
|
|
89
92
|
<button
|
|
@@ -129,7 +132,6 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
|
129
132
|
}
|
|
130
133
|
)}
|
|
131
134
|
>
|
|
132
|
-
<div className="openapi-tabs__response-dot" />
|
|
133
135
|
{label ?? value}
|
|
134
136
|
</li>
|
|
135
137
|
))}
|
|
@@ -173,7 +175,6 @@ function TabsComponent(props) {
|
|
|
173
175
|
return (
|
|
174
176
|
<div className="openapi-tabs__container">
|
|
175
177
|
<TabList {...props} {...tabs} />
|
|
176
|
-
<hr />
|
|
177
178
|
<TabContent {...props} {...tabs} />
|
|
178
179
|
</div>
|
|
179
180
|
);
|
|
@@ -8,25 +8,24 @@
|
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: center;
|
|
11
|
-
|
|
11
|
+
padding: 0.35rem 0.7rem;
|
|
12
|
+
border: 1px solid transparent;
|
|
12
13
|
margin-top: 0 !important;
|
|
13
14
|
margin-right: 0.5rem;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
font-weight: var(--ifm-font-weight-bold);
|
|
16
|
+
font-size: 10px;
|
|
17
|
+
font-family: var(--ifm-font-family-monospace);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
transition: 300ms;
|
|
18
20
|
|
|
19
|
-
&:
|
|
20
|
-
|
|
21
|
+
&:hover {
|
|
22
|
+
background-color: transparent;
|
|
23
|
+
border: 1px solid var(--ifm-toc-border-color);
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
&.active {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
&:hover {
|
|
28
|
-
opacity: 1;
|
|
29
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
27
|
+
border: 1px solid var(--ifm-color-primary);
|
|
28
|
+
color: var(--ifm-color-primary);
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
&:last-child {
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
/* Markdown Details Styling */
|
|
2
2
|
|
|
3
|
+
/* Top-Level Details Styling */
|
|
4
|
+
.openapi-left-panel__container > .openapi-markdown__details > summary,
|
|
5
|
+
.openapi-markdown__details.mime > summary,
|
|
6
|
+
.openapi-markdown__details.response > summary {
|
|
7
|
+
text-transform: uppercase;
|
|
8
|
+
font-size: 12px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.openapi-left-panel__container > .openapi-markdown__details,
|
|
12
|
+
.openapi-markdown__details.mime,
|
|
13
|
+
.openapi-markdown__details.response {
|
|
14
|
+
margin-bottom: 1rem !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.openapi-markdown__details-summary-header-params,
|
|
18
|
+
.openapi-markdown__details-summary-header-body {
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
margin-bottom: 0;
|
|
21
|
+
}
|
|
22
|
+
/* End of Top-Level Details Styling */
|
|
23
|
+
|
|
24
|
+
/* Top-Level Details Caret Styling */
|
|
25
|
+
.openapi-left-panel__container > .openapi-markdown__details > summary::before,
|
|
26
|
+
.openapi-markdown__details.mime > summary::before,
|
|
27
|
+
.openapi-markdown__details.response > summary::before {
|
|
28
|
+
top: 0.1rem;
|
|
29
|
+
}
|
|
30
|
+
/* End of Top-Level Details Caret Styling */
|
|
31
|
+
|
|
3
32
|
.openapi-markdown__details {
|
|
4
33
|
margin: unset !important;
|
|
5
34
|
background-color: transparent;
|
|
@@ -37,11 +66,6 @@
|
|
|
37
66
|
transform: rotate(180deg) !important;
|
|
38
67
|
}
|
|
39
68
|
|
|
40
|
-
.theme-api-markdown .tabs__item {
|
|
41
|
-
padding-bottom: unset;
|
|
42
|
-
padding-top: unset;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
69
|
.openapi-markdown__details > div > div {
|
|
46
70
|
padding-top: unset !important;
|
|
47
71
|
border-top: unset !important;
|
|
@@ -51,12 +75,17 @@
|
|
|
51
75
|
margin-bottom: 0;
|
|
52
76
|
}
|
|
53
77
|
|
|
78
|
+
.openapi-markdown__details-summary-mime {
|
|
79
|
+
display: flex;
|
|
80
|
+
}
|
|
81
|
+
|
|
54
82
|
/* Hide defaul details marker by default */
|
|
55
83
|
details summary::-webkit-details-marker {
|
|
56
84
|
display: none;
|
|
57
85
|
}
|
|
58
86
|
|
|
59
87
|
.openapi-security__details {
|
|
88
|
+
font-size: 12px;
|
|
60
89
|
margin-bottom: 1rem;
|
|
61
90
|
background-color: transparent;
|
|
62
91
|
color: var(--ifm-font-color-base);
|
|
@@ -69,16 +98,20 @@ details summary::-webkit-details-marker {
|
|
|
69
98
|
|
|
70
99
|
.openapi-security__details pre {
|
|
71
100
|
margin-bottom: unset;
|
|
101
|
+
border-top-left-radius: 0;
|
|
102
|
+
border-top: thin solid var(--ifm-toc-border-color);
|
|
103
|
+
border-top-right-radius: 0;
|
|
72
104
|
}
|
|
73
105
|
|
|
74
106
|
.openapi-security__summary-header {
|
|
107
|
+
font-size: 12px;
|
|
108
|
+
text-transform: uppercase;
|
|
75
109
|
margin-bottom: unset;
|
|
76
110
|
}
|
|
77
111
|
|
|
78
112
|
.openapi-security__summary-container {
|
|
79
113
|
padding: 1rem;
|
|
80
114
|
list-style-type: none;
|
|
81
|
-
border-bottom: thin solid var(--ifm-toc-border-color);
|
|
82
115
|
|
|
83
116
|
&:hover {
|
|
84
117
|
cursor: pointer;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.openapi-tabs__mime-container {
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
|
-
|
|
11
|
+
margin-top: 1rem;
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -16,18 +16,23 @@
|
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
justify-content: center;
|
|
19
|
-
|
|
19
|
+
padding: 0.35rem 0.7rem;
|
|
20
|
+
border: 1px solid transparent;
|
|
20
21
|
margin-top: 0 !important;
|
|
21
22
|
margin-right: 0.5rem;
|
|
22
|
-
font-weight: var(--ifm-font-weight-
|
|
23
|
-
font-size:
|
|
23
|
+
font-weight: var(--ifm-font-weight-bold);
|
|
24
|
+
font-size: 10px;
|
|
25
|
+
text-transform: uppercase;
|
|
24
26
|
white-space: nowrap;
|
|
27
|
+
transition: 300ms;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
border: 1px solid var(--ifm-toc-border-color);
|
|
32
|
+
}
|
|
25
33
|
|
|
26
34
|
&.active {
|
|
27
|
-
|
|
28
|
-
border-bottom-color: var(--ifm-tabs-color-active-border);
|
|
29
|
-
border-bottom-left-radius: 0;
|
|
30
|
-
border-bottom-right-radius: 0;
|
|
35
|
+
border: 1px solid var(--ifm-tabs-color-active-border);
|
|
31
36
|
color: var(--ifm-tabs-color-active);
|
|
32
37
|
}
|
|
33
38
|
|
|
@@ -19,14 +19,12 @@
|
|
|
19
19
|
content: "";
|
|
20
20
|
display: inline-block;
|
|
21
21
|
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.openapi-params__list-item:hover {
|
|
25
|
-
background-color: var(--ifm-menu-color-background-active);
|
|
26
|
-
}
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
&:hover {
|
|
24
|
+
.openapi-schema__property {
|
|
25
|
+
color: var(--ifm-color-primary);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
.openapi-schema__type {
|
|
@@ -35,10 +33,14 @@
|
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
.openapi-schema__required {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
font-size: 10.5px;
|
|
39
|
+
font-weight: bold;
|
|
38
40
|
color: var(--openapi-required);
|
|
39
41
|
margin-left: 1%;
|
|
40
42
|
background-color: transparent;
|
|
41
|
-
|
|
43
|
+
text-transform: uppercase;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
.openapi-schema__divider {
|
|
@@ -37,9 +37,7 @@ function ParamsItem({
|
|
|
37
37
|
));
|
|
38
38
|
|
|
39
39
|
const renderSchemaRequired = guard(required, () => (
|
|
40
|
-
<span className="
|
|
41
|
-
required
|
|
42
|
-
</span>
|
|
40
|
+
<span className="openapi-schema__required">required</span>
|
|
43
41
|
));
|
|
44
42
|
|
|
45
43
|
const renderSchema = guard(getQualifierMessage(schema), (message) => (
|
|
@@ -121,7 +119,7 @@ function ParamsItem({
|
|
|
121
119
|
return (
|
|
122
120
|
<div className="openapi-params__list-item">
|
|
123
121
|
<span className="openapi-schema__container">
|
|
124
|
-
<strong>{name}</strong>
|
|
122
|
+
<strong className="openapi-schema__property">{name}</strong>
|
|
125
123
|
{renderSchemaName}
|
|
126
124
|
{required && <span className="openapi-schema__divider"></span>}
|
|
127
125
|
{renderSchemaRequired}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
.openapi-schema__container {
|
|
2
|
+
&:hover {
|
|
3
|
+
.openapi-schema__property {
|
|
4
|
+
color: var(--ifm-color-primary);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
.openapi-schema__list-item {
|
|
2
10
|
list-style: none;
|
|
3
11
|
position: relative;
|
|
@@ -21,44 +29,54 @@
|
|
|
21
29
|
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
|
-
.openapi-schema__list-item:hover {
|
|
25
|
-
background-color: var(--ifm-menu-color-background-active);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.openapi-schema__list-item:focus {
|
|
29
|
-
background-color: var(--ifm-menu-color-background-active);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
32
|
.openapi-schema__name {
|
|
33
33
|
opacity: 0.6;
|
|
34
34
|
padding-left: 0.3rem;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.openapi-schema__required {
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
font-size: 10.5px;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
text-transform: uppercase;
|
|
38
43
|
color: var(--openapi-required);
|
|
39
44
|
margin-left: 1%;
|
|
40
45
|
background-color: transparent;
|
|
41
|
-
font-size: 10.5px;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
.openapi-schema__deprecated {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
font-size: 10.5px;
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
text-transform: uppercase;
|
|
45
54
|
color: var(--openapi-deprecated);
|
|
46
55
|
margin-left: 1%;
|
|
47
56
|
background-color: transparent;
|
|
48
|
-
font-size: 10.5px;
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
.openapi-schema__nullable {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
font-size: 10.5px;
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
text-transform: uppercase;
|
|
52
65
|
color: var(--openapi-nullable);
|
|
53
66
|
margin-left: 1%;
|
|
54
67
|
background-color: transparent;
|
|
55
|
-
font-size: 10.5px;
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
.openapi-schema__strikethrough {
|
|
59
71
|
text-decoration: line-through;
|
|
60
72
|
}
|
|
61
73
|
|
|
74
|
+
.openapi-schema__property {
|
|
75
|
+
margin-top: 1.25px;
|
|
76
|
+
font-family: var(--ifm-font-family-monospace);
|
|
77
|
+
transition: 300ms;
|
|
78
|
+
}
|
|
79
|
+
|
|
62
80
|
.openapi-schema__divider {
|
|
63
81
|
flex-grow: 1;
|
|
64
82
|
border-bottom: thin solid var(--ifm-toc-border-color);
|
|
@@ -9,6 +9,7 @@ import React from "react";
|
|
|
9
9
|
|
|
10
10
|
import CodeBlock from "@theme/CodeBlock";
|
|
11
11
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
12
|
+
import clsx from "clsx";
|
|
12
13
|
import { createDescription } from "docusaurus-theme-openapi-docs/lib/markdown/createDescription";
|
|
13
14
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
14
15
|
import { guard } from "docusaurus-theme-openapi-docs/lib/markdown/utils";
|
|
@@ -37,21 +38,15 @@ function SchemaItem({
|
|
|
37
38
|
|
|
38
39
|
const renderRequired = guard(
|
|
39
40
|
Array.isArray(required) ? required.includes(name) : required,
|
|
40
|
-
() =>
|
|
41
|
-
<span className="badge badge--danger openapi-schema__required">
|
|
42
|
-
required
|
|
43
|
-
</span>
|
|
44
|
-
)
|
|
41
|
+
() => <span className="openapi-schema__required">required</span>
|
|
45
42
|
);
|
|
46
43
|
|
|
47
44
|
const renderDeprecated = guard(deprecated, () => (
|
|
48
|
-
<span className="
|
|
49
|
-
deprecated
|
|
50
|
-
</span>
|
|
45
|
+
<span className="openapi-schema__deprecated">deprecated</span>
|
|
51
46
|
));
|
|
52
47
|
|
|
53
48
|
const renderNullable = guard(nullable, () => (
|
|
54
|
-
<span className="
|
|
49
|
+
<span className="openapi-schema__nullable">nullable</span>
|
|
55
50
|
));
|
|
56
51
|
|
|
57
52
|
const renderSchemaDescription = guard(schemaDescription, (description) => (
|
|
@@ -96,7 +91,11 @@ function SchemaItem({
|
|
|
96
91
|
const schemaContent = (
|
|
97
92
|
<div>
|
|
98
93
|
<span className="openapi-schema__container">
|
|
99
|
-
<strong
|
|
94
|
+
<strong
|
|
95
|
+
className={clsx("openapi-schema__property", {
|
|
96
|
+
"openapi-schema__strikethrough": deprecated,
|
|
97
|
+
})}
|
|
98
|
+
>
|
|
100
99
|
{name}
|
|
101
100
|
</strong>
|
|
102
101
|
<span className="openapi-schema__name"> {schemaName}</span>
|
|
@@ -5,30 +5,37 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
.openapi-tabs__schema-container {
|
|
9
|
+
margin-top: 1rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
.openapi-tabs__schema-item {
|
|
9
13
|
display: flex;
|
|
10
14
|
align-items: center;
|
|
11
15
|
justify-content: center;
|
|
12
|
-
|
|
16
|
+
padding: 0.35rem 0.7rem;
|
|
17
|
+
border: 1px solid transparent;
|
|
13
18
|
margin-top: 0 !important;
|
|
14
19
|
margin-right: 0.5rem;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
font-weight: var(--ifm-font-weight-bold);
|
|
21
|
+
font-family: var(--ifm-font-family-monospace);
|
|
22
|
+
font-size: 10px;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
transition: 300ms;
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
&:hover {
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
border: 1px solid var(--ifm-toc-border-color);
|
|
29
|
+
}
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
31
|
+
&.active {
|
|
32
|
+
border: 1px solid var(--ifm-color-primary);
|
|
33
|
+
color: var(--ifm-color-primary);
|
|
34
|
+
}
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
&:last-child {
|
|
37
|
+
margin-right: 0 !important;
|
|
38
|
+
}
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
.openapi-tabs__schema-list-container {
|
|
@@ -49,7 +56,7 @@
|
|
|
49
56
|
white-space: nowrap;
|
|
50
57
|
}
|
|
51
58
|
|
|
52
|
-
.openapi-tabs__schema-container {
|
|
59
|
+
.openapi-tabs__schema-tabs-container {
|
|
53
60
|
width: 100%;
|
|
54
61
|
display: flex;
|
|
55
62
|
align-items: center;
|