@camunda8/docusaurus-theme-openapi-docs 4.5.1
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/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 +154 -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 +7 -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 +201 -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 +394 -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 +11 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +435 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.js +133 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +283 -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 +178 -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 +49 -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 +11 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.js +80 -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 +176 -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 +230 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +71 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +97 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +72 -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 +233 -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 +443 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.js +223 -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 +207 -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 +519 -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 +213 -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 +511 -0
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +107 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +19 -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 +58 -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 +275 -0
- package/lib/theme/ArrayBrackets/index.d.ts +3 -0
- package/lib/theme/ArrayBrackets/index.js +50 -0
- package/lib/theme/CodeSamples/_CodeSamples.scss +3 -0
- package/lib/theme/CodeSamples/index.d.ts +8 -0
- package/lib/theme/CodeSamples/index.js +27 -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 +93 -0
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.d.ts +22 -0
- package/lib/theme/ParamsItem/index.js +281 -0
- package/lib/theme/RequestSchema/index.d.ts +15 -0
- package/lib/theme/RequestSchema/index.js +208 -0
- package/lib/theme/ResponseExamples/index.d.ts +18 -0
- package/lib/theme/ResponseExamples/index.js +213 -0
- package/lib/theme/ResponseHeaders/index.d.ts +13 -0
- package/lib/theme/ResponseHeaders/index.js +39 -0
- package/lib/theme/ResponseSchema/index.d.ts +15 -0
- package/lib/theme/ResponseSchema/index.js +165 -0
- package/lib/theme/Schema/index.d.ts +8 -0
- package/lib/theme/Schema/index.js +853 -0
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.d.ts +12 -0
- package/lib/theme/SchemaItem/index.js +314 -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 +90 -0
- package/lib/theme/styles.scss +215 -0
- package/lib/theme/translationIds.d.ts +83 -0
- package/lib/theme/translationIds.js +106 -0
- package/lib/types.d.ts +46 -0
- package/lib/types.js +8 -0
- package/package.json +85 -0
- package/src/index.ts +85 -0
- package/src/markdown/createDescription.ts +13 -0
- package/src/markdown/schema.ts +186 -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 +83 -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 +199 -0
- package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
- package/src/theme/ApiExplorer/Body/index.tsx +388 -0
- package/src/theme/ApiExplorer/Body/json2xml.d.ts +8 -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 +383 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.ts +139 -0
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +261 -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 +124 -0
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/ApiExplorer/FormItem/index.tsx +40 -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 +89 -0
- package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +122 -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 +185 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +72 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +94 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +74 -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 +154 -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 +352 -0
- package/src/theme/ApiExplorer/Request/makeRequest.ts +255 -0
- package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/src/theme/ApiExplorer/Response/index.tsx +173 -0
- package/src/theme/ApiExplorer/Response/slice.ts +52 -0
- package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +375 -0
- package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/src/theme/ApiExplorer/Server/index.tsx +138 -0
- package/src/theme/ApiExplorer/Server/slice.ts +39 -0
- package/src/theme/ApiExplorer/buildPostmanRequest.ts +524 -0
- package/src/theme/ApiExplorer/index.tsx +52 -0
- package/src/theme/ApiExplorer/persistanceMiddleware.ts +73 -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 +243 -0
- package/src/theme/ArrayBrackets/index.tsx +37 -0
- package/src/theme/CodeSamples/_CodeSamples.scss +3 -0
- package/src/theme/CodeSamples/index.tsx +26 -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.d.ts +8 -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 +90 -0
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.tsx +246 -0
- package/src/theme/RequestSchema/index.tsx +172 -0
- package/src/theme/ResponseExamples/index.tsx +209 -0
- package/src/theme/ResponseHeaders/index.tsx +49 -0
- package/src/theme/ResponseSchema/index.tsx +150 -0
- package/src/theme/Schema/index.tsx +938 -0
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.tsx +273 -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 +83 -0
- package/src/theme/styles.scss +215 -0
- package/src/theme/translationIds.ts +103 -0
- package/src/theme-classic.d.ts +80 -0
- package/src/theme-openapi.d.ts +20 -0
- package/src/types.ts +72 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,213 @@
|
|
|
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
|
+
exports.ExampleFromSchema =
|
|
15
|
+
exports.ResponseExample =
|
|
16
|
+
exports.ResponseExamples =
|
|
17
|
+
void 0;
|
|
18
|
+
exports.json2xml = json2xml;
|
|
19
|
+
const react_1 = __importDefault(require("react"));
|
|
20
|
+
const Translate_1 = require("@docusaurus/Translate");
|
|
21
|
+
const CodeSamples_1 = __importDefault(require("@theme/CodeSamples"));
|
|
22
|
+
const Markdown_1 = __importDefault(require("@theme/Markdown"));
|
|
23
|
+
const TabItem_1 = __importDefault(require("@theme/TabItem"));
|
|
24
|
+
const translationIds_1 = require("@theme/translationIds");
|
|
25
|
+
const createResponseExample_1 = require("@camunda8/docusaurus-plugin-openapi-docs/lib/openapi/createResponseExample");
|
|
26
|
+
const xml_formatter_1 = __importDefault(require("xml-formatter"));
|
|
27
|
+
function json2xml(o, tab) {
|
|
28
|
+
const toXml = (v, name, ind) => {
|
|
29
|
+
let xml = "";
|
|
30
|
+
if (v instanceof Array) {
|
|
31
|
+
for (let i = 0, n = v.length; i < n; i++) {
|
|
32
|
+
xml += ind + toXml(v[i], name, ind + "\t") + "\n";
|
|
33
|
+
}
|
|
34
|
+
} else if (typeof v === "object") {
|
|
35
|
+
let hasChild = false;
|
|
36
|
+
xml += ind + "<" + name;
|
|
37
|
+
for (const m in v) {
|
|
38
|
+
if (m.charAt(0) === "@") {
|
|
39
|
+
xml += " " + m.substr(1) + '="' + v[m].toString() + '"';
|
|
40
|
+
} else {
|
|
41
|
+
hasChild = true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
xml += hasChild ? ">" : "/>";
|
|
45
|
+
if (hasChild) {
|
|
46
|
+
for (const m2 in v) {
|
|
47
|
+
if (m2 === "#text") xml += v[m2];
|
|
48
|
+
else if (m2 === "#cdata") xml += "<![CDATA[" + v[m2] + "]]>";
|
|
49
|
+
else if (m2.charAt(0) !== "@") xml += toXml(v[m2], m2, ind + "\t");
|
|
50
|
+
}
|
|
51
|
+
xml +=
|
|
52
|
+
(xml.charAt(xml.length - 1) === "\n" ? ind : "") + "</" + name + ">";
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
xml += ind + "<" + name + ">" + v.toString() + "</" + name + ">";
|
|
56
|
+
}
|
|
57
|
+
return xml;
|
|
58
|
+
};
|
|
59
|
+
let xml = "";
|
|
60
|
+
for (const m3 in o) xml += toXml(o[m3], m3, "");
|
|
61
|
+
return tab ? xml.replace(/\t/g, tab) : xml.replace(/\t|\n/g, "");
|
|
62
|
+
}
|
|
63
|
+
const ResponseExamples = ({ responseExamples, mimeType }) => {
|
|
64
|
+
let language = "shell";
|
|
65
|
+
if (mimeType.endsWith("json")) language = "json";
|
|
66
|
+
if (mimeType.endsWith("xml")) language = "xml";
|
|
67
|
+
// Map response examples to an array of TabItem elements
|
|
68
|
+
const examplesArray = Object.entries(responseExamples).map(
|
|
69
|
+
([exampleName, exampleValue]) => {
|
|
70
|
+
const isObject = typeof exampleValue.value === "object";
|
|
71
|
+
const responseExample = isObject
|
|
72
|
+
? JSON.stringify(exampleValue.value, null, 2)
|
|
73
|
+
: exampleValue.value;
|
|
74
|
+
return (
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
react_1.default.createElement(
|
|
77
|
+
TabItem_1.default,
|
|
78
|
+
{ label: exampleName, value: exampleName, key: exampleName },
|
|
79
|
+
exampleValue.summary &&
|
|
80
|
+
react_1.default.createElement(
|
|
81
|
+
Markdown_1.default,
|
|
82
|
+
{ className: "openapi-example__summary" },
|
|
83
|
+
exampleValue.summary
|
|
84
|
+
),
|
|
85
|
+
react_1.default.createElement(CodeSamples_1.default, {
|
|
86
|
+
example: responseExample,
|
|
87
|
+
language: language,
|
|
88
|
+
})
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
return examplesArray;
|
|
94
|
+
};
|
|
95
|
+
exports.ResponseExamples = ResponseExamples;
|
|
96
|
+
const ResponseExample = ({ responseExample, mimeType }) => {
|
|
97
|
+
let language = "shell";
|
|
98
|
+
if (mimeType.endsWith("json")) {
|
|
99
|
+
language = "json";
|
|
100
|
+
}
|
|
101
|
+
if (mimeType.endsWith("xml")) {
|
|
102
|
+
language = "xml";
|
|
103
|
+
}
|
|
104
|
+
const isObject = typeof responseExample === "object";
|
|
105
|
+
const exampleContent = isObject
|
|
106
|
+
? JSON.stringify(responseExample, null, 2)
|
|
107
|
+
: responseExample;
|
|
108
|
+
return (
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
react_1.default.createElement(
|
|
111
|
+
TabItem_1.default,
|
|
112
|
+
{
|
|
113
|
+
label: (0, Translate_1.translate)({
|
|
114
|
+
id: translationIds_1.OPENAPI_RESPONSE_EXAMPLES.EXAMPLE,
|
|
115
|
+
message: "Example",
|
|
116
|
+
}),
|
|
117
|
+
value: "Example",
|
|
118
|
+
},
|
|
119
|
+
responseExample.summary &&
|
|
120
|
+
react_1.default.createElement(
|
|
121
|
+
Markdown_1.default,
|
|
122
|
+
{ className: "openapi-example__summary" },
|
|
123
|
+
responseExample.summary
|
|
124
|
+
),
|
|
125
|
+
react_1.default.createElement(CodeSamples_1.default, {
|
|
126
|
+
example: exampleContent,
|
|
127
|
+
language: language,
|
|
128
|
+
})
|
|
129
|
+
)
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
exports.ResponseExample = ResponseExample;
|
|
133
|
+
const ExampleFromSchema = ({ schema, mimeType }) => {
|
|
134
|
+
const responseExample = (0, createResponseExample_1.sampleResponseFromSchema)(
|
|
135
|
+
schema
|
|
136
|
+
);
|
|
137
|
+
if (mimeType.endsWith("xml")) {
|
|
138
|
+
let responseExampleObject;
|
|
139
|
+
try {
|
|
140
|
+
responseExampleObject = JSON.parse(JSON.stringify(responseExample));
|
|
141
|
+
} catch {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
if (typeof responseExampleObject === "object") {
|
|
145
|
+
let xmlExample;
|
|
146
|
+
try {
|
|
147
|
+
xmlExample = (0, xml_formatter_1.default)(
|
|
148
|
+
json2xml(responseExampleObject, ""),
|
|
149
|
+
{
|
|
150
|
+
indentation: " ",
|
|
151
|
+
lineSeparator: "\n",
|
|
152
|
+
collapseContent: true,
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
} catch {
|
|
156
|
+
const xmlExampleWithRoot = { root: responseExampleObject };
|
|
157
|
+
try {
|
|
158
|
+
xmlExample = (0, xml_formatter_1.default)(
|
|
159
|
+
json2xml(xmlExampleWithRoot, ""),
|
|
160
|
+
{
|
|
161
|
+
indentation: " ",
|
|
162
|
+
lineSeparator: "\n",
|
|
163
|
+
collapseContent: true,
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
} catch {
|
|
167
|
+
xmlExample = json2xml(responseExampleObject, "");
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return (
|
|
171
|
+
// @ts-ignore
|
|
172
|
+
react_1.default.createElement(
|
|
173
|
+
TabItem_1.default,
|
|
174
|
+
{
|
|
175
|
+
label: (0, Translate_1.translate)({
|
|
176
|
+
id: translationIds_1.OPENAPI_RESPONSE_EXAMPLES.AUTO_EXAMPLE,
|
|
177
|
+
message: "Example (auto)",
|
|
178
|
+
}),
|
|
179
|
+
value: "Example (auto)",
|
|
180
|
+
},
|
|
181
|
+
react_1.default.createElement(CodeSamples_1.default, {
|
|
182
|
+
example: xmlExample,
|
|
183
|
+
language: "xml",
|
|
184
|
+
})
|
|
185
|
+
)
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (
|
|
190
|
+
typeof responseExample === "object" ||
|
|
191
|
+
typeof responseExample === "string"
|
|
192
|
+
) {
|
|
193
|
+
return (
|
|
194
|
+
// @ts-ignore
|
|
195
|
+
react_1.default.createElement(
|
|
196
|
+
TabItem_1.default,
|
|
197
|
+
{
|
|
198
|
+
label: (0, Translate_1.translate)({
|
|
199
|
+
id: translationIds_1.OPENAPI_RESPONSE_EXAMPLES.AUTO_EXAMPLE,
|
|
200
|
+
message: "Example (auto)",
|
|
201
|
+
}),
|
|
202
|
+
value: "Example (auto)",
|
|
203
|
+
},
|
|
204
|
+
react_1.default.createElement(CodeSamples_1.default, {
|
|
205
|
+
example: JSON.stringify(responseExample, null, 2),
|
|
206
|
+
language: "json",
|
|
207
|
+
})
|
|
208
|
+
)
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
return null;
|
|
212
|
+
};
|
|
213
|
+
exports.ExampleFromSchema = ExampleFromSchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ResponseHeadersProps {
|
|
3
|
+
description?: string;
|
|
4
|
+
example?: string;
|
|
5
|
+
schema?: {
|
|
6
|
+
type?: string;
|
|
7
|
+
format?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const ResponseHeaders: React.FC<{
|
|
11
|
+
responseHeaders?: Record<string, ResponseHeadersProps>;
|
|
12
|
+
}>;
|
|
13
|
+
export default ResponseHeaders;
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
exports.ResponseHeaders = void 0;
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const SchemaItem_1 = __importDefault(require("@theme/SchemaItem"));
|
|
17
|
+
const schema_1 = require("../../markdown/schema");
|
|
18
|
+
const ResponseHeaders = ({ responseHeaders }) => {
|
|
19
|
+
if (!responseHeaders) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return react_1.default.createElement(
|
|
23
|
+
"ul",
|
|
24
|
+
{ style: { marginLeft: "1rem" } },
|
|
25
|
+
Object.entries(responseHeaders).map(([name, schema]) => {
|
|
26
|
+
return react_1.default.createElement(SchemaItem_1.default, {
|
|
27
|
+
name: name,
|
|
28
|
+
collapsible: false,
|
|
29
|
+
schemaName: (0, schema_1.getSchemaName)(schema),
|
|
30
|
+
qualifierMessage: (0, schema_1.getQualifierMessage)(schema),
|
|
31
|
+
schema: schema,
|
|
32
|
+
discriminator: false,
|
|
33
|
+
children: null,
|
|
34
|
+
});
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
exports.ResponseHeaders = ResponseHeaders;
|
|
39
|
+
exports.default = exports.ResponseHeaders;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MediaTypeObject } from "@camunda8/docusaurus-plugin-openapi-docs/lib/openapi/types";
|
|
3
|
+
interface Props {
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
title: string;
|
|
6
|
+
body: {
|
|
7
|
+
content?: {
|
|
8
|
+
[key: string]: MediaTypeObject;
|
|
9
|
+
};
|
|
10
|
+
description?: string;
|
|
11
|
+
required?: string[] | boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const ResponseSchema: React.FC<Props>;
|
|
15
|
+
export default ResponseSchema;
|
|
@@ -0,0 +1,165 @@
|
|
|
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 Translate_1 = require("@docusaurus/Translate");
|
|
16
|
+
const translationIds_1 = require("@theme/translationIds");
|
|
17
|
+
const BrowserOnly_1 = __importDefault(require("@docusaurus/BrowserOnly"));
|
|
18
|
+
const Details_1 = __importDefault(require("@theme/Details"));
|
|
19
|
+
const Markdown_1 = __importDefault(require("@theme/Markdown"));
|
|
20
|
+
const MimeTabs_1 = __importDefault(require("@theme/MimeTabs")); // Assume these components exist
|
|
21
|
+
const ResponseExamples_1 = require("@theme/ResponseExamples");
|
|
22
|
+
const Schema_1 = __importDefault(require("@theme/Schema"));
|
|
23
|
+
const SchemaTabs_1 = __importDefault(require("@theme/SchemaTabs"));
|
|
24
|
+
const SkeletonLoader_1 = __importDefault(require("@theme/SkeletonLoader"));
|
|
25
|
+
const TabItem_1 = __importDefault(require("@theme/TabItem"));
|
|
26
|
+
const ResponseSchemaComponent = ({ title, body, style }) => {
|
|
27
|
+
if (
|
|
28
|
+
body === undefined ||
|
|
29
|
+
body.content === undefined ||
|
|
30
|
+
Object.keys(body).length === 0 ||
|
|
31
|
+
Object.keys(body.content).length === 0
|
|
32
|
+
) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
// Get all MIME types, including vendor-specific
|
|
36
|
+
const mimeTypes = Object.keys(body.content);
|
|
37
|
+
if (mimeTypes && mimeTypes.length) {
|
|
38
|
+
return react_1.default.createElement(
|
|
39
|
+
MimeTabs_1.default,
|
|
40
|
+
{ className: "openapi-tabs__mime", schemaType: "response" },
|
|
41
|
+
mimeTypes.map((mimeType) => {
|
|
42
|
+
const responseExamples = body.content[mimeType].examples;
|
|
43
|
+
const responseExample = body.content[mimeType].example;
|
|
44
|
+
const firstBody =
|
|
45
|
+
body.content[mimeType].schema ?? body.content[mimeType];
|
|
46
|
+
if (
|
|
47
|
+
firstBody === undefined &&
|
|
48
|
+
responseExample === undefined &&
|
|
49
|
+
responseExamples === undefined
|
|
50
|
+
) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
if (firstBody) {
|
|
54
|
+
return (
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
react_1.default.createElement(
|
|
57
|
+
TabItem_1.default,
|
|
58
|
+
{ key: mimeType, label: mimeType, value: mimeType },
|
|
59
|
+
react_1.default.createElement(
|
|
60
|
+
SchemaTabs_1.default,
|
|
61
|
+
{ className: "openapi-tabs__schema" },
|
|
62
|
+
react_1.default.createElement(
|
|
63
|
+
TabItem_1.default,
|
|
64
|
+
{ key: title, label: title, value: title },
|
|
65
|
+
react_1.default.createElement(
|
|
66
|
+
Details_1.default,
|
|
67
|
+
{
|
|
68
|
+
className: "openapi-markdown__details response",
|
|
69
|
+
"data-collapsed": false,
|
|
70
|
+
open: true,
|
|
71
|
+
style: style,
|
|
72
|
+
summary: react_1.default.createElement(
|
|
73
|
+
react_1.default.Fragment,
|
|
74
|
+
null,
|
|
75
|
+
react_1.default.createElement(
|
|
76
|
+
"summary",
|
|
77
|
+
null,
|
|
78
|
+
react_1.default.createElement(
|
|
79
|
+
"strong",
|
|
80
|
+
{
|
|
81
|
+
className:
|
|
82
|
+
"openapi-markdown__details-summary-response",
|
|
83
|
+
},
|
|
84
|
+
title,
|
|
85
|
+
body.required === true &&
|
|
86
|
+
react_1.default.createElement(
|
|
87
|
+
"span",
|
|
88
|
+
{ className: "openapi-schema__required" },
|
|
89
|
+
(0, Translate_1.translate)({
|
|
90
|
+
id: translationIds_1.OPENAPI_SCHEMA_ITEM
|
|
91
|
+
.REQUIRED,
|
|
92
|
+
message: "required",
|
|
93
|
+
})
|
|
94
|
+
)
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
),
|
|
98
|
+
},
|
|
99
|
+
react_1.default.createElement(
|
|
100
|
+
"div",
|
|
101
|
+
{ style: { textAlign: "left", marginLeft: "1rem" } },
|
|
102
|
+
body.description &&
|
|
103
|
+
react_1.default.createElement(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
style: { marginTop: "1rem", marginBottom: "1rem" },
|
|
107
|
+
},
|
|
108
|
+
react_1.default.createElement(
|
|
109
|
+
Markdown_1.default,
|
|
110
|
+
null,
|
|
111
|
+
body.description
|
|
112
|
+
)
|
|
113
|
+
)
|
|
114
|
+
),
|
|
115
|
+
react_1.default.createElement(
|
|
116
|
+
"ul",
|
|
117
|
+
{ style: { marginLeft: "1rem" } },
|
|
118
|
+
react_1.default.createElement(Schema_1.default, {
|
|
119
|
+
schema: firstBody,
|
|
120
|
+
schemaType: "response",
|
|
121
|
+
})
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
),
|
|
125
|
+
firstBody &&
|
|
126
|
+
(0, ResponseExamples_1.ExampleFromSchema)({
|
|
127
|
+
schema: firstBody,
|
|
128
|
+
mimeType: mimeType,
|
|
129
|
+
}),
|
|
130
|
+
responseExamples &&
|
|
131
|
+
(0, ResponseExamples_1.ResponseExamples)({
|
|
132
|
+
responseExamples,
|
|
133
|
+
mimeType,
|
|
134
|
+
}),
|
|
135
|
+
responseExample &&
|
|
136
|
+
(0, ResponseExamples_1.ResponseExample)({
|
|
137
|
+
responseExample,
|
|
138
|
+
mimeType,
|
|
139
|
+
})
|
|
140
|
+
)
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
return undefined;
|
|
145
|
+
})
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
return undefined;
|
|
149
|
+
};
|
|
150
|
+
const ResponseSchema = (props) => {
|
|
151
|
+
return react_1.default.createElement(
|
|
152
|
+
BrowserOnly_1.default,
|
|
153
|
+
{
|
|
154
|
+
fallback: react_1.default.createElement(SkeletonLoader_1.default, {
|
|
155
|
+
size: "md",
|
|
156
|
+
}),
|
|
157
|
+
},
|
|
158
|
+
() => {
|
|
159
|
+
return react_1.default.createElement(ResponseSchemaComponent, {
|
|
160
|
+
...props,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
};
|
|
165
|
+
exports.default = ResponseSchema;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SchemaObject } from "@camunda8/docusaurus-plugin-openapi-docs/lib/openapi/types";
|
|
3
|
+
interface SchemaProps {
|
|
4
|
+
schema: SchemaObject;
|
|
5
|
+
schemaType: "request" | "response";
|
|
6
|
+
}
|
|
7
|
+
declare const SchemaNode: React.FC<SchemaProps>;
|
|
8
|
+
export default SchemaNode;
|