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,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* Copyright (c) Palo Alto Networks
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
* ========================================================================== */
|
|
8
|
+
var __importDefault =
|
|
9
|
+
(this && this.__importDefault) ||
|
|
10
|
+
function (mod) {
|
|
11
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
const react_1 = __importDefault(require("react"));
|
|
15
|
+
const ApiTabs_1 = __importDefault(require("@theme/ApiTabs"));
|
|
16
|
+
const Details_1 = __importDefault(require("@theme/Details"));
|
|
17
|
+
const Markdown_1 = __importDefault(require("@theme/Markdown"));
|
|
18
|
+
const ResponseHeaders_1 = __importDefault(require("@theme/ResponseHeaders"));
|
|
19
|
+
const ResponseSchema_1 = __importDefault(require("@theme/ResponseSchema"));
|
|
20
|
+
const TabItem_1 = __importDefault(require("@theme/TabItem"));
|
|
21
|
+
const StatusCodes = ({ label, id, responses }) => {
|
|
22
|
+
if (!responses) return null;
|
|
23
|
+
const codes = Object.keys(responses);
|
|
24
|
+
if (codes.length === 0) return null;
|
|
25
|
+
return react_1.default.createElement(
|
|
26
|
+
ApiTabs_1.default,
|
|
27
|
+
{ label: label, id: id },
|
|
28
|
+
codes.map((code) => {
|
|
29
|
+
const response = responses[code];
|
|
30
|
+
const responseHeaders = response.headers;
|
|
31
|
+
return (
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
react_1.default.createElement(
|
|
34
|
+
TabItem_1.default,
|
|
35
|
+
{ key: code, label: code, value: code },
|
|
36
|
+
react_1.default.createElement(
|
|
37
|
+
"div",
|
|
38
|
+
null,
|
|
39
|
+
response.description &&
|
|
40
|
+
react_1.default.createElement(
|
|
41
|
+
"div",
|
|
42
|
+
{ style: { marginTop: ".5rem", marginBottom: ".5rem" } },
|
|
43
|
+
react_1.default.createElement(
|
|
44
|
+
Markdown_1.default,
|
|
45
|
+
null,
|
|
46
|
+
response.description
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
),
|
|
50
|
+
responseHeaders &&
|
|
51
|
+
react_1.default.createElement(
|
|
52
|
+
Details_1.default,
|
|
53
|
+
{
|
|
54
|
+
className: "openapi-markdown__details",
|
|
55
|
+
"data-collapsed": true,
|
|
56
|
+
open: false,
|
|
57
|
+
style: { textAlign: "left", marginBottom: "1rem" },
|
|
58
|
+
summary: react_1.default.createElement(
|
|
59
|
+
"summary",
|
|
60
|
+
null,
|
|
61
|
+
react_1.default.createElement(
|
|
62
|
+
"strong",
|
|
63
|
+
null,
|
|
64
|
+
"Response Headers"
|
|
65
|
+
)
|
|
66
|
+
),
|
|
67
|
+
},
|
|
68
|
+
react_1.default.createElement(ResponseHeaders_1.default, {
|
|
69
|
+
responseHeaders: responseHeaders,
|
|
70
|
+
})
|
|
71
|
+
),
|
|
72
|
+
react_1.default.createElement(ResponseSchema_1.default, {
|
|
73
|
+
title: "Schema",
|
|
74
|
+
body: { content: response.content },
|
|
75
|
+
})
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
})
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
exports.default = StatusCodes;
|
|
@@ -0,0 +1,212 @@
|
|
|
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
|
+
/* API Demo Panel */
|
|
8
|
+
@use "./ApiExplorer/CodeTabs/CodeTabs";
|
|
9
|
+
@use "./ApiExplorer/FloatingButton/FloatingButton";
|
|
10
|
+
@use "./ApiExplorer/FormFileUpload/FormFileUpload";
|
|
11
|
+
@use "./ApiExplorer/FormItem/FormItem";
|
|
12
|
+
@use "./ApiExplorer/FormMultiSelect/FormMultiSelect";
|
|
13
|
+
@use "./ApiExplorer/FormSelect/FormSelect";
|
|
14
|
+
@use "./ApiExplorer/FormTextInput/FormTextInput";
|
|
15
|
+
@use "./ApiExplorer/LiveEditor/LiveEditor";
|
|
16
|
+
@use "./ApiExplorer/MethodEndpoint/MethodEndpoint";
|
|
17
|
+
@use "./ApiExplorer/ParamOptions/ParamOptions";
|
|
18
|
+
@use "./ApiExplorer/Request/Request";
|
|
19
|
+
@use "./ApiExplorer/Response/Response";
|
|
20
|
+
@use "./ApiExplorer/Server/Server";
|
|
21
|
+
|
|
22
|
+
/* Api Demo Panel / ApiCodeBlock */
|
|
23
|
+
@use "./ApiExplorer/ApiCodeBlock/Container/Container";
|
|
24
|
+
@use "./ApiExplorer/ApiCodeBlock/Content/Content";
|
|
25
|
+
@use "./ApiExplorer/ApiCodeBlock/CopyButton/CopyButton";
|
|
26
|
+
@use "./ApiExplorer/ApiCodeBlock/ExitButton/ExitButton";
|
|
27
|
+
@use "./ApiExplorer/ApiCodeBlock/ExpandButton/ExpandButton";
|
|
28
|
+
@use "./ApiExplorer/ApiCodeBlock/Line/Line";
|
|
29
|
+
@use "./ApiExplorer/ApiCodeBlock/WordWrapButton/WordWrapButton";
|
|
30
|
+
|
|
31
|
+
/* Schema Styling */
|
|
32
|
+
@use "./ParamsItem/ParamsItem";
|
|
33
|
+
@use "./SchemaItem/SchemaItem";
|
|
34
|
+
/* Tabs Styling */
|
|
35
|
+
@use "./ApiTabs/ApiTabs";
|
|
36
|
+
@use "./DiscriminatorTabs/DiscriminatorTabs";
|
|
37
|
+
@use "./MimeTabs/MimeTabs";
|
|
38
|
+
@use "./SchemaTabs/SchemaTabs";
|
|
39
|
+
@use "./OperationTabs/OperationTabs";
|
|
40
|
+
/* Code Samples */
|
|
41
|
+
@use "./ResponseSamples/ResponseSamples";
|
|
42
|
+
/* Markdown Styling */
|
|
43
|
+
@use "./Markdown/Details/Details";
|
|
44
|
+
|
|
45
|
+
:root {
|
|
46
|
+
--openapi-required: var(--ifm-color-danger);
|
|
47
|
+
--openapi-deprecated: var(--ifm-color-warning);
|
|
48
|
+
--openapi-nullable: var(--ifm-color-info);
|
|
49
|
+
--openapi-code-blue: var(--ifm-color-info);
|
|
50
|
+
--openapi-code-red: var(--ifm-color-danger);
|
|
51
|
+
--openapi-code-orange: var(--ifm-color-warning);
|
|
52
|
+
--openapi-code-green: var(--ifm-color-success);
|
|
53
|
+
--openapi-card-background-color: var(--ifm-color-gray-100);
|
|
54
|
+
--openapi-card-border-radius: var(--ifm-pre-border-radius);
|
|
55
|
+
--openapi-input-border: var(--ifm-color-primary);
|
|
56
|
+
--openapi-input-background: var(--openapi-card-background-color);
|
|
57
|
+
--openapi-tree-line-color: var(--ifm-toc-border-color);
|
|
58
|
+
--openapi-code-tab-border-color: var(--ifm-toc-border-color);
|
|
59
|
+
--openapi-code-tab-border-color-python: #ffdb50;
|
|
60
|
+
--openapi-code-tab-border-color-bash: var(--ifm-color-danger);
|
|
61
|
+
--openapi-code-tab-border-color-go: var(--ifm-color-info);
|
|
62
|
+
--openapi-code-tab-border-color-js: var(--ifm-color-warning);
|
|
63
|
+
--openapi-code-tab-border-color-ruby: var(--ifm-color-danger);
|
|
64
|
+
--openapi-code-tab-border-color-csharp: #9b4f96;
|
|
65
|
+
--openapi-code-tab-border-color-nodejs: var(--ifm-color-success);
|
|
66
|
+
--openapi-code-tab-border-color-php: #6181b6;
|
|
67
|
+
--openapi-code-tab-border-color-java: #0374bd;
|
|
68
|
+
--openapi-code-tab-border-color-powershell: #00adef;
|
|
69
|
+
--openapi-code-tab-shadow-color-python: rgba(255, 219, 80, 0.25);
|
|
70
|
+
--openapi-code-tab-shadow-color-bash: rgba(250, 56, 62, 0.25);
|
|
71
|
+
--openapi-code-tab-shadow-color-go: rgba(84, 199, 236, 0.25);
|
|
72
|
+
--openapi-code-tab-shadow-color-js: rgba(255, 186, 0, 0.25);
|
|
73
|
+
--openapi-code-tab-shadow-color-ruby: rgba(250, 56, 62, 0.25);
|
|
74
|
+
--openapi-code-tab-shadow-color-csharp: rgba(155, 79, 150, 0.25);
|
|
75
|
+
--opeanpi-code-tab-shadow-color-nodejs: rgba(0, 164, 0, 0.25);
|
|
76
|
+
--openapi-code-tab-shadow-color-php: rgba(97, 129, 182, 0.25);
|
|
77
|
+
--openapi-code-tab-shadow-color-java: rgba(3, 116, 189, 0.25);
|
|
78
|
+
--opeanpi-code-tab-shadow-color-powershell: rgba(3, 116, 189, 0.25);
|
|
79
|
+
--openapi-explorer-font-size-input: 12px;
|
|
80
|
+
--openapi-explorer-font-size-code: 12px;
|
|
81
|
+
--openapi-explorer-padding-input: 0.5rem;
|
|
82
|
+
--openapi-explorer-border-color: var(--ifm-toc-border-color);
|
|
83
|
+
--openapi-explorer-caret-bg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>');
|
|
84
|
+
--openapi-skeleton-background: var(--ifm-color-emphasis-100);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[data-theme="dark"] {
|
|
88
|
+
--openapi-card-background-color: var(--ifm-color-gray-900) !important;
|
|
89
|
+
--openapi-explorer-caret-bg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24" fill="white"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>') !important;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.docs-wrapper {
|
|
93
|
+
height: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// @media (min-width: 997px) {
|
|
97
|
+
// .docItemCol {
|
|
98
|
+
// max-width: 75% !important;
|
|
99
|
+
// }
|
|
100
|
+
|
|
101
|
+
// /* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
|
|
102
|
+
// .tocMobile {
|
|
103
|
+
// display: none;
|
|
104
|
+
// }
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
/* Begin OpenAPI theme styles */
|
|
108
|
+
// [data-theme="dark"] {
|
|
109
|
+
// --openapi-card-background-color: var(--ifm-color-gray-900) !important;
|
|
110
|
+
// }
|
|
111
|
+
|
|
112
|
+
// .theme-api-markdown div[class^="collapsibleContent"] {
|
|
113
|
+
// margin-top: 0 !important;
|
|
114
|
+
// padding-left: 2px;
|
|
115
|
+
// }
|
|
116
|
+
|
|
117
|
+
/* Demo panel details */
|
|
118
|
+
|
|
119
|
+
// .theme-api-markdown .openapi-explorer__details > div > div > pre {
|
|
120
|
+
// border-top-left-radius: 0;
|
|
121
|
+
// border-top-right-radius: 0;
|
|
122
|
+
// }
|
|
123
|
+
|
|
124
|
+
/* Code block */
|
|
125
|
+
|
|
126
|
+
// .theme-api-markdown code {
|
|
127
|
+
// max-width: 600px;
|
|
128
|
+
// max-height: 500px;
|
|
129
|
+
// overflow: auto;
|
|
130
|
+
// }
|
|
131
|
+
|
|
132
|
+
/* Version button */
|
|
133
|
+
|
|
134
|
+
.version-button div {
|
|
135
|
+
display: block;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.version-button div > button > span::after {
|
|
139
|
+
border-color: currentcolor transparent;
|
|
140
|
+
border-style: solid;
|
|
141
|
+
border-width: 0.4em 0.4em 0;
|
|
142
|
+
content: "";
|
|
143
|
+
margin-left: 0.3em;
|
|
144
|
+
position: relative;
|
|
145
|
+
transform: translateY(-50%);
|
|
146
|
+
display: inline-block;
|
|
147
|
+
font-size: 0.8rem;
|
|
148
|
+
top: 1px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.openapi__logo {
|
|
152
|
+
width: 250px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.openapi__heading {
|
|
156
|
+
font-size: 2rem;
|
|
157
|
+
margin-bottom: 0.5rem !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.openapi-left-panel__container {
|
|
161
|
+
border-right: thin solid var(--ifm-toc-border-color);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (max-width: 997px) {
|
|
165
|
+
.schema {
|
|
166
|
+
margin-bottom: 1rem;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.openapi-tabs__heading {
|
|
171
|
+
margin-bottom: 1rem;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Loading Skeleton */
|
|
175
|
+
@keyframes pulsing {
|
|
176
|
+
0% {
|
|
177
|
+
opacity: 1;
|
|
178
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
179
|
+
}
|
|
180
|
+
50% {
|
|
181
|
+
opacity: 0.6;
|
|
182
|
+
background-color: var(--ifm-toc-border-color);
|
|
183
|
+
}
|
|
184
|
+
100% {
|
|
185
|
+
opacity: 1;
|
|
186
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.openapi-skeleton {
|
|
191
|
+
animation: pulsing 2s infinite ease-in-out;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Loading Skeleton */
|
|
195
|
+
.openapi-skeleton {
|
|
196
|
+
border-radius: var(--ifm-pre-border-radius);
|
|
197
|
+
background-color: var(--openapi-skeleton-background);
|
|
198
|
+
max-width: 100%;
|
|
199
|
+
margin: 1rem auto;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.openapi-skeleton.sm {
|
|
203
|
+
height: 100px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.openapi-skeleton.md {
|
|
207
|
+
height: 350px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.openapi-skeleton.lg {
|
|
211
|
+
height: 96.5%;
|
|
212
|
+
}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { FrontMatterTag } from "@docusaurus/utils";
|
|
2
|
+
import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
|
3
|
+
export interface ThemeConfig {
|
|
4
|
+
api?: {
|
|
5
|
+
proxy?: string;
|
|
6
|
+
authPersistance?: false | "localStorage" | "sessionStorage";
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
interface Map<T> {
|
|
10
|
+
[key: string]: T;
|
|
11
|
+
}
|
|
12
|
+
export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
13
|
+
export type SchemaObject = Omit<JSONSchema, "type" | "allOf" | "oneOf" | "anyOf" | "not" | "items" | "properties" | "additionalProperties"> & {
|
|
14
|
+
type?: "string" | "number" | "integer" | "boolean" | "object" | "array";
|
|
15
|
+
allOf?: SchemaObject[];
|
|
16
|
+
oneOf?: SchemaObject[];
|
|
17
|
+
anyOf?: SchemaObject[];
|
|
18
|
+
not?: SchemaObject;
|
|
19
|
+
items?: SchemaObject;
|
|
20
|
+
properties?: Map<SchemaObject>;
|
|
21
|
+
additionalProperties?: boolean | SchemaObject;
|
|
22
|
+
nullable?: boolean;
|
|
23
|
+
discriminator?: DiscriminatorObject;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
writeOnly?: boolean;
|
|
26
|
+
xml?: XMLObject;
|
|
27
|
+
externalDocs?: ExternalDocumentationObject;
|
|
28
|
+
example?: any;
|
|
29
|
+
deprecated?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export interface DiscriminatorObject {
|
|
32
|
+
propertyName: string;
|
|
33
|
+
mapping?: Map<string>;
|
|
34
|
+
}
|
|
35
|
+
export interface XMLObject {
|
|
36
|
+
name?: string;
|
|
37
|
+
namespace?: string;
|
|
38
|
+
prefix?: string;
|
|
39
|
+
attribute?: boolean;
|
|
40
|
+
wrapped?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface ExternalDocumentationObject {
|
|
43
|
+
description?: string;
|
|
44
|
+
url: string;
|
|
45
|
+
}
|
|
46
|
+
export type FileChange = {
|
|
47
|
+
author?: string;
|
|
48
|
+
/** Date can be any
|
|
49
|
+
* [parsable date string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
|
|
50
|
+
*/
|
|
51
|
+
date?: Date | string;
|
|
52
|
+
};
|
|
53
|
+
export type DocFrontMatter = {
|
|
54
|
+
/**
|
|
55
|
+
* The last part of the doc ID (will be refactored in the future to be the
|
|
56
|
+
* full ID instead)
|
|
57
|
+
* @see {@link DocMetadata.id}
|
|
58
|
+
*/
|
|
59
|
+
id?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Will override the default title collected from h1 heading.
|
|
62
|
+
* @see {@link DocMetadata.title}
|
|
63
|
+
*/
|
|
64
|
+
title?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Front matter tags, unnormalized.
|
|
67
|
+
* @see {@link DocMetadata.tags}
|
|
68
|
+
*/
|
|
69
|
+
tags?: FrontMatterTag[];
|
|
70
|
+
/**
|
|
71
|
+
* If there isn't a Markdown h1 heading (which, if there is, we don't
|
|
72
|
+
* remove), this front matter will cause the front matter title to not be
|
|
73
|
+
* displayed in the doc page.
|
|
74
|
+
*/
|
|
75
|
+
hide_title?: boolean;
|
|
76
|
+
/** Hide the TOC on the right. */
|
|
77
|
+
hide_table_of_contents?: boolean;
|
|
78
|
+
/** Used in the head meta. */
|
|
79
|
+
keywords?: string[];
|
|
80
|
+
/** Used in the head meta. Should use `assets.image` in priority. */
|
|
81
|
+
image?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Will override the default excerpt.
|
|
84
|
+
* @see {@link DocMetadata.description}
|
|
85
|
+
*/
|
|
86
|
+
description?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Custom slug appended after /<baseUrl>/<routeBasePath>/<versionPath>
|
|
89
|
+
* @see {@link DocMetadata.slug}
|
|
90
|
+
*/
|
|
91
|
+
slug?: string;
|
|
92
|
+
/** Customizes the sidebar label for this doc. Will default to its title. */
|
|
93
|
+
sidebar_label?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Controls the position of a doc inside the generated sidebar slice when
|
|
96
|
+
* using autogenerated sidebar items.
|
|
97
|
+
*
|
|
98
|
+
* @see https://docusaurus.io/docs/sidebar#autogenerated-sidebar-metadata
|
|
99
|
+
*/
|
|
100
|
+
sidebar_position?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Gives the corresponding sidebar label a special class name when using
|
|
103
|
+
* autogenerated sidebars.
|
|
104
|
+
*/
|
|
105
|
+
sidebar_class_name?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Will be propagated to the final sidebars data structure. Useful if you
|
|
108
|
+
* have swizzled sidebar-related code or simply querying doc data through
|
|
109
|
+
* sidebars.
|
|
110
|
+
*/
|
|
111
|
+
sidebar_custom_props?: {
|
|
112
|
+
[key: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Changes the sidebar association of the current doc. Use `null` to make
|
|
116
|
+
* the current doc not associated to any sidebar.
|
|
117
|
+
*/
|
|
118
|
+
displayed_sidebar?: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* Customizes the pagination label for this doc. Will default to the sidebar
|
|
121
|
+
* label.
|
|
122
|
+
*/
|
|
123
|
+
pagination_label?: string;
|
|
124
|
+
/** Overrides the default URL computed for this doc. */
|
|
125
|
+
custom_edit_url?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Whether number prefix parsing is disabled on this doc.
|
|
128
|
+
* @see https://docusaurus.io/docs/sidebar#using-number-prefixes
|
|
129
|
+
*/
|
|
130
|
+
parse_number_prefixes?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Minimum TOC heading level. Must be between 2 and 6 and lower or equal to
|
|
133
|
+
* the max value.
|
|
134
|
+
*/
|
|
135
|
+
toc_min_heading_level?: number;
|
|
136
|
+
/** Maximum TOC heading level. Must be between 2 and 6. */
|
|
137
|
+
toc_max_heading_level?: number;
|
|
138
|
+
/**
|
|
139
|
+
* The ID of the documentation you want the "Next" pagination to link to.
|
|
140
|
+
* Use `null` to disable showing "Next" for this page.
|
|
141
|
+
* @see {@link DocMetadata.next}
|
|
142
|
+
*/
|
|
143
|
+
pagination_next?: string | null;
|
|
144
|
+
/**
|
|
145
|
+
* The ID of the documentation you want the "Previous" pagination to link
|
|
146
|
+
* to. Use `null` to disable showing "Previous" for this page.
|
|
147
|
+
* @see {@link DocMetadata.prev}
|
|
148
|
+
*/
|
|
149
|
+
pagination_prev?: string | null;
|
|
150
|
+
/** Should this doc be excluded from production builds? */
|
|
151
|
+
draft?: boolean;
|
|
152
|
+
/** Allows overriding the last updated author and/or date. */
|
|
153
|
+
last_update?: FileChange;
|
|
154
|
+
/** Provides OpenAPI Docs with a reference path to their respective Info Doc */
|
|
155
|
+
info_path?: string;
|
|
156
|
+
};
|
|
157
|
+
export {};
|
package/lib/types.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* Copyright (c) Palo Alto Networks
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
* ========================================================================== */
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "docusaurus-theme-openapi-docs",
|
|
3
|
+
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
+
"version": "0.0.0-1000",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"openapi",
|
|
8
|
+
"documentation",
|
|
9
|
+
"docusaurus",
|
|
10
|
+
"websites",
|
|
11
|
+
"theme"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs.git",
|
|
19
|
+
"directory": "packages/docusaurus-theme-openapi-docs"
|
|
20
|
+
},
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues"
|
|
23
|
+
},
|
|
24
|
+
"types": "src/theme-openapi.d.ts",
|
|
25
|
+
"main": "lib/index.js",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc --build && node ../../scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc.json --write \"lib/theme/**/*.js\"",
|
|
28
|
+
"watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\""
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@docusaurus/theme-classic": "^3.5.0",
|
|
32
|
+
"@docusaurus/theme-common": "^3.5.0",
|
|
33
|
+
"@docusaurus/types": "^3.5.0",
|
|
34
|
+
"@types/crypto-js": "^4.1.0",
|
|
35
|
+
"@types/file-saver": "^2.0.5",
|
|
36
|
+
"@types/lodash": "^4.14.176",
|
|
37
|
+
"@types/pako": "^2.0.3",
|
|
38
|
+
"concurrently": "^5.2.0",
|
|
39
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-1000",
|
|
40
|
+
"docusaurus-plugin-sass": "^0.2.3",
|
|
41
|
+
"eslint-plugin-prettier": "^5.0.1"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@hookform/error-message": "^2.0.1",
|
|
45
|
+
"@reduxjs/toolkit": "^1.7.1",
|
|
46
|
+
"allof-merge": "^0.6.6",
|
|
47
|
+
"buffer": "^6.0.3",
|
|
48
|
+
"clsx": "^1.1.1",
|
|
49
|
+
"copy-text-to-clipboard": "^3.1.0",
|
|
50
|
+
"crypto-js": "^4.1.1",
|
|
51
|
+
"file-saver": "^2.0.5",
|
|
52
|
+
"lodash": "^4.17.20",
|
|
53
|
+
"pako": "^2.1.0",
|
|
54
|
+
"postman-code-generators": "^1.10.1",
|
|
55
|
+
"postman-collection": "^4.4.0",
|
|
56
|
+
"prism-react-renderer": "^2.3.0",
|
|
57
|
+
"process": "^0.11.10",
|
|
58
|
+
"react-hook-form": "^7.43.8",
|
|
59
|
+
"react-live": "^4.0.0",
|
|
60
|
+
"react-magic-dropzone": "^1.0.1",
|
|
61
|
+
"react-markdown": "^8.0.1",
|
|
62
|
+
"react-modal": "^3.15.1",
|
|
63
|
+
"react-redux": "^7.2.0",
|
|
64
|
+
"rehype-raw": "^6.1.1",
|
|
65
|
+
"remark-gfm": "3.0.1",
|
|
66
|
+
"sass": "^1.80.4",
|
|
67
|
+
"sass-loader": "^16.0.2",
|
|
68
|
+
"unist-util-visit": "^5.0.0",
|
|
69
|
+
"url": "^0.11.1",
|
|
70
|
+
"xml-formatter": "^2.6.1"
|
|
71
|
+
},
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"@docusaurus/theme-common": "^3.5.0",
|
|
74
|
+
"docusaurus-plugin-openapi-docs": "^4.0.0",
|
|
75
|
+
"docusaurus-plugin-sass": "^0.2.3",
|
|
76
|
+
"react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
77
|
+
"react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
78
|
+
},
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">=14"
|
|
81
|
+
},
|
|
82
|
+
"gitHead": "abdd081aa1d8100eaed69342192f8d84fec853f7"
|
|
83
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
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 path from "path";
|
|
9
|
+
|
|
10
|
+
import type { Plugin } from "@docusaurus/types";
|
|
11
|
+
|
|
12
|
+
export default function docusaurusThemeOpenAPI(): Plugin<void> {
|
|
13
|
+
return {
|
|
14
|
+
name: "docusaurus-theme-openapi",
|
|
15
|
+
|
|
16
|
+
getClientModules() {
|
|
17
|
+
const modules = [
|
|
18
|
+
require.resolve(
|
|
19
|
+
path.join(__dirname, "..", "lib", "theme", "styles.scss")
|
|
20
|
+
),
|
|
21
|
+
];
|
|
22
|
+
return modules;
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
getThemePath() {
|
|
26
|
+
return path.join(__dirname, "..", "lib", "theme");
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
getTypeScriptThemePath() {
|
|
30
|
+
return path.resolve(__dirname, "..", "src", "theme");
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
configureWebpack(_, isServer, utils) {
|
|
34
|
+
const rules: any = _.module?.rules ?? [];
|
|
35
|
+
const sassLoaderRule = rules.filter((r: any) => {
|
|
36
|
+
return String(r.test) === String(/\.s[ca]ss$/);
|
|
37
|
+
});
|
|
38
|
+
const { getStyleLoaders } = utils;
|
|
39
|
+
// Avoid conflicts with docusaurus-plugin-sass
|
|
40
|
+
if (sassLoaderRule.length === 0) {
|
|
41
|
+
return {
|
|
42
|
+
resolve: {
|
|
43
|
+
fallback: {
|
|
44
|
+
buffer: require.resolve("buffer/"),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
plugins: [
|
|
48
|
+
new utils.currentBundler.instance.ProvidePlugin({
|
|
49
|
+
process: require.resolve("process/browser"),
|
|
50
|
+
Buffer: ["buffer", "Buffer"],
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
module: {
|
|
54
|
+
rules: [
|
|
55
|
+
{
|
|
56
|
+
test: /\.s[ac]ss$/,
|
|
57
|
+
include: path.resolve(__dirname, "..", "lib", "theme"),
|
|
58
|
+
use: [
|
|
59
|
+
...getStyleLoaders(isServer, {}),
|
|
60
|
+
{
|
|
61
|
+
loader: require.resolve("sass-loader"),
|
|
62
|
+
options: {},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
resolve: {
|
|
72
|
+
fallback: {
|
|
73
|
+
buffer: require.resolve("buffer/"),
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
plugins: [
|
|
77
|
+
new utils.currentBundler.instance.ProvidePlugin({
|
|
78
|
+
process: require.resolve("process/browser"),
|
|
79
|
+
Buffer: ["buffer", "Buffer"],
|
|
80
|
+
}),
|
|
81
|
+
],
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export function createDescription(description: string | undefined) {
|
|
9
|
+
if (!description) {
|
|
10
|
+
return "";
|
|
11
|
+
}
|
|
12
|
+
return `\n\n${description}\n\n`;
|
|
13
|
+
}
|