docusaurus-theme-openapi-docs 0.0.0-1000
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/LICENSE +21 -0
- package/babel.config.js +35 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +81 -0
- package/lib/markdown/createDescription.d.ts +1 -0
- package/lib/markdown/createDescription.js +15 -0
- package/lib/markdown/schema.d.ts +3 -0
- package/lib/markdown/schema.js +149 -0
- package/lib/markdown/utils.d.ts +10 -0
- package/lib/markdown/utils.js +49 -0
- package/lib/markdown/utils.test.d.ts +1 -0
- package/lib/markdown/utils.test.js +43 -0
- package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Accept/index.js +38 -0
- package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
- package/lib/theme/ApiExplorer/Accept/slice.js +22 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.d.ts +4 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +35 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +41 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +153 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +147 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +58 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.d.ts +14 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +248 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +59 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +51 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +110 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.js +28 -0
- package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/index.js +160 -0
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
- package/lib/theme/ApiExplorer/Authorization/slice.js +102 -0
- package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/Body/index.js +381 -0
- package/lib/theme/ApiExplorer/Body/json2xml.js +43 -0
- package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
- package/lib/theme/ApiExplorer/Body/slice.js +97 -0
- package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.d.ts +21 -0
- package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.js +8 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +389 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.js +95 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +271 -0
- package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
- package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
- package/lib/theme/ApiExplorer/ContentType/slice.js +22 -0
- package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Export/index.js +57 -0
- package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
- package/lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +173 -0
- package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/FormItem/index.js +44 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
- package/lib/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
- package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
- package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.js +73 -0
- package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.js +168 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.js +86 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +220 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
- package/lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.js +223 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.js +25 -0
- package/lib/theme/ApiExplorer/Request/_Request.scss +129 -0
- package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Request/index.js +396 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.js +222 -0
- package/lib/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Response/index.js +193 -0
- package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
- package/lib/theme/ApiExplorer/Response/slice.js +51 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
- package/lib/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Server/index.js +199 -0
- package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
- package/lib/theme/ApiExplorer/Server/slice.js +33 -0
- package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
- package/lib/theme/ApiExplorer/buildPostmanRequest.js +465 -0
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +41 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.js +54 -0
- package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
- package/lib/theme/ApiExplorer/storage-utils.js +41 -0
- package/lib/theme/ApiItem/Layout/index.d.ts +3 -0
- package/lib/theme/ApiItem/Layout/index.js +121 -0
- package/lib/theme/ApiItem/Layout/styles.module.css +17 -0
- package/lib/theme/ApiItem/hooks.d.ts +12 -0
- package/lib/theme/ApiItem/hooks.js +13 -0
- package/lib/theme/ApiItem/index.d.ts +2 -0
- package/lib/theme/ApiItem/index.js +238 -0
- package/lib/theme/ApiItem/store.d.ts +46 -0
- package/lib/theme/ApiItem/store.js +53 -0
- package/lib/theme/ApiLogo/index.d.ts +2 -0
- package/lib/theme/ApiLogo/index.js +51 -0
- package/lib/theme/ApiTabs/_ApiTabs.scss +142 -0
- package/lib/theme/ApiTabs/index.d.ts +7 -0
- package/lib/theme/ApiTabs/index.js +270 -0
- package/lib/theme/ArrayBrackets/index.d.ts +3 -0
- package/lib/theme/ArrayBrackets/index.js +50 -0
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
- package/lib/theme/DiscriminatorTabs/index.d.ts +3 -0
- package/lib/theme/DiscriminatorTabs/index.js +258 -0
- package/lib/theme/Markdown/Details/_Details.scss +122 -0
- package/lib/theme/Markdown/index.js +179 -0
- package/lib/theme/MimeTabs/_MimeTabs.scss +70 -0
- package/lib/theme/MimeTabs/index.d.ts +6 -0
- package/lib/theme/MimeTabs/index.js +286 -0
- package/lib/theme/OperationTabs/_OperationTabs.scss +72 -0
- package/lib/theme/OperationTabs/index.d.ts +3 -0
- package/lib/theme/OperationTabs/index.js +248 -0
- package/lib/theme/ParamsDetails/index.d.ts +6 -0
- package/lib/theme/ParamsDetails/index.js +85 -0
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.d.ts +25 -0
- package/lib/theme/ParamsItem/index.js +218 -0
- package/lib/theme/RequestSchema/index.d.ts +15 -0
- package/lib/theme/RequestSchema/index.js +194 -0
- package/lib/theme/ResponseExamples/index.d.ts +18 -0
- package/lib/theme/ResponseExamples/index.js +193 -0
- package/lib/theme/ResponseHeaders/index.d.ts +13 -0
- package/lib/theme/ResponseHeaders/index.js +39 -0
- package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/lib/theme/ResponseSamples/index.d.ts +8 -0
- package/lib/theme/ResponseSamples/index.js +27 -0
- package/lib/theme/ResponseSchema/index.d.ts +15 -0
- package/lib/theme/ResponseSchema/index.js +159 -0
- package/lib/theme/Schema/index.d.ts +8 -0
- package/lib/theme/Schema/index.js +885 -0
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.d.ts +12 -0
- package/lib/theme/SchemaItem/index.js +213 -0
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +61 -0
- package/lib/theme/SchemaTabs/index.d.ts +3 -0
- package/lib/theme/SchemaTabs/index.js +255 -0
- package/lib/theme/SkeletonLoader/index.d.ts +6 -0
- package/lib/theme/SkeletonLoader/index.js +20 -0
- package/lib/theme/StatusCodes/index.d.ts +9 -0
- package/lib/theme/StatusCodes/index.js +81 -0
- package/lib/theme/styles.scss +212 -0
- package/lib/types.d.ts +157 -0
- package/lib/types.js +8 -0
- package/package.json +83 -0
- package/src/index.ts +85 -0
- package/src/markdown/createDescription.ts +13 -0
- package/src/markdown/schema.ts +181 -0
- package/src/markdown/utils.test.ts +49 -0
- package/src/markdown/utils.ts +59 -0
- package/src/plugin-content-docs.d.ts +20 -0
- package/src/postman-code-generators.d.ts +9 -0
- package/src/react-magic-dropzone.d.ts +9 -0
- package/src/theme/ApiExplorer/Accept/index.tsx +36 -0
- package/src/theme/ApiExplorer/Accept/slice.ts +29 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx +32 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.tsx +34 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx +134 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.tsx +79 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.tsx +55 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.tsx +166 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx +48 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.tsx +54 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/index.tsx +45 -0
- package/src/theme/ApiExplorer/Authorization/auth-types.ts +30 -0
- package/src/theme/ApiExplorer/Authorization/index.tsx +158 -0
- package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
- package/src/theme/ApiExplorer/Body/index.tsx +376 -0
- package/src/theme/ApiExplorer/Body/json2xml.js +43 -0
- package/src/theme/ApiExplorer/Body/slice.ts +133 -0
- package/src/theme/ApiExplorer/CodeSnippets/code-snippets-types.ts +57 -0
- package/src/theme/ApiExplorer/CodeSnippets/index.tsx +338 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.ts +96 -0
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +248 -0
- package/src/theme/ApiExplorer/ContentType/index.tsx +38 -0
- package/src/theme/ApiExplorer/ContentType/slice.ts +29 -0
- package/src/theme/ApiExplorer/Export/index.tsx +47 -0
- package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
- package/src/theme/ApiExplorer/FloatingButton/index.tsx +29 -0
- package/src/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
- package/src/theme/ApiExplorer/FormFileUpload/index.tsx +119 -0
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/ApiExplorer/FormItem/index.tsx +33 -0
- package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/src/theme/ApiExplorer/FormMultiSelect/index.tsx +57 -0
- package/src/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
- package/src/theme/ApiExplorer/FormSelect/index.tsx +38 -0
- package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
- package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +114 -0
- package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +91 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +175 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
- package/src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
- package/src/theme/ApiExplorer/ParamOptions/index.tsx +146 -0
- package/src/theme/ApiExplorer/ParamOptions/slice.ts +37 -0
- package/src/theme/ApiExplorer/Request/_Request.scss +129 -0
- package/src/theme/ApiExplorer/Request/index.tsx +309 -0
- package/src/theme/ApiExplorer/Request/makeRequest.ts +254 -0
- package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/src/theme/ApiExplorer/Response/index.tsx +157 -0
- package/src/theme/ApiExplorer/Response/slice.ts +52 -0
- package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +287 -0
- package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/src/theme/ApiExplorer/Server/index.tsx +130 -0
- package/src/theme/ApiExplorer/Server/slice.ts +39 -0
- package/src/theme/ApiExplorer/buildPostmanRequest.ts +526 -0
- package/src/theme/ApiExplorer/index.tsx +41 -0
- package/src/theme/ApiExplorer/persistanceMiddleware.ts +71 -0
- package/src/theme/ApiExplorer/postman-collection.d.ts +10 -0
- package/src/theme/ApiExplorer/react-modal.d.ts +8 -0
- package/src/theme/ApiExplorer/storage-utils.ts +39 -0
- package/src/theme/ApiItem/Layout/index.tsx +85 -0
- package/src/theme/ApiItem/Layout/styles.module.css +17 -0
- package/src/theme/ApiItem/hooks.ts +13 -0
- package/src/theme/ApiItem/index.tsx +222 -0
- package/src/theme/ApiItem/store.ts +51 -0
- package/src/theme/ApiLogo/index.tsx +52 -0
- package/src/theme/ApiTabs/_ApiTabs.scss +142 -0
- package/src/theme/ApiTabs/index.tsx +238 -0
- package/src/theme/ArrayBrackets/index.tsx +37 -0
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
- package/src/theme/DiscriminatorTabs/index.tsx +229 -0
- package/src/theme/Markdown/Details/_Details.scss +122 -0
- package/src/theme/Markdown/index.js +179 -0
- package/src/theme/MimeTabs/_MimeTabs.scss +70 -0
- package/src/theme/MimeTabs/index.tsx +257 -0
- package/src/theme/OperationTabs/_OperationTabs.scss +72 -0
- package/src/theme/OperationTabs/index.tsx +220 -0
- package/src/theme/ParamsDetails/index.tsx +81 -0
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.tsx +205 -0
- package/src/theme/RequestSchema/index.tsx +157 -0
- package/src/theme/ResponseExamples/index.tsx +192 -0
- package/src/theme/ResponseHeaders/index.tsx +49 -0
- package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/src/theme/ResponseSamples/index.tsx +31 -0
- package/src/theme/ResponseSchema/index.tsx +144 -0
- package/src/theme/Schema/index.tsx +939 -0
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.tsx +198 -0
- package/src/theme/SchemaTabs/_SchemaTabs.scss +61 -0
- package/src/theme/SchemaTabs/index.tsx +224 -0
- package/src/theme/SkeletonLoader/index.tsx +18 -0
- package/src/theme/StatusCodes/index.tsx +72 -0
- package/src/theme/styles.scss +212 -0
- package/src/theme-classic.d.ts +80 -0
- package/src/theme-openapi.d.ts +288 -0
- package/src/theme-translations.d.ts +9 -0
- package/src/types.ts +182 -0
- package/tsconfig.json +16 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,220 @@
|
|
|
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
|
+
import React, {
|
|
9
|
+
cloneElement,
|
|
10
|
+
useEffect,
|
|
11
|
+
useState,
|
|
12
|
+
useRef,
|
|
13
|
+
ReactElement,
|
|
14
|
+
} from "react";
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
sanitizeTabsChildren,
|
|
18
|
+
TabProps,
|
|
19
|
+
useScrollPositionBlocker,
|
|
20
|
+
useTabs,
|
|
21
|
+
} from "@docusaurus/theme-common/internal";
|
|
22
|
+
import { TabItemProps } from "@docusaurus/theme-common/lib/utils/tabsUtils";
|
|
23
|
+
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
24
|
+
import clsx from "clsx";
|
|
25
|
+
|
|
26
|
+
function TabList({
|
|
27
|
+
className,
|
|
28
|
+
block,
|
|
29
|
+
selectedValue,
|
|
30
|
+
selectValue,
|
|
31
|
+
tabValues,
|
|
32
|
+
}: TabProps & ReturnType<typeof useTabs>) {
|
|
33
|
+
const tabRefs: (HTMLLIElement | null)[] = [];
|
|
34
|
+
const { blockElementScrollPositionUntilNextRender } =
|
|
35
|
+
useScrollPositionBlocker();
|
|
36
|
+
|
|
37
|
+
const handleTabChange = (
|
|
38
|
+
event:
|
|
39
|
+
| React.FocusEvent<HTMLLIElement>
|
|
40
|
+
| React.MouseEvent<HTMLLIElement>
|
|
41
|
+
| React.KeyboardEvent<HTMLLIElement>
|
|
42
|
+
) => {
|
|
43
|
+
const newTab = event.currentTarget;
|
|
44
|
+
const newTabIndex = tabRefs.indexOf(newTab);
|
|
45
|
+
const newTabValue = tabValues[newTabIndex].value;
|
|
46
|
+
|
|
47
|
+
if (newTabValue !== selectedValue) {
|
|
48
|
+
blockElementScrollPositionUntilNextRender(newTab);
|
|
49
|
+
selectValue(newTabValue);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const handleKeydown = (event: React.KeyboardEvent<HTMLLIElement>) => {
|
|
54
|
+
let focusElement: HTMLLIElement | null = null;
|
|
55
|
+
|
|
56
|
+
switch (event.key) {
|
|
57
|
+
case "Enter": {
|
|
58
|
+
handleTabChange(event);
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case "ArrowRight": {
|
|
62
|
+
const nextTab = tabRefs.indexOf(event.currentTarget) + 1;
|
|
63
|
+
focusElement = tabRefs[nextTab] ?? tabRefs[0]!;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case "ArrowLeft": {
|
|
67
|
+
const prevTab = tabRefs.indexOf(event.currentTarget) - 1;
|
|
68
|
+
focusElement = tabRefs[prevTab] ?? tabRefs[tabRefs.length - 1]!;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
default:
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
focusElement?.focus();
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const tabItemListContainerRef = useRef<HTMLUListElement>(null);
|
|
79
|
+
const [showTabArrows, setShowTabArrows] = useState<boolean>(false);
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
83
|
+
for (let entry of entries) {
|
|
84
|
+
requestAnimationFrame(() => {
|
|
85
|
+
if (entry.target.clientWidth < entry.target.scrollWidth) {
|
|
86
|
+
setShowTabArrows(true);
|
|
87
|
+
} else {
|
|
88
|
+
setShowTabArrows(false);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
resizeObserver.observe(tabItemListContainerRef.current!);
|
|
95
|
+
|
|
96
|
+
return () => {
|
|
97
|
+
resizeObserver.disconnect();
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
100
|
+
|
|
101
|
+
const handleRightClick = () => {
|
|
102
|
+
tabItemListContainerRef.current!.scrollLeft += 90;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const handleLeftClick = () => {
|
|
106
|
+
tabItemListContainerRef.current!.scrollLeft -= 90;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<div className="tabs__container">
|
|
111
|
+
<div className="openapi-tabs__operation-container">
|
|
112
|
+
{showTabArrows && (
|
|
113
|
+
<button
|
|
114
|
+
className={clsx("openapi-tabs__arrow", "left")}
|
|
115
|
+
onClick={handleLeftClick}
|
|
116
|
+
/>
|
|
117
|
+
)}
|
|
118
|
+
<ul
|
|
119
|
+
ref={tabItemListContainerRef}
|
|
120
|
+
role="tablist"
|
|
121
|
+
aria-orientation="horizontal"
|
|
122
|
+
className={clsx(
|
|
123
|
+
"openapi-tabs__operation-list-container",
|
|
124
|
+
"tabs",
|
|
125
|
+
{
|
|
126
|
+
"tabs--block": block,
|
|
127
|
+
},
|
|
128
|
+
className
|
|
129
|
+
)}
|
|
130
|
+
>
|
|
131
|
+
{tabValues.map(({ value, label, attributes }) => {
|
|
132
|
+
return (
|
|
133
|
+
<li
|
|
134
|
+
// TODO extract TabListItem
|
|
135
|
+
role="tab"
|
|
136
|
+
tabIndex={selectedValue === value ? 0 : -1}
|
|
137
|
+
aria-selected={selectedValue === value}
|
|
138
|
+
key={value}
|
|
139
|
+
ref={(tabControl) => {
|
|
140
|
+
tabRefs.push(tabControl);
|
|
141
|
+
}}
|
|
142
|
+
onKeyDown={handleKeydown}
|
|
143
|
+
onFocus={handleTabChange}
|
|
144
|
+
onClick={(e) => handleTabChange(e)}
|
|
145
|
+
{...attributes}
|
|
146
|
+
className={clsx(
|
|
147
|
+
"tabs__item",
|
|
148
|
+
"openapi-tabs__operation-item",
|
|
149
|
+
attributes?.className as string,
|
|
150
|
+
{
|
|
151
|
+
active: selectedValue === value,
|
|
152
|
+
}
|
|
153
|
+
)}
|
|
154
|
+
>
|
|
155
|
+
{label ?? value}
|
|
156
|
+
</li>
|
|
157
|
+
);
|
|
158
|
+
})}
|
|
159
|
+
</ul>
|
|
160
|
+
{showTabArrows && (
|
|
161
|
+
<button
|
|
162
|
+
className={clsx("openapi-tabs__arrow", "right")}
|
|
163
|
+
onClick={handleRightClick}
|
|
164
|
+
/>
|
|
165
|
+
)}
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
function TabContent({
|
|
171
|
+
lazy,
|
|
172
|
+
children,
|
|
173
|
+
selectedValue,
|
|
174
|
+
}: TabProps & ReturnType<typeof useTabs>): React.JSX.Element | null {
|
|
175
|
+
const childTabs = (Array.isArray(children) ? children : [children]).filter(
|
|
176
|
+
Boolean
|
|
177
|
+
) as ReactElement<TabItemProps>[];
|
|
178
|
+
if (lazy) {
|
|
179
|
+
const selectedTabItem = childTabs.find(
|
|
180
|
+
(tabItem) => tabItem.props.value === selectedValue
|
|
181
|
+
);
|
|
182
|
+
if (!selectedTabItem) {
|
|
183
|
+
// fail-safe or fail-fast? not sure what's best here
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
return cloneElement(selectedTabItem, { className: "margin-top--md" });
|
|
187
|
+
}
|
|
188
|
+
return (
|
|
189
|
+
<div className="margin-top--md">
|
|
190
|
+
{childTabs.map((tabItem, i) =>
|
|
191
|
+
cloneElement(tabItem, {
|
|
192
|
+
key: i,
|
|
193
|
+
hidden: tabItem.props.value !== selectedValue,
|
|
194
|
+
})
|
|
195
|
+
)}
|
|
196
|
+
</div>
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
function TabsComponent(props: TabProps): React.JSX.Element {
|
|
200
|
+
const tabs = useTabs(props);
|
|
201
|
+
return (
|
|
202
|
+
<div className="tabs-container">
|
|
203
|
+
<TabList {...props} {...tabs} />
|
|
204
|
+
<TabContent {...props} {...tabs} />
|
|
205
|
+
</div>
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
export default function OperationTabs(props: TabProps): React.JSX.Element {
|
|
209
|
+
const isBrowser = useIsBrowser();
|
|
210
|
+
return (
|
|
211
|
+
<TabsComponent
|
|
212
|
+
// Remount tabs after hydration
|
|
213
|
+
// Temporary fix for https://github.com/facebook/docusaurus/issues/5653
|
|
214
|
+
key={String(isBrowser)}
|
|
215
|
+
{...props}
|
|
216
|
+
>
|
|
217
|
+
{sanitizeTabsChildren(props.children)}
|
|
218
|
+
</TabsComponent>
|
|
219
|
+
);
|
|
220
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import BrowserOnly from "@docusaurus/BrowserOnly";
|
|
11
|
+
import Details from "@theme/Details";
|
|
12
|
+
import ParamsItem from "@theme/ParamsItem";
|
|
13
|
+
import SkeletonLoader from "@theme/SkeletonLoader";
|
|
14
|
+
|
|
15
|
+
interface Props {
|
|
16
|
+
parameters: any[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const ParamsDetailsComponent: React.FC<Props> = ({ parameters }) => {
|
|
20
|
+
const types = ["path", "query", "header", "cookie"];
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<>
|
|
24
|
+
{types.map((type) => {
|
|
25
|
+
const params = parameters?.filter((param: any) => param?.in === type);
|
|
26
|
+
|
|
27
|
+
if (!params || params.length === 0) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const summaryElement = (
|
|
32
|
+
<summary>
|
|
33
|
+
<h3 className="openapi-markdown__details-summary-header-params">
|
|
34
|
+
{`${type.charAt(0).toUpperCase() + type.slice(1)} Parameters`}
|
|
35
|
+
</h3>
|
|
36
|
+
</summary>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Details
|
|
41
|
+
key={type}
|
|
42
|
+
className="openapi-markdown__details"
|
|
43
|
+
style={{ marginBottom: "1rem" }}
|
|
44
|
+
data-collapsed={false}
|
|
45
|
+
open={true}
|
|
46
|
+
summary={summaryElement}
|
|
47
|
+
>
|
|
48
|
+
<ul>
|
|
49
|
+
{params.map((param: any, index: number) => (
|
|
50
|
+
<ParamsItem
|
|
51
|
+
key={index}
|
|
52
|
+
className="paramsItem"
|
|
53
|
+
param={{
|
|
54
|
+
...param,
|
|
55
|
+
enumDescriptions: Object.entries(
|
|
56
|
+
param?.schema?.["x-enumDescriptions"] ??
|
|
57
|
+
param?.schema?.items?.["x-enumDescriptions"] ??
|
|
58
|
+
{}
|
|
59
|
+
),
|
|
60
|
+
}}
|
|
61
|
+
/>
|
|
62
|
+
))}
|
|
63
|
+
</ul>
|
|
64
|
+
</Details>
|
|
65
|
+
);
|
|
66
|
+
})}
|
|
67
|
+
</>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const ParamsDetails: React.FC<Props> = (props) => {
|
|
72
|
+
return (
|
|
73
|
+
<BrowserOnly fallback={<SkeletonLoader size="sm" />}>
|
|
74
|
+
{() => {
|
|
75
|
+
return <ParamsDetailsComponent {...props} />;
|
|
76
|
+
}}
|
|
77
|
+
</BrowserOnly>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default ParamsDetails;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.openapi-params__list-item {
|
|
2
|
+
margin: 0 0 0 1rem !important;
|
|
3
|
+
position: relative;
|
|
4
|
+
padding-left: 1rem;
|
|
5
|
+
border-left: thin solid var(--openapi-tree-line-color) !important;
|
|
6
|
+
margin-top: unset !important;
|
|
7
|
+
|
|
8
|
+
// Horizonal line styling for param attributes
|
|
9
|
+
&::before {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 5px;
|
|
12
|
+
left: 0;
|
|
13
|
+
width: 0.7rem;
|
|
14
|
+
/* width of horizontal line */
|
|
15
|
+
height: 0.5rem;
|
|
16
|
+
/* vertical position of line */
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
border-bottom: thin solid var(--openapi-tree-line-color);
|
|
19
|
+
content: "";
|
|
20
|
+
display: inline-block;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
.openapi-schema__property {
|
|
25
|
+
color: var(--ifm-color-primary);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.openapi-schema__type {
|
|
31
|
+
opacity: 0.6;
|
|
32
|
+
padding-left: 0.3rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.openapi-schema__required {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
font-size: 10.5px;
|
|
39
|
+
font-weight: bold;
|
|
40
|
+
color: var(--openapi-required);
|
|
41
|
+
margin-left: 1%;
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
text-transform: uppercase;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.openapi-schema__divider {
|
|
47
|
+
flex-grow: 1;
|
|
48
|
+
border-bottom: thin solid var(--ifm-toc-border-color);
|
|
49
|
+
margin: 10px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.openapi-schema__container {
|
|
53
|
+
display: flex;
|
|
54
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
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
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import Markdown from "@theme/Markdown";
|
|
11
|
+
import SchemaTabs from "@theme/SchemaTabs";
|
|
12
|
+
import TabItem from "@theme/TabItem";
|
|
13
|
+
/* eslint-disable import/no-extraneous-dependencies*/
|
|
14
|
+
import clsx from "clsx";
|
|
15
|
+
|
|
16
|
+
import { getQualifierMessage, getSchemaName } from "../../markdown/schema";
|
|
17
|
+
import { guard, toString } from "../../markdown/utils";
|
|
18
|
+
|
|
19
|
+
interface Map<T> {
|
|
20
|
+
[key: string]: T;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ExampleObject {
|
|
24
|
+
summary?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
value?: any;
|
|
27
|
+
externalValue?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface Props {
|
|
31
|
+
className: string;
|
|
32
|
+
param: {
|
|
33
|
+
description: string;
|
|
34
|
+
example: any;
|
|
35
|
+
examples: Map<ExampleObject>;
|
|
36
|
+
name: string;
|
|
37
|
+
required: boolean;
|
|
38
|
+
deprecated: boolean;
|
|
39
|
+
schema: any;
|
|
40
|
+
enumDescriptions?: [string, string][];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const getEnumDescriptionMarkdown = (enumDescriptions?: [string, string][]) => {
|
|
45
|
+
if (enumDescriptions?.length) {
|
|
46
|
+
return `| Enum Value | Description |
|
|
47
|
+
| ---- | ----- |
|
|
48
|
+
${enumDescriptions
|
|
49
|
+
.map((desc) => {
|
|
50
|
+
return `| ${desc[0]} | ${desc[1]} | `.replaceAll("\n", "<br/>");
|
|
51
|
+
})
|
|
52
|
+
.join("\n")}
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return "";
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
function ParamsItem({ param, ...rest }: Props) {
|
|
60
|
+
const {
|
|
61
|
+
description,
|
|
62
|
+
example,
|
|
63
|
+
examples,
|
|
64
|
+
name,
|
|
65
|
+
required,
|
|
66
|
+
deprecated,
|
|
67
|
+
enumDescriptions,
|
|
68
|
+
} = param;
|
|
69
|
+
|
|
70
|
+
let schema = param.schema;
|
|
71
|
+
let defaultValue: string | undefined;
|
|
72
|
+
|
|
73
|
+
if (!schema) {
|
|
74
|
+
schema = { type: "any" };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!schema.type) {
|
|
78
|
+
schema.type = "any";
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (schema) {
|
|
82
|
+
if (schema.items) {
|
|
83
|
+
defaultValue = schema.items.default;
|
|
84
|
+
} else {
|
|
85
|
+
defaultValue = schema.default;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const renderSchemaName = guard(schema, (schema) => (
|
|
90
|
+
<span className="openapi-schema__type"> {getSchemaName(schema)}</span>
|
|
91
|
+
));
|
|
92
|
+
|
|
93
|
+
const renderSchemaRequired = guard(required, () => (
|
|
94
|
+
<span className="openapi-schema__required">required</span>
|
|
95
|
+
));
|
|
96
|
+
|
|
97
|
+
const renderDeprecated = guard(deprecated, () => (
|
|
98
|
+
<span className="openapi-schema__deprecated">deprecated</span>
|
|
99
|
+
));
|
|
100
|
+
|
|
101
|
+
const renderQualifier = guard(getQualifierMessage(schema), (qualifier) => (
|
|
102
|
+
<Markdown>{qualifier}</Markdown>
|
|
103
|
+
));
|
|
104
|
+
|
|
105
|
+
const renderDescription = guard(description, (description) => (
|
|
106
|
+
<Markdown>{description}</Markdown>
|
|
107
|
+
));
|
|
108
|
+
|
|
109
|
+
const renderEnumDescriptions = guard(
|
|
110
|
+
getEnumDescriptionMarkdown(enumDescriptions),
|
|
111
|
+
(value) => {
|
|
112
|
+
return (
|
|
113
|
+
<div style={{ marginTop: ".5rem" }}>
|
|
114
|
+
<Markdown>{value}</Markdown>
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
function renderDefaultValue() {
|
|
121
|
+
if (defaultValue !== undefined) {
|
|
122
|
+
if (typeof defaultValue === "string") {
|
|
123
|
+
return (
|
|
124
|
+
<div>
|
|
125
|
+
<strong>Default value: </strong>
|
|
126
|
+
<span>
|
|
127
|
+
<code>{defaultValue}</code>
|
|
128
|
+
</span>
|
|
129
|
+
</div>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
return (
|
|
133
|
+
<div>
|
|
134
|
+
<strong>Default value: </strong>
|
|
135
|
+
<span>
|
|
136
|
+
<code>{JSON.stringify(defaultValue)}</code>
|
|
137
|
+
</span>
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const renderExample = guard(toString(example), (example) => (
|
|
145
|
+
<div>
|
|
146
|
+
<strong>Example: </strong>
|
|
147
|
+
{example}
|
|
148
|
+
</div>
|
|
149
|
+
));
|
|
150
|
+
|
|
151
|
+
const renderExamples = guard(examples, (examples) => {
|
|
152
|
+
const exampleEntries = Object.entries(examples);
|
|
153
|
+
return (
|
|
154
|
+
<>
|
|
155
|
+
<strong>Examples:</strong>
|
|
156
|
+
<SchemaTabs>
|
|
157
|
+
{exampleEntries.map(([exampleName, exampleProperties]) => (
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
<TabItem value={exampleName} label={exampleName}>
|
|
160
|
+
{exampleProperties.summary && <p>{exampleProperties.summary}</p>}
|
|
161
|
+
{exampleProperties.description && (
|
|
162
|
+
<p>
|
|
163
|
+
<strong>Description: </strong>
|
|
164
|
+
<span>{exampleProperties.description}</span>
|
|
165
|
+
</p>
|
|
166
|
+
)}
|
|
167
|
+
<p>
|
|
168
|
+
<strong>Example: </strong>
|
|
169
|
+
<code>{exampleProperties.value}</code>
|
|
170
|
+
</p>
|
|
171
|
+
</TabItem>
|
|
172
|
+
))}
|
|
173
|
+
</SchemaTabs>
|
|
174
|
+
</>
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
return (
|
|
179
|
+
<div className="openapi-params__list-item">
|
|
180
|
+
<span className="openapi-schema__container">
|
|
181
|
+
<strong
|
|
182
|
+
className={clsx("openapi-schema__property", {
|
|
183
|
+
"openapi-schema__strikethrough": deprecated,
|
|
184
|
+
})}
|
|
185
|
+
>
|
|
186
|
+
{name}
|
|
187
|
+
</strong>
|
|
188
|
+
{renderSchemaName}
|
|
189
|
+
{(required || deprecated) && (
|
|
190
|
+
<span className="openapi-schema__divider"></span>
|
|
191
|
+
)}
|
|
192
|
+
{renderSchemaRequired}
|
|
193
|
+
{renderDeprecated}
|
|
194
|
+
</span>
|
|
195
|
+
{renderQualifier}
|
|
196
|
+
{renderDescription}
|
|
197
|
+
{renderEnumDescriptions}
|
|
198
|
+
{renderDefaultValue()}
|
|
199
|
+
{renderExample}
|
|
200
|
+
{renderExamples}
|
|
201
|
+
</div>
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export default ParamsItem;
|