@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,129 @@
|
|
|
1
|
+
.openapi-explorer__request-form {
|
|
2
|
+
background-color: var(--ifm-pre-background);
|
|
3
|
+
border-radius: var(--openapi-card-border-radius);
|
|
4
|
+
border: 1px solid var(--openapi-explorer-border-color);
|
|
5
|
+
box-shadow:
|
|
6
|
+
0 2px 3px hsla(222, 8%, 43%, 0.1),
|
|
7
|
+
0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
|
|
8
|
+
color: var(--ifm-pre-color);
|
|
9
|
+
line-height: var(--ifm-pre-line-height);
|
|
10
|
+
margin-bottom: var(--ifm-spacing-vertical);
|
|
11
|
+
margin-top: 0;
|
|
12
|
+
overflow: auto;
|
|
13
|
+
transition: 300ms;
|
|
14
|
+
|
|
15
|
+
/* hack for view calculation when monaco is hidden */
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
&:empty {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
box-shadow:
|
|
24
|
+
0 0 0 2px rgba(38, 53, 61, 0.15),
|
|
25
|
+
0 2px 3px hsla(222, 8%, 43%, 0.15),
|
|
26
|
+
0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.required {
|
|
30
|
+
font-size: var(--ifm-code-font-size);
|
|
31
|
+
color: var(--openapi-required);
|
|
32
|
+
|
|
33
|
+
&.request-body {
|
|
34
|
+
padding-left: 0.25rem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.openapi-explorer__request-header-container {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
border-bottom: 1px solid var(--openapi-explorer-border-color);
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0.75rem var(--ifm-pre-padding);
|
|
45
|
+
text-transform: uppercase;
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
font-weight: bold;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.openapi-explorer__expand-details-btn {
|
|
51
|
+
&:hover {
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.openapi-explorer__details-outer-container {
|
|
57
|
+
padding: 1rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.openapi-explorer__details-container[open] {
|
|
61
|
+
.openapi-explorer__details-summary::before {
|
|
62
|
+
transform: rotate(180deg);
|
|
63
|
+
margin-top: 0.25rem;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.openapi-explorer__details-summary {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
padding: 0.35rem 0;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
list-style: none;
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&::-webkit-details-marker {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&::before {
|
|
83
|
+
margin-right: 0.25rem;
|
|
84
|
+
margin-bottom: 0.25rem;
|
|
85
|
+
margin-top: 0.25rem;
|
|
86
|
+
background-image: var(--openapi-explorer-caret-bg);
|
|
87
|
+
border: none !important;
|
|
88
|
+
transform: rotate(90deg);
|
|
89
|
+
content: "";
|
|
90
|
+
height: 1rem;
|
|
91
|
+
width: 1rem;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.openapi-explorer__request-btn {
|
|
96
|
+
border: none;
|
|
97
|
+
border-radius: var(--ifm-global-radius);
|
|
98
|
+
padding: 0.5rem 1rem;
|
|
99
|
+
margin-top: 1rem;
|
|
100
|
+
background-color: var(--ifm-color-primary-light);
|
|
101
|
+
text-transform: uppercase;
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
font-size: 12px;
|
|
104
|
+
color: white;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
transition: 300ms;
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
background-color: var(--ifm-color-primary-lightest);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:active {
|
|
113
|
+
background-color: var(--ifm-color-primary-light);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.openapi-security__summary-container {
|
|
118
|
+
background: var(--ifm-pre-background);
|
|
119
|
+
border-radius: var(--ifm-pre-border-radius);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Prevent auto zoom on mobile iOS devices when focusing on input elmenents
|
|
123
|
+
@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-device-width: 1024px) {
|
|
124
|
+
.prism-code,
|
|
125
|
+
select,
|
|
126
|
+
input {
|
|
127
|
+
font-size: 1rem;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,443 @@
|
|
|
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 __createBinding =
|
|
9
|
+
(this && this.__createBinding) ||
|
|
10
|
+
(Object.create
|
|
11
|
+
? function (o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (
|
|
15
|
+
!desc ||
|
|
16
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
17
|
+
) {
|
|
18
|
+
desc = {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return m[k];
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(o, k2, desc);
|
|
26
|
+
}
|
|
27
|
+
: function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
var __setModuleDefault =
|
|
32
|
+
(this && this.__setModuleDefault) ||
|
|
33
|
+
(Object.create
|
|
34
|
+
? function (o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}
|
|
37
|
+
: function (o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
var __importStar =
|
|
41
|
+
(this && this.__importStar) ||
|
|
42
|
+
(function () {
|
|
43
|
+
var ownKeys = function (o) {
|
|
44
|
+
ownKeys =
|
|
45
|
+
Object.getOwnPropertyNames ||
|
|
46
|
+
function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o)
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
50
|
+
return ar;
|
|
51
|
+
};
|
|
52
|
+
return ownKeys(o);
|
|
53
|
+
};
|
|
54
|
+
return function (mod) {
|
|
55
|
+
if (mod && mod.__esModule) return mod;
|
|
56
|
+
var result = {};
|
|
57
|
+
if (mod != null)
|
|
58
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
59
|
+
if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
60
|
+
__setModuleDefault(result, mod);
|
|
61
|
+
return result;
|
|
62
|
+
};
|
|
63
|
+
})();
|
|
64
|
+
var __importDefault =
|
|
65
|
+
(this && this.__importDefault) ||
|
|
66
|
+
function (mod) {
|
|
67
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
68
|
+
};
|
|
69
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
|
+
// @ts-nocheck
|
|
71
|
+
const react_1 = __importStar(require("react"));
|
|
72
|
+
const client_1 = require("@docusaurus/plugin-content-docs/client");
|
|
73
|
+
const Translate_1 = require("@docusaurus/Translate");
|
|
74
|
+
const Accept_1 = __importDefault(require("@theme/ApiExplorer/Accept"));
|
|
75
|
+
const Authorization_1 = __importDefault(
|
|
76
|
+
require("@theme/ApiExplorer/Authorization")
|
|
77
|
+
);
|
|
78
|
+
const Body_1 = __importDefault(require("@theme/ApiExplorer/Body"));
|
|
79
|
+
const buildPostmanRequest_1 = __importDefault(
|
|
80
|
+
require("@theme/ApiExplorer/buildPostmanRequest")
|
|
81
|
+
);
|
|
82
|
+
const ContentType_1 = __importDefault(
|
|
83
|
+
require("@theme/ApiExplorer/ContentType")
|
|
84
|
+
);
|
|
85
|
+
const ParamOptions_1 = __importDefault(
|
|
86
|
+
require("@theme/ApiExplorer/ParamOptions")
|
|
87
|
+
);
|
|
88
|
+
const slice_1 = require("@theme/ApiExplorer/Response/slice");
|
|
89
|
+
const Server_1 = __importDefault(require("@theme/ApiExplorer/Server"));
|
|
90
|
+
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
91
|
+
const translationIds_1 = require("@theme/translationIds");
|
|
92
|
+
const sdk = __importStar(require("postman-collection"));
|
|
93
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
94
|
+
const makeRequest_1 = __importDefault(require("./makeRequest"));
|
|
95
|
+
function Request({ item }) {
|
|
96
|
+
const postman = new sdk.Request(item.postman);
|
|
97
|
+
const metadata = (0, client_1.useDoc)();
|
|
98
|
+
const { proxy, hide_send_button: hideSendButton } = metadata.frontMatter;
|
|
99
|
+
const pathParams = (0, hooks_1.useTypedSelector)(
|
|
100
|
+
(state) => state.params.path
|
|
101
|
+
);
|
|
102
|
+
const queryParams = (0, hooks_1.useTypedSelector)(
|
|
103
|
+
(state) => state.params.query
|
|
104
|
+
);
|
|
105
|
+
const cookieParams = (0, hooks_1.useTypedSelector)(
|
|
106
|
+
(state) => state.params.cookie
|
|
107
|
+
);
|
|
108
|
+
const contentType = (0, hooks_1.useTypedSelector)(
|
|
109
|
+
(state) => state.contentType.value
|
|
110
|
+
);
|
|
111
|
+
const headerParams = (0, hooks_1.useTypedSelector)(
|
|
112
|
+
(state) => state.params.header
|
|
113
|
+
);
|
|
114
|
+
const body = (0, hooks_1.useTypedSelector)((state) => state.body);
|
|
115
|
+
const accept = (0, hooks_1.useTypedSelector)((state) => state.accept.value);
|
|
116
|
+
const acceptOptions = (0, hooks_1.useTypedDispatch)(
|
|
117
|
+
(state) => state.accept.options
|
|
118
|
+
);
|
|
119
|
+
const authSelected = (0, hooks_1.useTypedSelector)(
|
|
120
|
+
(state) => state.auth.selected
|
|
121
|
+
);
|
|
122
|
+
const server = (0, hooks_1.useTypedSelector)((state) => state.server.value);
|
|
123
|
+
const serverOptions = (0, hooks_1.useTypedSelector)(
|
|
124
|
+
(state) => state.server.options
|
|
125
|
+
);
|
|
126
|
+
const auth = (0, hooks_1.useTypedSelector)((state) => state.auth);
|
|
127
|
+
const dispatch = (0, hooks_1.useTypedDispatch)();
|
|
128
|
+
const [expandAccept, setExpandAccept] = (0, react_1.useState)(true);
|
|
129
|
+
const [expandAuth, setExpandAuth] = (0, react_1.useState)(true);
|
|
130
|
+
const [expandBody, setExpandBody] = (0, react_1.useState)(true);
|
|
131
|
+
const [expandParams, setExpandParams] = (0, react_1.useState)(true);
|
|
132
|
+
const [expandServer, setExpandServer] = (0, react_1.useState)(true);
|
|
133
|
+
const allParams = [
|
|
134
|
+
...pathParams,
|
|
135
|
+
...queryParams,
|
|
136
|
+
...cookieParams,
|
|
137
|
+
...headerParams,
|
|
138
|
+
];
|
|
139
|
+
const postmanRequest = (0, buildPostmanRequest_1.default)(postman, {
|
|
140
|
+
queryParams,
|
|
141
|
+
pathParams,
|
|
142
|
+
cookieParams,
|
|
143
|
+
contentType,
|
|
144
|
+
accept,
|
|
145
|
+
headerParams,
|
|
146
|
+
body,
|
|
147
|
+
server,
|
|
148
|
+
auth,
|
|
149
|
+
});
|
|
150
|
+
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
151
|
+
const paramsObject = {
|
|
152
|
+
path: [],
|
|
153
|
+
query: [],
|
|
154
|
+
header: [],
|
|
155
|
+
cookie: [],
|
|
156
|
+
};
|
|
157
|
+
item.parameters?.forEach((param) => {
|
|
158
|
+
const paramType = param.in;
|
|
159
|
+
const paramsArray = paramsObject[paramType];
|
|
160
|
+
paramsArray.push(param);
|
|
161
|
+
});
|
|
162
|
+
const methods = (0, react_hook_form_1.useForm)({ shouldFocusError: false });
|
|
163
|
+
const handleEventStream = async (res) => {
|
|
164
|
+
res.headers &&
|
|
165
|
+
dispatch((0, slice_1.setHeaders)(Object.fromEntries(res.headers)));
|
|
166
|
+
dispatch((0, slice_1.setCode)(res.status));
|
|
167
|
+
const reader = res.body.getReader();
|
|
168
|
+
const decoder = new TextDecoder();
|
|
169
|
+
let result = "";
|
|
170
|
+
while (true) {
|
|
171
|
+
const { done, value } = await reader.read();
|
|
172
|
+
if (done) break;
|
|
173
|
+
result += decoder.decode(value, { stream: true });
|
|
174
|
+
dispatch((0, slice_1.setResponse)(result));
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const handleResponse = async (res) => {
|
|
178
|
+
dispatch((0, slice_1.setResponse)(await res.text()));
|
|
179
|
+
dispatch((0, slice_1.setCode)(res.status));
|
|
180
|
+
res.headers &&
|
|
181
|
+
dispatch((0, slice_1.setHeaders)(Object.fromEntries(res.headers)));
|
|
182
|
+
};
|
|
183
|
+
const onSubmit = async (data) => {
|
|
184
|
+
dispatch(
|
|
185
|
+
(0, slice_1.setResponse)(
|
|
186
|
+
(0, Translate_1.translate)({
|
|
187
|
+
id: translationIds_1.OPENAPI_REQUEST.FETCHING_MESSAGE,
|
|
188
|
+
message: "Fetching...",
|
|
189
|
+
})
|
|
190
|
+
)
|
|
191
|
+
);
|
|
192
|
+
try {
|
|
193
|
+
await delay(1200);
|
|
194
|
+
const res = await (0, makeRequest_1.default)(postmanRequest, proxy, body);
|
|
195
|
+
if (res.headers.get("content-type")?.includes("text/event-stream")) {
|
|
196
|
+
await handleEventStream(res);
|
|
197
|
+
} else {
|
|
198
|
+
await handleResponse(res);
|
|
199
|
+
}
|
|
200
|
+
} catch (e) {
|
|
201
|
+
console.log(e);
|
|
202
|
+
dispatch(
|
|
203
|
+
(0, slice_1.setResponse)(
|
|
204
|
+
(0, Translate_1.translate)({
|
|
205
|
+
id: translationIds_1.OPENAPI_REQUEST.CONNECTION_FAILED,
|
|
206
|
+
message: "Connection failed",
|
|
207
|
+
})
|
|
208
|
+
)
|
|
209
|
+
);
|
|
210
|
+
dispatch((0, slice_1.clearCode)());
|
|
211
|
+
dispatch((0, slice_1.clearHeaders)());
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
const showServerOptions = serverOptions.length > 0;
|
|
215
|
+
const showAcceptOptions = acceptOptions.length > 1;
|
|
216
|
+
const showRequestBody = contentType !== undefined;
|
|
217
|
+
const showRequestButton = item.servers && !hideSendButton;
|
|
218
|
+
const showAuth = authSelected !== undefined;
|
|
219
|
+
const showParams = allParams.length > 0;
|
|
220
|
+
const requestBodyRequired = item.requestBody?.required;
|
|
221
|
+
if (
|
|
222
|
+
!showAcceptOptions &&
|
|
223
|
+
!showAuth &&
|
|
224
|
+
!showParams &&
|
|
225
|
+
!showRequestBody &&
|
|
226
|
+
!showServerOptions
|
|
227
|
+
) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
const expandAllDetails = () => {
|
|
231
|
+
setExpandAccept(true);
|
|
232
|
+
setExpandAuth(true);
|
|
233
|
+
setExpandBody(true);
|
|
234
|
+
setExpandParams(true);
|
|
235
|
+
setExpandServer(true);
|
|
236
|
+
};
|
|
237
|
+
const collapseAllDetails = () => {
|
|
238
|
+
setExpandAccept(false);
|
|
239
|
+
setExpandAuth(false);
|
|
240
|
+
setExpandBody(false);
|
|
241
|
+
setExpandParams(false);
|
|
242
|
+
setExpandServer(false);
|
|
243
|
+
};
|
|
244
|
+
const allDetailsExpanded =
|
|
245
|
+
expandParams && expandBody && expandServer && expandAuth && expandAccept;
|
|
246
|
+
return react_1.default.createElement(
|
|
247
|
+
react_hook_form_1.FormProvider,
|
|
248
|
+
{ ...methods },
|
|
249
|
+
react_1.default.createElement(
|
|
250
|
+
"form",
|
|
251
|
+
{
|
|
252
|
+
className: "openapi-explorer__request-form",
|
|
253
|
+
onSubmit: methods.handleSubmit(onSubmit),
|
|
254
|
+
},
|
|
255
|
+
react_1.default.createElement(
|
|
256
|
+
"div",
|
|
257
|
+
{ className: "openapi-explorer__request-header-container" },
|
|
258
|
+
react_1.default.createElement(
|
|
259
|
+
"span",
|
|
260
|
+
{ className: "openapi-explorer__request-title" },
|
|
261
|
+
(0, Translate_1.translate)({
|
|
262
|
+
id: translationIds_1.OPENAPI_REQUEST.REQUEST_TITLE,
|
|
263
|
+
message: "Request",
|
|
264
|
+
})
|
|
265
|
+
),
|
|
266
|
+
allDetailsExpanded
|
|
267
|
+
? react_1.default.createElement(
|
|
268
|
+
"span",
|
|
269
|
+
{
|
|
270
|
+
className: "openapi-explorer__expand-details-btn",
|
|
271
|
+
onClick: collapseAllDetails,
|
|
272
|
+
},
|
|
273
|
+
(0, Translate_1.translate)({
|
|
274
|
+
id: translationIds_1.OPENAPI_REQUEST.COLLAPSE_ALL,
|
|
275
|
+
message: "Collapse all",
|
|
276
|
+
})
|
|
277
|
+
)
|
|
278
|
+
: react_1.default.createElement(
|
|
279
|
+
"span",
|
|
280
|
+
{
|
|
281
|
+
className: "openapi-explorer__expand-details-btn",
|
|
282
|
+
onClick: expandAllDetails,
|
|
283
|
+
},
|
|
284
|
+
(0, Translate_1.translate)({
|
|
285
|
+
id: translationIds_1.OPENAPI_REQUEST.EXPAND_ALL,
|
|
286
|
+
message: "Expand all",
|
|
287
|
+
})
|
|
288
|
+
)
|
|
289
|
+
),
|
|
290
|
+
react_1.default.createElement(
|
|
291
|
+
"div",
|
|
292
|
+
{ className: "openapi-explorer__details-outer-container" },
|
|
293
|
+
showServerOptions &&
|
|
294
|
+
item.method !== "event" &&
|
|
295
|
+
react_1.default.createElement(
|
|
296
|
+
"details",
|
|
297
|
+
{
|
|
298
|
+
open: expandServer,
|
|
299
|
+
className: "openapi-explorer__details-container",
|
|
300
|
+
},
|
|
301
|
+
react_1.default.createElement(
|
|
302
|
+
"summary",
|
|
303
|
+
{
|
|
304
|
+
className: "openapi-explorer__details-summary",
|
|
305
|
+
onClick: (e) => {
|
|
306
|
+
e.preventDefault();
|
|
307
|
+
setExpandServer(!expandServer);
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
(0, Translate_1.translate)({
|
|
311
|
+
id: translationIds_1.OPENAPI_REQUEST.BASE_URL_TITLE,
|
|
312
|
+
message: "Base URL",
|
|
313
|
+
})
|
|
314
|
+
),
|
|
315
|
+
react_1.default.createElement(Server_1.default, null)
|
|
316
|
+
),
|
|
317
|
+
showAuth &&
|
|
318
|
+
react_1.default.createElement(
|
|
319
|
+
"details",
|
|
320
|
+
{
|
|
321
|
+
open: expandAuth,
|
|
322
|
+
className: "openapi-explorer__details-container",
|
|
323
|
+
},
|
|
324
|
+
react_1.default.createElement(
|
|
325
|
+
"summary",
|
|
326
|
+
{
|
|
327
|
+
className: "openapi-explorer__details-summary",
|
|
328
|
+
onClick: (e) => {
|
|
329
|
+
e.preventDefault();
|
|
330
|
+
setExpandAuth(!expandAuth);
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
(0, Translate_1.translate)({
|
|
334
|
+
id: translationIds_1.OPENAPI_REQUEST.AUTH_TITLE,
|
|
335
|
+
message: "Auth",
|
|
336
|
+
})
|
|
337
|
+
),
|
|
338
|
+
react_1.default.createElement(Authorization_1.default, null)
|
|
339
|
+
),
|
|
340
|
+
showParams &&
|
|
341
|
+
react_1.default.createElement(
|
|
342
|
+
"details",
|
|
343
|
+
{
|
|
344
|
+
open:
|
|
345
|
+
expandParams || Object.keys(methods.formState.errors).length,
|
|
346
|
+
className: "openapi-explorer__details-container",
|
|
347
|
+
},
|
|
348
|
+
react_1.default.createElement(
|
|
349
|
+
"summary",
|
|
350
|
+
{
|
|
351
|
+
className: "openapi-explorer__details-summary",
|
|
352
|
+
onClick: (e) => {
|
|
353
|
+
e.preventDefault();
|
|
354
|
+
setExpandParams(!expandParams);
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
(0, Translate_1.translate)({
|
|
358
|
+
id: translationIds_1.OPENAPI_REQUEST.PARAMETERS_TITLE,
|
|
359
|
+
message: "Parameters",
|
|
360
|
+
})
|
|
361
|
+
),
|
|
362
|
+
react_1.default.createElement(ParamOptions_1.default, null)
|
|
363
|
+
),
|
|
364
|
+
showRequestBody &&
|
|
365
|
+
react_1.default.createElement(
|
|
366
|
+
"details",
|
|
367
|
+
{
|
|
368
|
+
open: expandBody,
|
|
369
|
+
className: "openapi-explorer__details-container",
|
|
370
|
+
},
|
|
371
|
+
react_1.default.createElement(
|
|
372
|
+
"summary",
|
|
373
|
+
{
|
|
374
|
+
className: "openapi-explorer__details-summary",
|
|
375
|
+
onClick: (e) => {
|
|
376
|
+
e.preventDefault();
|
|
377
|
+
setExpandBody(!expandBody);
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
(0, Translate_1.translate)({
|
|
381
|
+
id: translationIds_1.OPENAPI_REQUEST.BODY_TITLE,
|
|
382
|
+
message: "Body",
|
|
383
|
+
}),
|
|
384
|
+
requestBodyRequired &&
|
|
385
|
+
react_1.default.createElement(
|
|
386
|
+
"span",
|
|
387
|
+
{ className: "openapi-schema__required" },
|
|
388
|
+
"\u00A0",
|
|
389
|
+
(0, Translate_1.translate)({
|
|
390
|
+
id: translationIds_1.OPENAPI_REQUEST.REQUIRED_LABEL,
|
|
391
|
+
message: "required",
|
|
392
|
+
})
|
|
393
|
+
)
|
|
394
|
+
),
|
|
395
|
+
react_1.default.createElement(
|
|
396
|
+
react_1.default.Fragment,
|
|
397
|
+
null,
|
|
398
|
+
react_1.default.createElement(ContentType_1.default, null),
|
|
399
|
+
react_1.default.createElement(Body_1.default, {
|
|
400
|
+
jsonRequestBodyExample: item.jsonRequestBodyExample,
|
|
401
|
+
requestBodyMetadata: item.requestBody,
|
|
402
|
+
required: requestBodyRequired,
|
|
403
|
+
})
|
|
404
|
+
)
|
|
405
|
+
),
|
|
406
|
+
showAcceptOptions &&
|
|
407
|
+
react_1.default.createElement(
|
|
408
|
+
"details",
|
|
409
|
+
{
|
|
410
|
+
open: expandAccept,
|
|
411
|
+
className: "openapi-explorer__details-container",
|
|
412
|
+
},
|
|
413
|
+
react_1.default.createElement(
|
|
414
|
+
"summary",
|
|
415
|
+
{
|
|
416
|
+
className: "openapi-explorer__details-summary",
|
|
417
|
+
onClick: (e) => {
|
|
418
|
+
e.preventDefault();
|
|
419
|
+
setExpandAccept(!expandAccept);
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
(0, Translate_1.translate)({
|
|
423
|
+
id: translationIds_1.OPENAPI_REQUEST.ACCEPT_TITLE,
|
|
424
|
+
message: "Accept",
|
|
425
|
+
})
|
|
426
|
+
),
|
|
427
|
+
react_1.default.createElement(Accept_1.default, null)
|
|
428
|
+
),
|
|
429
|
+
showRequestButton &&
|
|
430
|
+
item.method !== "event" &&
|
|
431
|
+
react_1.default.createElement(
|
|
432
|
+
"button",
|
|
433
|
+
{ className: "openapi-explorer__request-btn", type: "submit" },
|
|
434
|
+
(0, Translate_1.translate)({
|
|
435
|
+
id: translationIds_1.OPENAPI_REQUEST.SEND_BUTTON,
|
|
436
|
+
message: "Send API Request",
|
|
437
|
+
})
|
|
438
|
+
)
|
|
439
|
+
)
|
|
440
|
+
)
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
exports.default = Request;
|