docusaurus-theme-openapi-docs 1.4.2 → 1.4.4
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/index.js +5 -8
- package/lib/markdown/createDescription.js +1 -2
- package/lib/markdown/schema.js +7 -42
- package/lib/markdown/utils.js +1 -7
- package/lib/theme/ApiDemoPanel/Accept/index.js +1 -10
- package/lib/theme/ApiDemoPanel/Accept/slice.js +1 -2
- package/lib/theme/ApiDemoPanel/Authorization/auth-types.js +7 -8
- package/lib/theme/ApiDemoPanel/Authorization/index.js +1 -19
- package/lib/theme/ApiDemoPanel/Authorization/slice.js +7 -21
- package/lib/theme/ApiDemoPanel/Body/index.js +14 -47
- package/lib/theme/ApiDemoPanel/Body/slice.js +1 -4
- package/lib/theme/ApiDemoPanel/CodeTabs/index.js +14 -46
- package/lib/theme/ApiDemoPanel/ContentType/index.js +1 -10
- package/lib/theme/ApiDemoPanel/ContentType/slice.js +1 -2
- package/lib/theme/ApiDemoPanel/Curl/index.js +9 -29
- package/lib/theme/ApiDemoPanel/Execute/index.js +6 -23
- package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +4 -27
- package/lib/theme/ApiDemoPanel/Export/index.js +1 -8
- package/lib/theme/ApiDemoPanel/FloatingButton/index.js +1 -5
- package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +1 -14
- package/lib/theme/ApiDemoPanel/FormItem/index.js +1 -5
- package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +1 -8
- package/lib/theme/ApiDemoPanel/FormSelect/index.js +1 -6
- package/lib/theme/ApiDemoPanel/FormTextInput/index.js +1 -6
- package/lib/theme/ApiDemoPanel/LiveEditor/index.js +3 -17
- package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +1 -12
- package/lib/theme/ApiDemoPanel/ParamOptions/index.js +20 -52
- package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +1 -2
- package/lib/theme/ApiDemoPanel/Request/index.js +1 -15
- package/lib/theme/ApiDemoPanel/Response/index.js +1 -14
- package/lib/theme/ApiDemoPanel/Response/slice.js +1 -2
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +1 -9
- package/lib/theme/ApiDemoPanel/Server/index.js +3 -27
- package/lib/theme/ApiDemoPanel/Server/slice.js +1 -3
- package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +11 -62
- package/lib/theme/ApiDemoPanel/index.js +2 -14
- package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +5 -11
- package/lib/theme/ApiDemoPanel/storage-utils.js +1 -7
- package/lib/theme/ApiItem/Layout/index.js +5 -22
- package/lib/theme/ApiItem/Layout/styles.module.css +0 -403
- package/lib/theme/ApiItem/hooks.js +1 -3
- package/lib/theme/ApiItem/index.js +14 -30
- package/lib/theme/ApiItem/store.js +1 -14
- package/lib/theme/ApiLogo/index.js +1 -4
- package/lib/theme/styles.css +428 -0
- package/lib/theme-classic.d.ts +5 -0
- package/lib-next/index.js +5 -3
- package/lib-next/markdown/createDescription.js +1 -1
- package/lib-next/markdown/schema.js +7 -35
- package/lib-next/markdown/utils.js +1 -4
- package/lib-next/theme/ApiDemoPanel/Accept/index.js +1 -4
- package/lib-next/theme/ApiDemoPanel/Accept/slice.js +1 -0
- package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +7 -4
- package/lib-next/theme/ApiDemoPanel/Authorization/index.js +1 -8
- package/lib-next/theme/ApiDemoPanel/Authorization/slice.js +12 -14
- package/lib-next/theme/ApiDemoPanel/Body/index.js +16 -34
- package/lib-next/theme/ApiDemoPanel/Body/slice.js +1 -2
- package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +12 -26
- package/lib-next/theme/ApiDemoPanel/ContentType/index.js +1 -4
- package/lib-next/theme/ApiDemoPanel/ContentType/slice.js +1 -0
- package/lib-next/theme/ApiDemoPanel/Curl/index.js +11 -12
- package/lib-next/theme/ApiDemoPanel/Execute/index.js +10 -13
- package/lib-next/theme/ApiDemoPanel/Execute/makeRequest.js +4 -22
- package/lib-next/theme/ApiDemoPanel/Export/index.js +1 -5
- package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +1 -2
- package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +1 -7
- package/lib-next/theme/ApiDemoPanel/FormItem/index.js +1 -2
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +1 -5
- package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +1 -3
- package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +1 -2
- package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +3 -6
- package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +1 -9
- package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +34 -29
- package/lib-next/theme/ApiDemoPanel/ParamOptions/slice.js +1 -0
- package/lib-next/theme/ApiDemoPanel/Request/index.js +1 -2
- package/lib-next/theme/ApiDemoPanel/Response/index.js +3 -9
- package/lib-next/theme/ApiDemoPanel/Response/slice.js +1 -0
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +1 -5
- package/lib-next/theme/ApiDemoPanel/Server/index.js +3 -13
- package/lib-next/theme/ApiDemoPanel/Server/slice.js +1 -0
- package/lib-next/theme/ApiDemoPanel/buildPostmanRequest.js +12 -49
- package/lib-next/theme/ApiDemoPanel/index.js +2 -4
- package/lib-next/theme/ApiDemoPanel/persistanceMiddleware.js +5 -6
- package/lib-next/theme/ApiDemoPanel/storage-utils.js +1 -3
- package/lib-next/theme/ApiItem/Layout/index.js +8 -9
- package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -403
- package/lib-next/theme/ApiItem/hooks.js +1 -0
- package/lib-next/theme/ApiItem/index.js +14 -13
- package/lib-next/theme/ApiItem/store.js +1 -0
- package/lib-next/theme/ApiLogo/index.js +1 -0
- package/lib-next/theme/styles.css +428 -0
- package/lib-next/theme-classic.d.ts +5 -0
- package/package.json +5 -5
- package/src/index.ts +5 -0
- package/src/theme/ApiDemoPanel/Execute/index.tsx +1 -0
- package/src/theme/ApiDemoPanel/index.tsx +1 -2
- package/src/theme/ApiItem/Layout/index.tsx +5 -6
- package/src/theme/ApiItem/Layout/styles.module.css +0 -403
- package/src/theme/ApiItem/index.tsx +5 -4
- package/src/theme/styles.css +428 -0
- package/src/theme-classic.d.ts +5 -0
- package/lib/theme/ApiDemoPanel/styles.module.css +0 -44
- package/lib/theme/ApiItem/Content/index.js +0 -65
- package/lib/theme/ApiItem/Footer/index.js +0 -78
- package/lib/theme/ApiItem/Footer/styles.module.css +0 -18
- package/lib/theme/ApiItem/Metadata/index.js +0 -32
- package/lib/theme/ApiItem/Paginator/index.js +0 -33
- package/lib/theme/ApiItem/TOC/Desktop/index.js +0 -31
- package/lib/theme/ApiItem/TOC/Mobile/index.js +0 -35
- package/lib/theme/ApiItem/TOC/Mobile/styles.module.css +0 -19
- package/lib-next/theme/ApiDemoPanel/styles.module.css +0 -44
- package/lib-next/theme/ApiItem/Content/index.js +0 -55
- package/lib-next/theme/ApiItem/Footer/index.js +0 -88
- package/lib-next/theme/ApiItem/Footer/styles.module.css +0 -18
- package/lib-next/theme/ApiItem/Metadata/index.js +0 -21
- package/lib-next/theme/ApiItem/Paginator/index.js +0 -19
- package/lib-next/theme/ApiItem/TOC/Desktop/index.js +0 -22
- package/lib-next/theme/ApiItem/TOC/Mobile/index.js +0 -24
- package/lib-next/theme/ApiItem/TOC/Mobile/styles.module.css +0 -19
- package/src/theme/ApiDemoPanel/styles.module.css +0 -44
- package/src/theme/ApiItem/Content/index.tsx +0 -57
- package/src/theme/ApiItem/Footer/index.tsx +0 -101
- package/src/theme/ApiItem/Footer/styles.module.css +0 -18
- package/src/theme/ApiItem/Metadata/index.tsx +0 -24
- package/src/theme/ApiItem/Paginator/index.tsx +0 -21
- package/src/theme/ApiItem/TOC/Desktop/index.tsx +0 -25
- package/src/theme/ApiItem/TOC/Mobile/index.tsx +0 -28
- package/src/theme/ApiItem/TOC/Mobile/styles.module.css +0 -19
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Copyright (c) Palo Alto Networks
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--openapi-required: var(--ifm-color-danger);
|
|
10
|
+
--openapi-code-blue: var(--ifm-color-info);
|
|
11
|
+
--openapi-code-red: var(--ifm-color-danger);
|
|
12
|
+
--openapi-code-orange: var(--ifm-color-warning);
|
|
13
|
+
--openapi-code-green: var(--ifm-color-success);
|
|
14
|
+
--openapi-card-background-color: var(--ifm-color-gray-100);
|
|
15
|
+
--openapi-card-border-radius: var(--ifm-pre-border-radius);
|
|
16
|
+
--openapi-input-border: var(--ifm-color-primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[data-theme="dark"] {
|
|
20
|
+
--openapi-card-background-color: var(--ifm-color-gray-900) !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.docs-wrapper {
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.docItemContainer header + *,
|
|
28
|
+
.docItemContainer article > *:first-child {
|
|
29
|
+
margin-top: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (min-width: 997px) {
|
|
33
|
+
.docItemCol {
|
|
34
|
+
max-width: 75% !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
|
|
38
|
+
.tocMobile {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Begin OpenAPI theme styles */
|
|
44
|
+
[data-theme="dark"] {
|
|
45
|
+
--openapi-card-background-color: var(--ifm-color-gray-900) !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.apiItemContainer article > *:first-child,
|
|
49
|
+
.apiItemContainer header + * {
|
|
50
|
+
margin-top: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.theme-api-markdown div[class^="collapsibleContent"] {
|
|
54
|
+
margin-top: 0 !important;
|
|
55
|
+
padding-left: 2px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Main details */
|
|
59
|
+
|
|
60
|
+
.theme-api-markdown details {
|
|
61
|
+
margin: unset;
|
|
62
|
+
max-width: 600px;
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
color: var(--ifm-font-color-base);
|
|
65
|
+
padding: unset;
|
|
66
|
+
border: unset !important;
|
|
67
|
+
box-shadow: unset !important;
|
|
68
|
+
--docusaurus-details-decoration-color: var(--ifm-font-color-base);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.theme-api-markdown details ul {
|
|
72
|
+
padding-left: 0;
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.theme-api-markdown details li {
|
|
77
|
+
list-style: none;
|
|
78
|
+
padding-bottom: 5px;
|
|
79
|
+
padding-top: 5px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.theme-api-markdown details > div > div {
|
|
83
|
+
padding-top: unset !important;
|
|
84
|
+
border-top: unset !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.theme-api-markdown details p {
|
|
88
|
+
margin-bottom: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Demo panel details */
|
|
92
|
+
|
|
93
|
+
.theme-api-markdown .details__demo-panel {
|
|
94
|
+
margin-bottom: 1rem;
|
|
95
|
+
background: var(--openapi-card-background-color);
|
|
96
|
+
border-radius: var(--openapi-card-border-radius);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.theme-api-markdown .details__demo-panel > summary {
|
|
100
|
+
padding-left: 1rem;
|
|
101
|
+
padding-top: 1rem;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.theme-api-markdown .details__demo-panel > div > div > pre {
|
|
106
|
+
border-top-left-radius: 0;
|
|
107
|
+
border-top-right-radius: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.theme-api-markdown .details__demo-panel > summary::marker {
|
|
111
|
+
display: none;
|
|
112
|
+
content: "";
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.theme-api-markdown .details__demo-panel > summary::-webkit-details-marker {
|
|
116
|
+
display: none;
|
|
117
|
+
content: "";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.theme-api-markdown .details__demo-panel > pre {
|
|
121
|
+
margin-bottom: 0;
|
|
122
|
+
padding-top: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Demo panel request */
|
|
126
|
+
|
|
127
|
+
.theme-api-markdown .details__request-summary {
|
|
128
|
+
display: flex;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
align-items: center;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.theme-api-markdown .details__request-summary > button {
|
|
134
|
+
margin-bottom: 1rem;
|
|
135
|
+
margin-right: 1rem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Demo panel response */
|
|
139
|
+
|
|
140
|
+
.theme-api-markdown .details__response-summary {
|
|
141
|
+
display: flex;
|
|
142
|
+
justify-content: space-between;
|
|
143
|
+
align-items: center;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.theme-api-markdown .details__response-summary > button {
|
|
147
|
+
margin-bottom: 1rem;
|
|
148
|
+
margin-right: 1rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Code block */
|
|
152
|
+
|
|
153
|
+
.theme-api-markdown code {
|
|
154
|
+
max-width: 600px;
|
|
155
|
+
max-height: 500px;
|
|
156
|
+
overflow: auto;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Version button */
|
|
160
|
+
|
|
161
|
+
.version-button div {
|
|
162
|
+
display: block;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.version-button div > button > span::after {
|
|
166
|
+
border-color: currentcolor transparent;
|
|
167
|
+
border-style: solid;
|
|
168
|
+
border-width: 0.4em 0.4em 0;
|
|
169
|
+
content: "";
|
|
170
|
+
margin-left: 0.3em;
|
|
171
|
+
position: relative;
|
|
172
|
+
transform: translateY(-50%);
|
|
173
|
+
display: inline-block;
|
|
174
|
+
font-size: 0.8rem;
|
|
175
|
+
top: 1px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Params, Schema and Discriminator Items */
|
|
179
|
+
|
|
180
|
+
[class^="paramsItem"]::before,
|
|
181
|
+
[class^="schemaItem"]::before {
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: 10px;
|
|
184
|
+
left: 0;
|
|
185
|
+
width: 0.7rem;
|
|
186
|
+
/* width of horizontal line */
|
|
187
|
+
height: 0.5rem;
|
|
188
|
+
/* vertical position of line */
|
|
189
|
+
vertical-align: top;
|
|
190
|
+
border-bottom: thin solid var(--ifm-color-gray-500);
|
|
191
|
+
content: "";
|
|
192
|
+
display: inline-block;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.schemaItem {
|
|
196
|
+
list-style: none;
|
|
197
|
+
position: relative;
|
|
198
|
+
margin: 0 !important;
|
|
199
|
+
padding: 5px 0 5px 1rem;
|
|
200
|
+
border-left: thin solid var(--ifm-color-gray-500) !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.discriminatorItem {
|
|
204
|
+
list-style: none;
|
|
205
|
+
position: relative;
|
|
206
|
+
margin: 0 !important;
|
|
207
|
+
padding: 5px 0 5px 0 !important;
|
|
208
|
+
border-left: thin solid var(--ifm-color-gray-500) !important;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.discriminatorTabsContainer {
|
|
212
|
+
padding-left: 0 !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.schemaItem:hover {
|
|
216
|
+
background-color: var(--ifm-menu-color-background-active);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.schemaItem:focus {
|
|
220
|
+
background-color: var(--ifm-menu-color-background-active);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.paramsItem:hover {
|
|
224
|
+
background-color: var(--ifm-menu-color-background-active);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.paramsItem:focus {
|
|
228
|
+
background-color: var(--ifm-menu-color-background-active);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* CodeTabs */
|
|
232
|
+
|
|
233
|
+
.code__tab--python::after {
|
|
234
|
+
content: "";
|
|
235
|
+
width: 28px;
|
|
236
|
+
height: 28px;
|
|
237
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-original.svg");
|
|
238
|
+
margin-block: auto;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.code__tab--python {
|
|
242
|
+
color: var(--ifm-color-success);
|
|
243
|
+
padding-left: 1.4rem;
|
|
244
|
+
padding-right: 1.4rem;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.code__tab--python.tabs__item--active {
|
|
248
|
+
border-bottom-color: var(--ifm-color-success);
|
|
249
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.language-python {
|
|
253
|
+
max-height: 500px;
|
|
254
|
+
overflow: auto;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.code__tab--go::after {
|
|
258
|
+
content: "";
|
|
259
|
+
width: 28px;
|
|
260
|
+
height: 28px;
|
|
261
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/go/go-original-wordmark.svg");
|
|
262
|
+
margin-block: auto;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.code__tab--go {
|
|
266
|
+
color: var(--ifm-color-info);
|
|
267
|
+
padding-left: 1.4rem;
|
|
268
|
+
padding-right: 1.4rem;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.code__tab--go.tabs__item--active {
|
|
272
|
+
border-bottom-color: var(--ifm-color-info);
|
|
273
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.language-go {
|
|
277
|
+
max-height: 500px;
|
|
278
|
+
overflow: auto;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.code__tab--javascript::after {
|
|
282
|
+
content: "";
|
|
283
|
+
width: 28px;
|
|
284
|
+
height: 28px;
|
|
285
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-original.svg");
|
|
286
|
+
margin-block: auto;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.code__tab--javascript {
|
|
290
|
+
color: var(--ifm-color-warning);
|
|
291
|
+
padding-left: 1.4rem;
|
|
292
|
+
padding-right: 1.4rem;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.code__tab--javascript.tabs__item--active {
|
|
296
|
+
border-bottom-color: var(--ifm-color-warning);
|
|
297
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.language-javascript {
|
|
301
|
+
max-height: 500px;
|
|
302
|
+
overflow: auto;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.code__tab--bash::after {
|
|
306
|
+
content: "";
|
|
307
|
+
width: 28px;
|
|
308
|
+
height: 28px;
|
|
309
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/linux/linux-original.svg");
|
|
310
|
+
margin-block: auto;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.code__tab--bash {
|
|
314
|
+
color: var(--ifm-color-danger);
|
|
315
|
+
padding-left: 1.4rem;
|
|
316
|
+
padding-right: 1.4rem;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.code__tab--bash.tabs__item--active {
|
|
320
|
+
border-bottom-color: var(--ifm-color-danger);
|
|
321
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.language-bash {
|
|
325
|
+
max-height: 500px;
|
|
326
|
+
overflow: auto;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.code__tab--ruby::after {
|
|
330
|
+
content: "";
|
|
331
|
+
width: 28px;
|
|
332
|
+
height: 28px;
|
|
333
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/ruby/ruby-plain.svg");
|
|
334
|
+
margin-block: auto;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.code__tab--ruby {
|
|
338
|
+
color: var(--ifm-color-danger);
|
|
339
|
+
padding-left: 1.4rem;
|
|
340
|
+
padding-right: 1.4rem;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.code__tab--ruby.tabs__item--active {
|
|
344
|
+
border-bottom-color: var(--ifm-color-danger);
|
|
345
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.language-ruby {
|
|
349
|
+
max-height: 500px;
|
|
350
|
+
overflow: auto;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.code__tab--csharp::after {
|
|
354
|
+
content: "";
|
|
355
|
+
width: 28px;
|
|
356
|
+
height: 28px;
|
|
357
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/csharp/csharp-original.svg");
|
|
358
|
+
margin-block: auto;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.code__tab--csharp {
|
|
362
|
+
color: var(--ifm-color-gray-500);
|
|
363
|
+
padding-left: 1.4rem;
|
|
364
|
+
padding-right: 1.4rem;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.code__tab--csharp.tabs__item--active {
|
|
368
|
+
border-bottom-color: var(--ifm-color-gray-500);
|
|
369
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.language-csharp {
|
|
373
|
+
max-height: 500px;
|
|
374
|
+
overflow: auto;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.code__tab--nodejs::after {
|
|
378
|
+
content: "";
|
|
379
|
+
width: 28px;
|
|
380
|
+
height: 28px;
|
|
381
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/nodejs/nodejs-original.svg");
|
|
382
|
+
margin-block: auto;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.code__tab--nodejs {
|
|
386
|
+
color: var(--ifm-color-success);
|
|
387
|
+
padding-left: 1.4rem;
|
|
388
|
+
padding-right: 1.4rem;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.code__tab--nodejs.tabs__item--active {
|
|
392
|
+
border-bottom-color: var(--ifm-color-success);
|
|
393
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.language-nodejs {
|
|
397
|
+
max-height: 500px;
|
|
398
|
+
overflow: auto;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.code__tab--php::after {
|
|
402
|
+
content: "";
|
|
403
|
+
width: 28px;
|
|
404
|
+
height: 28px;
|
|
405
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/php/php-original.svg");
|
|
406
|
+
margin-block: auto;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.code__tab--php {
|
|
410
|
+
color: var(--ifm-color-gray-500);
|
|
411
|
+
padding-left: 1.4rem;
|
|
412
|
+
padding-right: 1.4rem;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.code__tab--php.tabs__item--active {
|
|
416
|
+
border-bottom-color: var(--ifm-color-gray-500);
|
|
417
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.language-php {
|
|
421
|
+
max-height: 500px;
|
|
422
|
+
overflow: auto;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* Prism code styles */
|
|
426
|
+
.prism-code.language-json {
|
|
427
|
+
white-space: pre !important;
|
|
428
|
+
}
|
package/lib/theme-classic.d.ts
CHANGED
package/lib-next/index.js
CHANGED
|
@@ -4,20 +4,22 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
|
+
|
|
7
8
|
import path from "path";
|
|
8
9
|
import { ProvidePlugin } from "webpack";
|
|
9
10
|
export default function docusaurusThemeOpenAPI() {
|
|
10
11
|
return {
|
|
11
12
|
name: "docusaurus-theme-openapi",
|
|
12
|
-
|
|
13
|
+
getClientModules() {
|
|
14
|
+
const modules = [require.resolve("./theme/styles.css")];
|
|
15
|
+
return modules;
|
|
16
|
+
},
|
|
13
17
|
getThemePath() {
|
|
14
18
|
return path.join(__dirname, "..", "lib-next", "theme");
|
|
15
19
|
},
|
|
16
|
-
|
|
17
20
|
getTypeScriptThemePath() {
|
|
18
21
|
return path.resolve(__dirname, "..", "src", "theme");
|
|
19
22
|
},
|
|
20
|
-
|
|
21
23
|
configureWebpack() {
|
|
22
24
|
return {
|
|
23
25
|
plugins: [
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
|
+
|
|
7
8
|
export function createDescription(description) {
|
|
8
9
|
if (!description) {
|
|
9
10
|
return "";
|
|
10
11
|
}
|
|
11
|
-
|
|
12
12
|
return `\n\n${description}\n\n`;
|
|
13
13
|
}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
|
+
|
|
7
8
|
function prettyName(schema, circular) {
|
|
8
9
|
if (schema.format) {
|
|
9
10
|
return schema.format;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
12
|
if (schema.allOf) {
|
|
13
13
|
if (typeof schema.allOf[0] === "string") {
|
|
14
14
|
// @ts-ignore
|
|
@@ -16,34 +16,30 @@ function prettyName(schema, circular) {
|
|
|
16
16
|
return schema.allOf[0];
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
|
|
20
19
|
return "object";
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
if (schema.oneOf) {
|
|
24
22
|
return "object";
|
|
25
23
|
}
|
|
26
|
-
|
|
27
24
|
if (schema.anyOf) {
|
|
28
25
|
return "object";
|
|
29
26
|
}
|
|
30
|
-
|
|
31
27
|
if (schema.type === "object") {
|
|
32
|
-
return schema.xml?.name ?? schema.type;
|
|
28
|
+
return schema.xml?.name ?? schema.type;
|
|
29
|
+
// return schema.type;
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
if (schema.type === "array") {
|
|
36
|
-
return schema.xml?.name ?? schema.type;
|
|
33
|
+
return schema.xml?.name ?? schema.type;
|
|
34
|
+
// return schema.type;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
return schema.title ?? schema.type;
|
|
40
38
|
}
|
|
41
|
-
|
|
42
39
|
export function getSchemaName(schema, circular) {
|
|
43
40
|
if (schema.items) {
|
|
44
41
|
return prettyName(schema.items, circular) + "[]";
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
return prettyName(schema, circular) ?? "";
|
|
48
44
|
}
|
|
49
45
|
export function getQualifierMessage(schema) {
|
|
@@ -55,7 +51,6 @@ export function getQualifierMessage(schema) {
|
|
|
55
51
|
if (!schema) {
|
|
56
52
|
return undefined;
|
|
57
53
|
}
|
|
58
|
-
|
|
59
54
|
if (
|
|
60
55
|
schema.items &&
|
|
61
56
|
schema.minItems === undefined &&
|
|
@@ -63,10 +58,8 @@ export function getQualifierMessage(schema) {
|
|
|
63
58
|
) {
|
|
64
59
|
return getQualifierMessage(schema.items);
|
|
65
60
|
}
|
|
66
|
-
|
|
67
61
|
let message = "**Possible values:** ";
|
|
68
62
|
let qualifierGroups = [];
|
|
69
|
-
|
|
70
63
|
if (schema.items && schema.items.enum) {
|
|
71
64
|
if (schema.items.enum) {
|
|
72
65
|
qualifierGroups.push(
|
|
@@ -74,39 +67,30 @@ export function getQualifierMessage(schema) {
|
|
|
74
67
|
);
|
|
75
68
|
}
|
|
76
69
|
}
|
|
77
|
-
|
|
78
70
|
if (schema.minLength || schema.maxLength) {
|
|
79
71
|
let lengthQualifier = "";
|
|
80
72
|
let minLength;
|
|
81
73
|
let maxLength;
|
|
82
|
-
|
|
83
74
|
if (schema.minLength && schema.minLength > 1) {
|
|
84
75
|
minLength = `\`>= ${schema.minLength} characters\``;
|
|
85
76
|
}
|
|
86
|
-
|
|
87
77
|
if (schema.minLength && schema.minLength === 1) {
|
|
88
78
|
minLength = `\`non-empty\``;
|
|
89
79
|
}
|
|
90
|
-
|
|
91
80
|
if (schema.maxLength) {
|
|
92
81
|
maxLength = `\`<= ${schema.maxLength} characters\``;
|
|
93
82
|
}
|
|
94
|
-
|
|
95
83
|
if (minLength && !maxLength) {
|
|
96
84
|
lengthQualifier += minLength;
|
|
97
85
|
}
|
|
98
|
-
|
|
99
86
|
if (maxLength && !minLength) {
|
|
100
87
|
lengthQualifier += maxLength;
|
|
101
88
|
}
|
|
102
|
-
|
|
103
89
|
if (minLength && maxLength) {
|
|
104
90
|
lengthQualifier += `${minLength} and ${maxLength}`;
|
|
105
91
|
}
|
|
106
|
-
|
|
107
92
|
qualifierGroups.push(lengthQualifier);
|
|
108
93
|
}
|
|
109
|
-
|
|
110
94
|
if (
|
|
111
95
|
schema.minimum ||
|
|
112
96
|
schema.maximum ||
|
|
@@ -116,7 +100,6 @@ export function getQualifierMessage(schema) {
|
|
|
116
100
|
let minmaxQualifier = "";
|
|
117
101
|
let minimum;
|
|
118
102
|
let maximum;
|
|
119
|
-
|
|
120
103
|
if (typeof schema.exclusiveMinimum === "number") {
|
|
121
104
|
minimum = `\`> ${schema.exclusiveMinimum}\``;
|
|
122
105
|
} else if (schema.minimum && !schema.exclusiveMinimum) {
|
|
@@ -124,7 +107,6 @@ export function getQualifierMessage(schema) {
|
|
|
124
107
|
} else if (schema.minimum && schema.exclusiveMinimum === true) {
|
|
125
108
|
minimum = `\`> ${schema.minimum}\``;
|
|
126
109
|
}
|
|
127
|
-
|
|
128
110
|
if (typeof schema.exclusiveMaximum === "number") {
|
|
129
111
|
maximum = `\`< ${schema.exclusiveMaximum}\``;
|
|
130
112
|
} else if (schema.maximum && !schema.exclusiveMaximum) {
|
|
@@ -132,50 +114,40 @@ export function getQualifierMessage(schema) {
|
|
|
132
114
|
} else if (schema.maximum && schema.exclusiveMaximum === true) {
|
|
133
115
|
maximum = `\`< ${schema.maximum}\``;
|
|
134
116
|
}
|
|
135
|
-
|
|
136
117
|
if (minimum && !maximum) {
|
|
137
118
|
minmaxQualifier += minimum;
|
|
138
119
|
}
|
|
139
|
-
|
|
140
120
|
if (maximum && !minimum) {
|
|
141
121
|
minmaxQualifier += maximum;
|
|
142
122
|
}
|
|
143
|
-
|
|
144
123
|
if (minimum && maximum) {
|
|
145
124
|
minmaxQualifier += `${minimum} and ${maximum}`;
|
|
146
125
|
}
|
|
147
|
-
|
|
148
126
|
qualifierGroups.push(minmaxQualifier);
|
|
149
127
|
}
|
|
150
|
-
|
|
151
128
|
if (schema.pattern) {
|
|
152
129
|
qualifierGroups.push(
|
|
153
130
|
`Value must match regular expression \`${schema.pattern}\``
|
|
154
131
|
);
|
|
155
|
-
}
|
|
132
|
+
}
|
|
156
133
|
|
|
134
|
+
// Check if discriminator mapping
|
|
157
135
|
const discriminator = schema;
|
|
158
|
-
|
|
159
136
|
if (discriminator.mapping) {
|
|
160
137
|
const values = Object.keys(discriminator.mapping);
|
|
161
138
|
qualifierGroups.push(`[${values.map((e) => `\`${e}\``).join(", ")}]`);
|
|
162
139
|
}
|
|
163
|
-
|
|
164
140
|
if (schema.enum) {
|
|
165
141
|
qualifierGroups.push(`[${schema.enum.map((e) => `\`${e}\``).join(", ")}]`);
|
|
166
142
|
}
|
|
167
|
-
|
|
168
143
|
if (schema.minItems) {
|
|
169
144
|
qualifierGroups.push(`\`>= ${schema.minItems}\``);
|
|
170
145
|
}
|
|
171
|
-
|
|
172
146
|
if (schema.maxItems) {
|
|
173
147
|
qualifierGroups.push(`\`<= ${schema.maxItems}\``);
|
|
174
148
|
}
|
|
175
|
-
|
|
176
149
|
if (qualifierGroups.length === 0) {
|
|
177
150
|
return undefined;
|
|
178
151
|
}
|
|
179
|
-
|
|
180
152
|
return message + qualifierGroups.join(", ");
|
|
181
153
|
}
|
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
|
+
|
|
7
8
|
export function create(tag, props) {
|
|
8
9
|
const { children, ...rest } = props;
|
|
9
10
|
let propString = "";
|
|
10
|
-
|
|
11
11
|
for (const [key, value] of Object.entries(rest)) {
|
|
12
12
|
propString += ` ${key}={${JSON.stringify(value)}}`;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
return `<${tag}${propString}>${render(children)}</${tag}>`;
|
|
16
15
|
}
|
|
17
16
|
export function guard(value, cb) {
|
|
@@ -19,13 +18,11 @@ export function guard(value, cb) {
|
|
|
19
18
|
const children = cb(value);
|
|
20
19
|
return render(children);
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
return "";
|
|
24
22
|
}
|
|
25
23
|
export function render(children) {
|
|
26
24
|
if (Array.isArray(children)) {
|
|
27
25
|
return children.filter((c) => c !== undefined).join("");
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
return children ?? "";
|
|
31
28
|
}
|
|
@@ -4,21 +4,19 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
|
+
|
|
7
8
|
import React from "react";
|
|
8
9
|
import { useTypedDispatch, useTypedSelector } from "../../ApiItem/hooks";
|
|
9
10
|
import FormItem from "./../FormItem";
|
|
10
11
|
import FormSelect from "./../FormSelect";
|
|
11
12
|
import { setAccept } from "./slice";
|
|
12
|
-
|
|
13
13
|
function Accept() {
|
|
14
14
|
const value = useTypedSelector((state) => state.accept.value);
|
|
15
15
|
const options = useTypedSelector((state) => state.accept.options);
|
|
16
16
|
const dispatch = useTypedDispatch();
|
|
17
|
-
|
|
18
17
|
if (options.length <= 1) {
|
|
19
18
|
return null;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
return (
|
|
23
21
|
<FormItem label="Accept">
|
|
24
22
|
<FormSelect
|
|
@@ -29,5 +27,4 @@ function Accept() {
|
|
|
29
27
|
</FormItem>
|
|
30
28
|
);
|
|
31
29
|
}
|
|
32
|
-
|
|
33
30
|
export default Accept;
|