docusaurus-theme-openapi-docs 4.3.1 → 4.3.3
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 +23 -11
- 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 +25 -12
- 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/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 +1 -1
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +6 -2
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +6 -4
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +2 -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,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"}
|