docusaurus-theme-openapi-docs 4.3.0 → 4.3.2
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 +1 -1
- package/lib/markdown/createDescription.js +1 -2
- package/lib/markdown/schema.js +2 -3
- package/lib/markdown/utils.d.ts +2 -2
- package/lib/markdown/utils.js +4 -5
- package/lib/theme/ApiExplorer/Accept/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +0 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +0 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +23 -11
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +23 -11
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +23 -11
- package/lib/theme/ApiExplorer/Authorization/auth-types.js +1 -2
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +3 -3
- package/lib/theme/ApiExplorer/Authorization/slice.js +2 -6
- package/lib/theme/ApiExplorer/Body/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +64 -56
- package/lib/theme/ApiExplorer/CodeSnippets/languages.js +4 -8
- package/lib/theme/ApiExplorer/CodeTabs/index.js +29 -13
- package/lib/theme/ApiExplorer/ContentType/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +22 -10
- package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/LiveEditor/index.js +27 -13
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +23 -11
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +1 -1
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +1 -1
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +1 -1
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +1 -1
- package/lib/theme/ApiExplorer/ParamOptions/index.js +22 -10
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/Request/index.js +22 -10
- package/lib/theme/ApiExplorer/Response/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/Server/index.js +22 -10
- package/lib/theme/ApiExplorer/Server/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/buildPostmanRequest.js +1 -1
- package/lib/theme/ApiExplorer/persistanceMiddleware.js +1 -2
- package/lib/theme/ApiExplorer/storage-utils.js +2 -3
- package/lib/theme/ApiItem/Layout/index.d.ts +1 -1
- package/lib/theme/ApiItem/Layout/index.js +1 -1
- package/lib/theme/ApiItem/hooks.d.ts +1 -1
- package/lib/theme/ApiItem/index.d.ts +0 -2
- package/lib/theme/ApiItem/index.js +1 -1
- package/lib/theme/ApiItem/store.d.ts +5 -5
- package/lib/theme/ApiLogo/index.js +1 -1
- package/lib/theme/ApiTabs/index.js +26 -12
- package/lib/theme/DiscriminatorTabs/index.js +26 -12
- package/lib/theme/MimeTabs/index.js +26 -12
- package/lib/theme/OperationTabs/index.js +26 -12
- package/lib/theme/ParamsDetails/index.js +4 -53
- package/lib/theme/RequestSchema/index.js +4 -53
- package/lib/theme/ResponseExamples/index.js +1 -2
- package/lib/theme/ResponseSchema/index.js +4 -53
- package/lib/theme/SchemaItem/index.js +4 -2
- package/lib/theme/SchemaTabs/index.js +26 -12
- package/package.json +5 -5
- package/src/theme/ApiExplorer/CodeSnippets/index.tsx +46 -48
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +6 -2
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +6 -4
- package/src/theme/ApiExplorer/buildPostmanRequest.ts +1 -1
- package/src/theme/ApiItem/Layout/index.tsx +1 -1
- package/src/theme/ApiItem/index.tsx +1 -1
- package/src/theme/ApiTabs/index.tsx +3 -1
- package/src/theme/DiscriminatorTabs/index.tsx +3 -1
- package/src/theme/MimeTabs/index.tsx +3 -1
- package/src/theme/OperationTabs/index.tsx +3 -1
- package/src/theme/ParamsDetails/index.tsx +2 -9
- package/src/theme/RequestSchema/index.tsx +2 -9
- package/src/theme/ResponseSchema/index.tsx +2 -9
- package/src/theme/SchemaItem/index.tsx +3 -1
- package/src/theme/SchemaTabs/index.tsx +3 -1
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -5,20 +5,14 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
* Copyright (c) Palo Alto Networks
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
* ========================================================================== */
|
|
14
|
-
|
|
15
|
-
import React, { useState, useEffect } from "react";
|
|
8
|
+
import React, { useState, useEffect, type JSX } from "react";
|
|
16
9
|
|
|
17
10
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
|
18
11
|
import ApiCodeBlock from "@theme/ApiExplorer/ApiCodeBlock";
|
|
19
12
|
import buildPostmanRequest from "@theme/ApiExplorer/buildPostmanRequest";
|
|
20
13
|
import CodeTabs from "@theme/ApiExplorer/CodeTabs";
|
|
21
14
|
import { useTypedSelector } from "@theme/ApiItem/hooks";
|
|
15
|
+
import cloneDeep from "lodash/cloneDeep";
|
|
22
16
|
import codegen from "postman-code-generators";
|
|
23
17
|
import sdk from "postman-collection";
|
|
24
18
|
|
|
@@ -59,6 +53,44 @@ function CodeSnippets({ postman, codeSamples }: Props) {
|
|
|
59
53
|
const headerParams = useTypedSelector((state: any) => state.params.header);
|
|
60
54
|
|
|
61
55
|
const auth = useTypedSelector((state: any) => state.auth);
|
|
56
|
+
const clonedAuth = cloneDeep(auth);
|
|
57
|
+
let placeholder: string;
|
|
58
|
+
|
|
59
|
+
function cleanCredentials(obj: any) {
|
|
60
|
+
for (const key in obj) {
|
|
61
|
+
if (typeof obj[key] === "object" && obj[key] !== null) {
|
|
62
|
+
// use name as placeholder if exists
|
|
63
|
+
const comboAuthId = Object.keys(obj).join(" and ");
|
|
64
|
+
const authOptions =
|
|
65
|
+
clonedAuth?.options?.[key] ?? clonedAuth?.options?.[comboAuthId];
|
|
66
|
+
placeholder = authOptions?.[0]?.name;
|
|
67
|
+
obj[key] = cleanCredentials(obj[key]);
|
|
68
|
+
} else {
|
|
69
|
+
obj[key] = `<${placeholder ?? key}>`;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// scrub credentials from code snippets
|
|
77
|
+
const cleanedAuth = {
|
|
78
|
+
...clonedAuth,
|
|
79
|
+
data: cleanCredentials(clonedAuth.data),
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// Create a Postman request object using cleanedAuth
|
|
83
|
+
const cleanedPostmanRequest = buildPostmanRequest(postman, {
|
|
84
|
+
queryParams,
|
|
85
|
+
pathParams,
|
|
86
|
+
cookieParams,
|
|
87
|
+
contentType,
|
|
88
|
+
accept,
|
|
89
|
+
headerParams,
|
|
90
|
+
body,
|
|
91
|
+
server,
|
|
92
|
+
auth: cleanedAuth,
|
|
93
|
+
});
|
|
62
94
|
|
|
63
95
|
// User-defined languages array
|
|
64
96
|
// Can override languageSet, change order of langs, override options and variants
|
|
@@ -105,21 +137,10 @@ function CodeSnippets({ postman, codeSamples }: Props) {
|
|
|
105
137
|
}
|
|
106
138
|
|
|
107
139
|
if (language && !!language.options) {
|
|
108
|
-
const postmanRequest = buildPostmanRequest(postman, {
|
|
109
|
-
queryParams,
|
|
110
|
-
pathParams,
|
|
111
|
-
cookieParams,
|
|
112
|
-
contentType,
|
|
113
|
-
accept,
|
|
114
|
-
headerParams,
|
|
115
|
-
body,
|
|
116
|
-
server,
|
|
117
|
-
auth,
|
|
118
|
-
});
|
|
119
140
|
codegen.convert(
|
|
120
141
|
language.language,
|
|
121
142
|
language.variant,
|
|
122
|
-
|
|
143
|
+
cleanedPostmanRequest,
|
|
123
144
|
language.options,
|
|
124
145
|
(error: any, snippet: string) => {
|
|
125
146
|
if (error) {
|
|
@@ -137,22 +158,10 @@ function CodeSnippets({ postman, codeSamples }: Props) {
|
|
|
137
158
|
// This allows users to define only the minimal properties necessary in languageTabs
|
|
138
159
|
// User-defined properties should override languageSet properties
|
|
139
160
|
const mergedLanguage = { ...langSource[0], ...language };
|
|
140
|
-
const postmanRequest = buildPostmanRequest(postman, {
|
|
141
|
-
queryParams,
|
|
142
|
-
pathParams,
|
|
143
|
-
cookieParams,
|
|
144
|
-
contentType,
|
|
145
|
-
accept,
|
|
146
|
-
headerParams,
|
|
147
|
-
body,
|
|
148
|
-
server,
|
|
149
|
-
auth,
|
|
150
|
-
});
|
|
151
|
-
|
|
152
161
|
codegen.convert(
|
|
153
162
|
mergedLanguage.language,
|
|
154
163
|
mergedLanguage.variant,
|
|
155
|
-
|
|
164
|
+
cleanedPostmanRequest,
|
|
156
165
|
mergedLanguage.options,
|
|
157
166
|
(error: any, snippet: string) => {
|
|
158
167
|
if (error) {
|
|
@@ -175,27 +184,16 @@ function CodeSnippets({ postman, codeSamples }: Props) {
|
|
|
175
184
|
postman,
|
|
176
185
|
queryParams,
|
|
177
186
|
server,
|
|
178
|
-
|
|
187
|
+
cleanedPostmanRequest,
|
|
179
188
|
mergedLangs,
|
|
180
189
|
]);
|
|
181
|
-
// no dependencies was
|
|
190
|
+
// no dependencies was intentionally set for this particular hook. it's safe as long as if conditions are set
|
|
182
191
|
useEffect(function onSelectedVariantUpdate() {
|
|
183
192
|
if (selectedVariant && selectedVariant !== language?.variant) {
|
|
184
|
-
const postmanRequest = buildPostmanRequest(postman, {
|
|
185
|
-
queryParams,
|
|
186
|
-
pathParams,
|
|
187
|
-
cookieParams,
|
|
188
|
-
contentType,
|
|
189
|
-
accept,
|
|
190
|
-
headerParams,
|
|
191
|
-
body,
|
|
192
|
-
server,
|
|
193
|
-
auth,
|
|
194
|
-
});
|
|
195
193
|
codegen.convert(
|
|
196
194
|
language.language,
|
|
197
195
|
selectedVariant,
|
|
198
|
-
|
|
196
|
+
cleanedPostmanRequest,
|
|
199
197
|
language.options,
|
|
200
198
|
(error: any, snippet: string) => {
|
|
201
199
|
if (error) {
|
|
@@ -207,7 +205,7 @@ function CodeSnippets({ postman, codeSamples }: Props) {
|
|
|
207
205
|
}
|
|
208
206
|
});
|
|
209
207
|
|
|
210
|
-
// no dependencies was
|
|
208
|
+
// no dependencies was intentionally set for this particular hook. it's safe as long as if conditions are set
|
|
211
209
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
212
210
|
useEffect(function onSelectedSampleUpdate() {
|
|
213
211
|
if (
|
|
@@ -44,7 +44,7 @@ function TabList({
|
|
|
44
44
|
tabValues,
|
|
45
45
|
}: CodeTabsProps & ReturnType<typeof useTabs>) {
|
|
46
46
|
const tabRefs = useRef<(HTMLLIElement | null)[]>([]);
|
|
47
|
-
const tabsScrollContainerRef = useRef<any>();
|
|
47
|
+
const tabsScrollContainerRef = useRef<any>(null);
|
|
48
48
|
const { blockElementScrollPositionUntilNextRender } =
|
|
49
49
|
useScrollPositionBlocker();
|
|
50
50
|
|
|
@@ -163,7 +163,11 @@ function TabList({
|
|
|
163
163
|
tabIndex={selectedValue === value ? 0 : -1}
|
|
164
164
|
aria-selected={selectedValue === value}
|
|
165
165
|
key={value}
|
|
166
|
-
ref={(tabControl) =>
|
|
166
|
+
ref={(tabControl) => {
|
|
167
|
+
if (tabControl) {
|
|
168
|
+
tabRefs.current.push(tabControl);
|
|
169
|
+
}
|
|
170
|
+
}}
|
|
167
171
|
onKeyDown={handleKeydown}
|
|
168
172
|
onClick={handleTabChange}
|
|
169
173
|
{...attributes}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
import React, { useEffect, useState } from "react";
|
|
8
|
+
import React, { type JSX, useEffect, useState } from "react";
|
|
9
9
|
|
|
10
10
|
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
11
11
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
@@ -51,7 +51,7 @@ function App({
|
|
|
51
51
|
...props
|
|
52
52
|
}: any): JSX.Element {
|
|
53
53
|
const prismTheme = usePrismTheme();
|
|
54
|
-
const [code, setCode] = React.useState(children);
|
|
54
|
+
const [code, setCode] = React.useState(children.replace(/\n$/, ""));
|
|
55
55
|
|
|
56
56
|
useEffect(() => {
|
|
57
57
|
action(setStringRawBody(code));
|
|
@@ -76,7 +76,7 @@ function App({
|
|
|
76
76
|
})}
|
|
77
77
|
>
|
|
78
78
|
<LiveProvider
|
|
79
|
-
code={
|
|
79
|
+
code={code}
|
|
80
80
|
transformCode={transformCode ?? ((code) => `${code};`)}
|
|
81
81
|
theme={prismTheme}
|
|
82
82
|
language={language}
|
|
@@ -84,7 +84,9 @@ function App({
|
|
|
84
84
|
>
|
|
85
85
|
<Controller
|
|
86
86
|
control={control}
|
|
87
|
-
rules={{
|
|
87
|
+
rules={{
|
|
88
|
+
required: isRequired && !code ? "This field is required" : false,
|
|
89
|
+
}}
|
|
88
90
|
name="requestBody"
|
|
89
91
|
render={({ field: { onChange, name } }) => (
|
|
90
92
|
<LiveComponent
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
import React from "react";
|
|
8
|
+
import React, { type JSX } from "react";
|
|
9
9
|
|
|
10
10
|
import { useDoc } from "@docusaurus/plugin-content-docs/client";
|
|
11
11
|
import { useWindowSize } from "@docusaurus/theme-common";
|
|
@@ -65,7 +65,7 @@ export default function ApiItem(props: Props): JSX.Element {
|
|
|
65
65
|
if (api) {
|
|
66
66
|
try {
|
|
67
67
|
api = JSON.parse(
|
|
68
|
-
zlib.inflateSync(Buffer.from(api as any, "base64")).toString()
|
|
68
|
+
zlib.inflateSync(Buffer.from(api as any, "base64") as any).toString()
|
|
69
69
|
);
|
|
70
70
|
} catch {}
|
|
71
71
|
}
|
|
@@ -150,7 +150,9 @@ function TabList({
|
|
|
150
150
|
tabIndex={selectedValue === value ? 0 : -1}
|
|
151
151
|
aria-selected={selectedValue === value}
|
|
152
152
|
key={value}
|
|
153
|
-
ref={(tabControl) =>
|
|
153
|
+
ref={(tabControl) => {
|
|
154
|
+
tabRefs.push(tabControl);
|
|
155
|
+
}}
|
|
154
156
|
onKeyDown={handleKeydown}
|
|
155
157
|
onClick={handleTabChange}
|
|
156
158
|
{...attributes}
|
|
@@ -136,7 +136,9 @@ function TabList({
|
|
|
136
136
|
tabIndex={selectedValue === value ? 0 : -1}
|
|
137
137
|
aria-selected={selectedValue === value}
|
|
138
138
|
key={value}
|
|
139
|
-
ref={(tabControl) =>
|
|
139
|
+
ref={(tabControl) => {
|
|
140
|
+
tabRefs.push(tabControl);
|
|
141
|
+
}}
|
|
140
142
|
onKeyDown={handleKeydown}
|
|
141
143
|
onClick={handleTabChange}
|
|
142
144
|
{...attributes}
|
|
@@ -173,7 +173,9 @@ function TabList({
|
|
|
173
173
|
tabIndex={selectedValue === value ? 0 : -1}
|
|
174
174
|
aria-selected={selectedValue === value}
|
|
175
175
|
key={value}
|
|
176
|
-
ref={(tabControl) =>
|
|
176
|
+
ref={(tabControl) => {
|
|
177
|
+
tabRefs.push(tabControl);
|
|
178
|
+
}}
|
|
177
179
|
onKeyDown={handleKeydown}
|
|
178
180
|
onFocus={handleTabChange}
|
|
179
181
|
onClick={(e) => handleTabChange(e)}
|
|
@@ -136,7 +136,9 @@ function TabList({
|
|
|
136
136
|
tabIndex={selectedValue === value ? 0 : -1}
|
|
137
137
|
aria-selected={selectedValue === value}
|
|
138
138
|
key={value}
|
|
139
|
-
ref={(tabControl) =>
|
|
139
|
+
ref={(tabControl) => {
|
|
140
|
+
tabRefs.push(tabControl);
|
|
141
|
+
}}
|
|
140
142
|
onKeyDown={handleKeydown}
|
|
141
143
|
onFocus={handleTabChange}
|
|
142
144
|
onClick={(e) => handleTabChange(e)}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
import React
|
|
8
|
+
import React from "react";
|
|
9
9
|
|
|
10
10
|
import BrowserOnly from "@docusaurus/BrowserOnly";
|
|
11
11
|
import Details from "@theme/Details";
|
|
@@ -72,14 +72,7 @@ const ParamsDetails: React.FC<Props> = (props) => {
|
|
|
72
72
|
return (
|
|
73
73
|
<BrowserOnly fallback={<SkeletonLoader size="sm" />}>
|
|
74
74
|
{() => {
|
|
75
|
-
|
|
76
|
-
Promise.resolve({ default: ParamsDetailsComponent })
|
|
77
|
-
);
|
|
78
|
-
return (
|
|
79
|
-
<Suspense fallback={null}>
|
|
80
|
-
<LazyComponent {...props} />
|
|
81
|
-
</Suspense>
|
|
82
|
-
);
|
|
75
|
+
return <ParamsDetailsComponent {...props} />;
|
|
83
76
|
}}
|
|
84
77
|
</BrowserOnly>
|
|
85
78
|
);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
import React
|
|
8
|
+
import React from "react";
|
|
9
9
|
|
|
10
10
|
import BrowserOnly from "@docusaurus/BrowserOnly";
|
|
11
11
|
import Details from "@theme/Details";
|
|
@@ -148,14 +148,7 @@ const RequestSchema: React.FC<Props> = (props) => {
|
|
|
148
148
|
return (
|
|
149
149
|
<BrowserOnly fallback={<SkeletonLoader size="sm" />}>
|
|
150
150
|
{() => {
|
|
151
|
-
|
|
152
|
-
Promise.resolve({ default: RequestSchemaComponent })
|
|
153
|
-
);
|
|
154
|
-
return (
|
|
155
|
-
<Suspense fallback={null}>
|
|
156
|
-
<LazyComponent {...props} />
|
|
157
|
-
</Suspense>
|
|
158
|
-
);
|
|
151
|
+
return <RequestSchemaComponent {...props} />;
|
|
159
152
|
}}
|
|
160
153
|
</BrowserOnly>
|
|
161
154
|
);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
import React
|
|
8
|
+
import React from "react";
|
|
9
9
|
|
|
10
10
|
import BrowserOnly from "@docusaurus/BrowserOnly";
|
|
11
11
|
import Details from "@theme/Details";
|
|
@@ -135,14 +135,7 @@ const ResponseSchema: React.FC<Props> = (props) => {
|
|
|
135
135
|
return (
|
|
136
136
|
<BrowserOnly fallback={<SkeletonLoader size="md" />}>
|
|
137
137
|
{() => {
|
|
138
|
-
|
|
139
|
-
Promise.resolve({ default: ResponseSchemaComponent })
|
|
140
|
-
);
|
|
141
|
-
return (
|
|
142
|
-
<Suspense fallback={null}>
|
|
143
|
-
<LazyComponent {...props} />
|
|
144
|
-
</Suspense>
|
|
145
|
-
);
|
|
138
|
+
return <ResponseSchemaComponent {...props} />;
|
|
146
139
|
}}
|
|
147
140
|
</BrowserOnly>
|
|
148
141
|
);
|
|
@@ -72,7 +72,9 @@ export default function SchemaItem(props: Props) {
|
|
|
72
72
|
enumDescriptions = transformEnumDescriptions(schema["x-enumDescriptions"]);
|
|
73
73
|
defaultValue = schema.default;
|
|
74
74
|
example = schema.example;
|
|
75
|
-
nullable =
|
|
75
|
+
nullable =
|
|
76
|
+
schema.nullable ||
|
|
77
|
+
(Array.isArray(schema.type) && schema.type.includes("null")); // support JSON Schema nullable
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
const renderRequired = guard(
|
|
@@ -142,7 +142,9 @@ function TabList({
|
|
|
142
142
|
tabIndex={selectedValue === value ? 0 : -1}
|
|
143
143
|
aria-selected={selectedValue === value}
|
|
144
144
|
key={value}
|
|
145
|
-
ref={(tabControl) =>
|
|
145
|
+
ref={(tabControl) => {
|
|
146
|
+
tabRefs.push(tabControl);
|
|
147
|
+
}}
|
|
146
148
|
onKeyDown={handleKeydown}
|
|
147
149
|
onClick={handleTabChange}
|
|
148
150
|
{...attributes}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/index.ts","./src/plugin-content-docs.d.ts","./src/postman-code-generators.d.ts","./src/react-magic-dropzone.d.ts","./src/theme-classic.d.ts","./src/theme-openapi.d.ts","./src/theme-translations.d.ts","./src/types.ts","./src/markdown/createDescription.ts","./src/markdown/schema.ts","./src/markdown/utils.test.ts","./src/markdown/utils.ts","./src/theme/ApiExplorer/buildPostmanRequest.ts","./src/theme/ApiExplorer/index.tsx","./src/theme/ApiExplorer/persistanceMiddleware.ts","./src/theme/ApiExplorer/postman-collection.d.ts","./src/theme/ApiExplorer/react-modal.d.ts","./src/theme/ApiExplorer/storage-utils.ts","./src/theme/ApiExplorer/Accept/index.tsx","./src/theme/ApiExplorer/Accept/slice.ts","./src/theme/ApiExplorer/ApiCodeBlock/index.tsx","./src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx","./src/theme/ApiExplorer/ApiCodeBlock/Content/Element.tsx","./src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx","./src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.tsx","./src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.tsx","./src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.tsx","./src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx","./src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.tsx","./src/theme/ApiExplorer/Authorization/auth-types.ts","./src/theme/ApiExplorer/Authorization/index.tsx","./src/theme/ApiExplorer/Authorization/slice.ts","./src/theme/ApiExplorer/Body/index.tsx","./src/theme/ApiExplorer/Body/slice.ts","./src/theme/ApiExplorer/CodeSnippets/code-snippets-types.ts","./src/theme/ApiExplorer/CodeSnippets/index.tsx","./src/theme/ApiExplorer/CodeSnippets/languages.ts","./src/theme/ApiExplorer/CodeTabs/index.tsx","./src/theme/ApiExplorer/ContentType/index.tsx","./src/theme/ApiExplorer/ContentType/slice.ts","./src/theme/ApiExplorer/Export/index.tsx","./src/theme/ApiExplorer/FloatingButton/index.tsx","./src/theme/ApiExplorer/FormFileUpload/index.tsx","./src/theme/ApiExplorer/FormItem/index.tsx","./src/theme/ApiExplorer/FormMultiSelect/index.tsx","./src/theme/ApiExplorer/FormSelect/index.tsx","./src/theme/ApiExplorer/FormTextInput/index.tsx","./src/theme/ApiExplorer/LiveEditor/index.tsx","./src/theme/ApiExplorer/MethodEndpoint/index.tsx","./src/theme/ApiExplorer/ParamOptions/index.tsx","./src/theme/ApiExplorer/ParamOptions/slice.ts","./src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx","./src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx","./src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx","./src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx","./src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx","./src/theme/ApiExplorer/Request/index.tsx","./src/theme/ApiExplorer/Request/makeRequest.ts","./src/theme/ApiExplorer/Response/index.tsx","./src/theme/ApiExplorer/Response/slice.ts","./src/theme/ApiExplorer/SecuritySchemes/index.tsx","./src/theme/ApiExplorer/Server/index.tsx","./src/theme/ApiExplorer/Server/slice.ts","./src/theme/ApiItem/hooks.ts","./src/theme/ApiItem/index.tsx","./src/theme/ApiItem/store.ts","./src/theme/ApiItem/Layout/index.tsx","./src/theme/ApiLogo/index.tsx","./src/theme/ApiTabs/index.tsx","./src/theme/ArrayBrackets/index.tsx","./src/theme/DiscriminatorTabs/index.tsx","./src/theme/MimeTabs/index.tsx","./src/theme/OperationTabs/index.tsx","./src/theme/ParamsDetails/index.tsx","./src/theme/ParamsItem/index.tsx","./src/theme/RequestSchema/index.tsx","./src/theme/ResponseExamples/index.tsx","./src/theme/ResponseHeaders/index.tsx","./src/theme/ResponseSamples/index.tsx","./src/theme/ResponseSchema/index.tsx","./src/theme/Schema/index.tsx","./src/theme/SchemaItem/index.tsx","./src/theme/SchemaTabs/index.tsx","./src/theme/SkeletonLoader/index.tsx","./src/theme/StatusCodes/index.tsx"],"version":"5.7.3"}
|