docusaurus-theme-openapi-docs 0.0.0-619 → 0.0.0-685
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +2 -0
- package/lib/index.js +53 -27
- package/lib/markdown/createDescription.d.ts +1 -0
- package/lib/markdown/createDescription.js +8 -11
- package/lib/markdown/schema.d.ts +3 -0
- package/lib/markdown/schema.js +138 -139
- package/lib/markdown/utils.d.ts +8 -0
- package/lib/markdown/utils.js +36 -42
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -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-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Accept/slice.js +7 -5
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -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.js +74 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.js +4 -10
- package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/index.js +157 -0
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Authorization/slice.js +23 -16
- package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/Body/index.js +363 -0
- package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/slice.js +21 -12
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +20 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +406 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +174 -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-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ContentType/slice.js +7 -5
- 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 +25 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
- package/{lib-next/theme/ApiDemoPanel/FormFileUpload/styles.module.css → lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
- package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +161 -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/{src/theme/ApiDemoPanel/FormSelect/styles.module.css → lib/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
- 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 +154 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.js +83 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +194 -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/{src/theme/ApiDemoPanel/ParamOptions/styles.module.css → lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
- package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.js +210 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ParamOptions/slice.js +7 -5
- package/lib/theme/ApiExplorer/Request/_Request.scss +122 -0
- package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Request/index.js +365 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/{lib-next/theme/ApiDemoPanel/Execute → lib/theme/ApiExplorer/Request}/makeRequest.js +10 -9
- package/lib/theme/ApiExplorer/Response/_Response.scss +119 -0
- package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Response/index.js +190 -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/{src/theme/ApiDemoPanel/Request/styles.module.css → lib/theme/ApiExplorer/Server/_Server.scss} +15 -7
- package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Server/index.js +187 -0
- package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Server/slice.js +10 -5
- package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/buildPostmanRequest.js +27 -40
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +37 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/persistanceMiddleware.js +11 -14
- package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.js +14 -13
- package/lib/theme/ApiItem/Layout/index.d.ts +4 -0
- package/lib/theme/ApiItem/Layout/index.js +78 -56
- package/lib/theme/ApiItem/hooks.d.ts +12 -0
- package/lib/theme/ApiItem/hooks.js +5 -10
- package/lib/theme/ApiItem/index.d.ts +4 -0
- package/lib/theme/ApiItem/index.js +141 -118
- package/lib/theme/ApiItem/store.d.ts +46 -0
- package/lib/theme/ApiItem/store.js +44 -34
- package/lib/theme/ApiLogo/index.d.ts +2 -0
- package/lib/theme/ApiLogo/index.js +34 -32
- package/lib/theme/ApiTabs/_ApiTabs.scss +140 -0
- package/lib/theme/ApiTabs/index.js +105 -190
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
- package/lib/theme/DiscriminatorTabs/index.js +102 -189
- package/lib/theme/Markdown/Details/_Details.scss +119 -0
- package/lib/theme/MimeTabs/_MimeTabs.scss +69 -0
- package/lib/theme/MimeTabs/index.js +125 -199
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.js +9 -8
- package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/lib/theme/ResponseSamples/index.js +2 -7
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.js +31 -22
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +64 -0
- package/lib/theme/SchemaTabs/index.js +97 -185
- package/lib/theme/styles.scss +160 -0
- package/lib/types.d.ts +157 -0
- package/lib/types.js +8 -1
- package/package.json +17 -23
- package/src/index.ts +33 -3
- package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
- package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.tsx +2 -2
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +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.js +74 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/index.tsx +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/slice.ts +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/index.tsx +64 -41
- package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.tsx +94 -34
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
- package/src/theme/ApiExplorer/CodeTabs/index.js +174 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.tsx +2 -2
- package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.tsx +1 -3
- package/src/theme/{ApiDemoPanel/FormFileUpload/styles.module.css → ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.tsx +10 -6
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.tsx +8 -12
- package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.tsx +6 -3
- package/{lib/theme/ApiDemoPanel/FormSelect/styles.module.css → src/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.tsx +5 -3
- 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 +112 -0
- package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +87 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +156 -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/{lib-next/theme/ApiDemoPanel/ParamOptions/styles.module.css → src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
- package/src/theme/ApiExplorer/ParamOptions/index.tsx +145 -0
- package/src/theme/ApiExplorer/Request/_Request.scss +122 -0
- package/src/theme/ApiExplorer/Request/index.tsx +286 -0
- package/src/theme/{ApiDemoPanel/Execute → ApiExplorer/Request}/makeRequest.ts +9 -6
- package/src/theme/ApiExplorer/Response/_Response.scss +119 -0
- package/src/theme/ApiExplorer/Response/index.tsx +154 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.ts +22 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.tsx +5 -3
- package/{lib/theme/ApiDemoPanel/Request/styles.module.css → src/theme/ApiExplorer/Server/_Server.scss} +15 -7
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/index.tsx +13 -17
- package/src/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.ts +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/index.tsx +14 -17
- package/src/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.ts +1 -1
- package/src/theme/ApiItem/index.tsx +7 -7
- package/src/theme/ApiItem/store.ts +7 -7
- package/src/theme/ApiTabs/_ApiTabs.scss +140 -0
- package/src/theme/ApiTabs/index.js +105 -190
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
- package/src/theme/DiscriminatorTabs/index.js +102 -189
- package/src/theme/Markdown/Details/_Details.scss +119 -0
- package/src/theme/MimeTabs/_MimeTabs.scss +69 -0
- package/src/theme/MimeTabs/index.js +125 -199
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.js +9 -8
- package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/src/theme/ResponseSamples/index.js +2 -7
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.js +31 -22
- package/src/theme/SchemaTabs/_SchemaTabs.scss +64 -0
- package/src/theme/SchemaTabs/index.js +97 -185
- package/src/theme/styles.scss +160 -0
- package/src/theme-openapi.d.ts +90 -47
- package/tsconfig.json +6 -3
- package/lib/postman-code-generators.d.ts +0 -9
- package/lib/react-magic-dropzone.d.ts +0 -9
- package/lib/theme/ApiDemoPanel/Accept/index.js +0 -32
- package/lib/theme/ApiDemoPanel/Accept/slice.js +0 -31
- package/lib/theme/ApiDemoPanel/Authorization/index.js +0 -107
- package/lib/theme/ApiDemoPanel/Authorization/slice.js +0 -123
- package/lib/theme/ApiDemoPanel/Body/index.js +0 -256
- package/lib/theme/ApiDemoPanel/Body/slice.js +0 -102
- package/lib/theme/ApiDemoPanel/CodeTabs/index.js +0 -161
- package/lib/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/lib/theme/ApiDemoPanel/ContentType/index.js +0 -32
- package/lib/theme/ApiDemoPanel/ContentType/slice.js +0 -31
- package/lib/theme/ApiDemoPanel/Curl/index.js +0 -240
- package/lib/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/lib/theme/ApiDemoPanel/Execute/index.js +0 -151
- package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +0 -181
- package/lib/theme/ApiDemoPanel/Export/index.js +0 -47
- package/lib/theme/ApiDemoPanel/FloatingButton/index.js +0 -30
- package/lib/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +0 -83
- package/lib/theme/ApiDemoPanel/FormFileUpload/styles.module.css +0 -75
- package/lib/theme/ApiDemoPanel/FormItem/index.js +0 -38
- package/lib/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
- package/lib/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/lib/theme/ApiDemoPanel/FormSelect/index.js +0 -34
- package/lib/theme/ApiDemoPanel/FormTextInput/index.js +0 -28
- package/lib/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/lib/theme/ApiDemoPanel/LiveEditor/index.js +0 -62
- package/lib/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -56
- package/lib/theme/ApiDemoPanel/ParamOptions/index.js +0 -216
- package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +0 -34
- package/lib/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -176
- package/lib/theme/ApiDemoPanel/Request/index.js +0 -67
- package/lib/theme/ApiDemoPanel/Response/index.js +0 -66
- package/lib/theme/ApiDemoPanel/Response/slice.js +0 -36
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -257
- package/lib/theme/ApiDemoPanel/Server/index.js +0 -104
- package/lib/theme/ApiDemoPanel/Server/slice.js +0 -40
- package/lib/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +0 -303
- package/lib/theme/ApiDemoPanel/index.js +0 -41
- package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +0 -59
- package/lib/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
- package/lib/theme/ApiDemoPanel/react-modal.d.ts +0 -8
- package/lib/theme/ApiTabs/styles.module.css +0 -120
- package/lib/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/lib/theme/MimeTabs/styles.module.css +0 -126
- package/lib/theme/ParamsItem/styles.module.css +0 -24
- package/lib/theme/ResponseSamples/styles.module.css +0 -7
- package/lib/theme/SchemaItem/styles.module.css +0 -38
- package/lib/theme/SchemaTabs/styles.module.css +0 -110
- package/lib/theme/styles.css +0 -520
- package/lib/theme-classic.d.ts +0 -13
- package/lib/theme-openapi.d.ts +0 -234
- package/lib/theme-translations.d.ts +0 -9
- package/lib-next/index.js +0 -29
- package/lib-next/markdown/createDescription.js +0 -13
- package/lib-next/markdown/schema.js +0 -153
- package/lib-next/markdown/utils.js +0 -44
- package/lib-next/postman-code-generators.d.ts +0 -9
- package/lib-next/react-magic-dropzone.d.ts +0 -9
- package/lib-next/theme/ApiDemoPanel/Accept/index.js +0 -30
- package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +0 -29
- package/lib-next/theme/ApiDemoPanel/Authorization/index.js +0 -142
- package/lib-next/theme/ApiDemoPanel/Body/index.js +0 -324
- package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +0 -201
- package/lib-next/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/lib-next/theme/ApiDemoPanel/ContentType/index.js +0 -30
- package/lib-next/theme/ApiDemoPanel/Curl/index.js +0 -283
- package/lib-next/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/lib-next/theme/ApiDemoPanel/Execute/index.js +0 -167
- package/lib-next/theme/ApiDemoPanel/Export/index.js +0 -45
- package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +0 -22
- package/lib-next/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +0 -106
- package/lib-next/theme/ApiDemoPanel/FormItem/index.js +0 -36
- package/lib-next/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +0 -26
- package/lib-next/theme/ApiDemoPanel/FormSelect/styles.module.css +0 -51
- package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +0 -24
- package/lib-next/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +0 -59
- package/lib-next/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -53
- package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +0 -292
- package/lib-next/theme/ApiDemoPanel/Request/index.js +0 -60
- package/lib-next/theme/ApiDemoPanel/Request/styles.module.css +0 -18
- package/lib-next/theme/ApiDemoPanel/Response/index.js +0 -67
- package/lib-next/theme/ApiDemoPanel/Response/slice.js +0 -23
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -274
- package/lib-next/theme/ApiDemoPanel/Server/index.js +0 -132
- package/lib-next/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/lib-next/theme/ApiDemoPanel/index.js +0 -28
- package/lib-next/theme/ApiDemoPanel/storage-utils.js +0 -33
- package/lib-next/theme/ApiItem/Layout/index.js +0 -68
- package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -17
- package/lib-next/theme/ApiItem/hooks.js +0 -10
- package/lib-next/theme/ApiItem/index.js +0 -155
- package/lib-next/theme/ApiItem/store.js +0 -38
- package/lib-next/theme/ApiLogo/index.js +0 -48
- package/lib-next/theme/ApiTabs/index.js +0 -277
- package/lib-next/theme/ApiTabs/styles.module.css +0 -120
- package/lib-next/theme/DiscriminatorTabs/index.js +0 -272
- package/lib-next/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/lib-next/theme/MimeTabs/index.js +0 -295
- package/lib-next/theme/MimeTabs/styles.module.css +0 -126
- package/lib-next/theme/ParamsItem/index.js +0 -135
- package/lib-next/theme/ParamsItem/styles.module.css +0 -24
- package/lib-next/theme/ResponseSamples/index.js +0 -27
- package/lib-next/theme/ResponseSamples/styles.module.css +0 -7
- package/lib-next/theme/SchemaItem/index.js +0 -114
- package/lib-next/theme/SchemaItem/styles.module.css +0 -38
- package/lib-next/theme/SchemaTabs/index.js +0 -270
- package/lib-next/theme/SchemaTabs/styles.module.css +0 -110
- package/lib-next/theme/styles.css +0 -520
- package/lib-next/theme-classic.d.ts +0 -13
- package/lib-next/theme-openapi.d.ts +0 -234
- package/lib-next/theme-translations.d.ts +0 -9
- package/lib-next/types.js +0 -1
- package/src/theme/ApiDemoPanel/Body/json2xml.js +0 -43
- package/src/theme/ApiDemoPanel/CodeTabs/index.tsx +0 -239
- package/src/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/src/theme/ApiDemoPanel/Curl/languages.json +0 -1386
- package/src/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/src/theme/ApiDemoPanel/Execute/index.tsx +0 -189
- package/src/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/src/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/src/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +0 -34
- package/src/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +0 -75
- package/src/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +0 -62
- package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +0 -326
- package/src/theme/ApiDemoPanel/Request/index.tsx +0 -71
- package/src/theme/ApiDemoPanel/Response/index.tsx +0 -75
- package/src/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/src/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
- package/src/theme/ApiDemoPanel/react-modal.d.ts +0 -8
- package/src/theme/ApiTabs/styles.module.css +0 -120
- package/src/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/src/theme/MimeTabs/styles.module.css +0 -126
- package/src/theme/ParamsItem/styles.module.css +0 -24
- package/src/theme/ResponseSamples/styles.module.css +0 -7
- package/src/theme/SchemaItem/styles.module.css +0 -38
- package/src/theme/SchemaTabs/styles.module.css +0 -110
- package/src/theme/styles.css +0 -520
- /package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/json2xml.js +0 -0
- /package/{lib-next/theme/ApiDemoPanel/Curl → lib/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.ts +0 -0
- /package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/Body/json2xml.js +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.ts +0 -0
- /package/{lib/theme/ApiDemoPanel/Curl → src/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Export/index.tsx +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.ts +0 -0
- /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/postman-collection.d.ts +0 -0
- /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/react-modal.d.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.ts +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Copyright (c) Palo Alto Networks
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import { ErrorMessage } from "@hookform/error-message";
|
|
11
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
12
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
13
|
+
import { useTypedDispatch } from "@theme/ApiItem/hooks";
|
|
14
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
15
|
+
|
|
16
|
+
export interface ParamProps {
|
|
17
|
+
param: Param;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default function ParamBooleanFormItem({ param }: ParamProps) {
|
|
21
|
+
const dispatch = useTypedDispatch();
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
control,
|
|
25
|
+
formState: { errors },
|
|
26
|
+
} = useFormContext();
|
|
27
|
+
|
|
28
|
+
const showErrorMessage = errors?.paramBoolean;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
<Controller
|
|
33
|
+
control={control}
|
|
34
|
+
rules={{ required: param.required ? "This field is required" : false }}
|
|
35
|
+
name="paramBoolean"
|
|
36
|
+
render={({ field: { onChange, name } }) => (
|
|
37
|
+
<FormSelect
|
|
38
|
+
name={name}
|
|
39
|
+
options={["---", "true", "false"]}
|
|
40
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
41
|
+
const val = e.target.value;
|
|
42
|
+
dispatch(
|
|
43
|
+
setParam({
|
|
44
|
+
...param,
|
|
45
|
+
value: val === "---" ? undefined : val,
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
onChange(val);
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
/>
|
|
53
|
+
{showErrorMessage && (
|
|
54
|
+
<ErrorMessage
|
|
55
|
+
errors={errors}
|
|
56
|
+
name="paramBoolean"
|
|
57
|
+
render={({ message }) => (
|
|
58
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
59
|
+
)}
|
|
60
|
+
/>
|
|
61
|
+
)}
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Copyright (c) Palo Alto Networks
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import { ErrorMessage } from "@hookform/error-message";
|
|
11
|
+
import FormMultiSelect from "@theme/ApiExplorer/FormMultiSelect";
|
|
12
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
13
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
14
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
15
|
+
|
|
16
|
+
export interface ParamProps {
|
|
17
|
+
param: Param;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default function ParamMultiSelectFormItem({ param }: ParamProps) {
|
|
21
|
+
const {
|
|
22
|
+
control,
|
|
23
|
+
formState: { errors },
|
|
24
|
+
} = useFormContext();
|
|
25
|
+
|
|
26
|
+
const showErrorMessage = errors?.paramMultiSelect;
|
|
27
|
+
|
|
28
|
+
const dispatch = useTypedDispatch();
|
|
29
|
+
|
|
30
|
+
const options = param.schema?.items?.enum ?? [];
|
|
31
|
+
|
|
32
|
+
const pathParams = useTypedSelector((state: any) => state.params.path);
|
|
33
|
+
const queryParams = useTypedSelector((state: any) => state.params.query);
|
|
34
|
+
const cookieParams = useTypedSelector((state: any) => state.params.cookie);
|
|
35
|
+
const headerParams = useTypedSelector((state: any) => state.params.header);
|
|
36
|
+
|
|
37
|
+
const paramTypeToWatch = pathParams.length
|
|
38
|
+
? pathParams
|
|
39
|
+
: queryParams.length
|
|
40
|
+
? queryParams
|
|
41
|
+
: cookieParams.length
|
|
42
|
+
? cookieParams
|
|
43
|
+
: headerParams;
|
|
44
|
+
|
|
45
|
+
const handleChange = (e: any, onChange: any) => {
|
|
46
|
+
const values = Array.prototype.filter
|
|
47
|
+
.call(e.target.options, (o) => o.selected)
|
|
48
|
+
.map((o) => o.value);
|
|
49
|
+
|
|
50
|
+
dispatch(
|
|
51
|
+
setParam({
|
|
52
|
+
...param,
|
|
53
|
+
value: values.length > 0 ? values : undefined,
|
|
54
|
+
})
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
onChange(paramTypeToWatch);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<>
|
|
62
|
+
<Controller
|
|
63
|
+
control={control}
|
|
64
|
+
rules={{ required: param.required ? "This field is required" : false }}
|
|
65
|
+
name="paramMultiSelect"
|
|
66
|
+
render={({ field: { onChange, name } }) => (
|
|
67
|
+
<FormMultiSelect
|
|
68
|
+
options={options as string[]}
|
|
69
|
+
name={name}
|
|
70
|
+
onChange={(e: any) => handleChange(e, onChange)}
|
|
71
|
+
showErrors={showErrorMessage}
|
|
72
|
+
/>
|
|
73
|
+
)}
|
|
74
|
+
/>
|
|
75
|
+
{showErrorMessage && (
|
|
76
|
+
<ErrorMessage
|
|
77
|
+
errors={errors}
|
|
78
|
+
name="paramMultiSelect"
|
|
79
|
+
render={({ message }) => (
|
|
80
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
81
|
+
)}
|
|
82
|
+
/>
|
|
83
|
+
)}
|
|
84
|
+
</>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Copyright (c) Palo Alto Networks
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import { ErrorMessage } from "@hookform/error-message";
|
|
11
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
12
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
13
|
+
import { useTypedDispatch } from "@theme/ApiItem/hooks";
|
|
14
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
15
|
+
|
|
16
|
+
export interface ParamProps {
|
|
17
|
+
param: Param;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default function ParamSelectFormItem({ param }: ParamProps) {
|
|
21
|
+
const {
|
|
22
|
+
control,
|
|
23
|
+
formState: { errors },
|
|
24
|
+
} = useFormContext();
|
|
25
|
+
|
|
26
|
+
const showErrorMessage = errors?.paramSelect;
|
|
27
|
+
|
|
28
|
+
const dispatch = useTypedDispatch();
|
|
29
|
+
|
|
30
|
+
const options = param.schema?.enum ?? [];
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
<Controller
|
|
35
|
+
control={control}
|
|
36
|
+
rules={{ required: param.required ? "This field is required" : false }}
|
|
37
|
+
name="paramSelect"
|
|
38
|
+
render={({ field: { onChange, name } }) => (
|
|
39
|
+
<FormSelect
|
|
40
|
+
options={["---", ...(options as string[])]}
|
|
41
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
42
|
+
const val = e.target.value;
|
|
43
|
+
dispatch(
|
|
44
|
+
setParam({
|
|
45
|
+
...param,
|
|
46
|
+
value: val === "---" ? undefined : val,
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
onChange(val);
|
|
50
|
+
}}
|
|
51
|
+
/>
|
|
52
|
+
)}
|
|
53
|
+
/>
|
|
54
|
+
{showErrorMessage && (
|
|
55
|
+
<ErrorMessage
|
|
56
|
+
errors={errors}
|
|
57
|
+
name="paramSelect"
|
|
58
|
+
render={({ message }) => (
|
|
59
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
60
|
+
)}
|
|
61
|
+
/>
|
|
62
|
+
)}
|
|
63
|
+
</>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Copyright (c) Palo Alto Networks
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import FormTextInput from "@theme/ApiExplorer/FormTextInput";
|
|
11
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
12
|
+
import { useTypedDispatch } from "@theme/ApiItem/hooks";
|
|
13
|
+
|
|
14
|
+
export interface ParamProps {
|
|
15
|
+
param: Param;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default function ParamTextFormItem({ param }: ParamProps) {
|
|
19
|
+
const dispatch = useTypedDispatch();
|
|
20
|
+
return (
|
|
21
|
+
<FormTextInput
|
|
22
|
+
isRequired={param.required}
|
|
23
|
+
paramName={param.name}
|
|
24
|
+
placeholder={param.description || param.name}
|
|
25
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
|
26
|
+
dispatch(
|
|
27
|
+
setParam({
|
|
28
|
+
...param,
|
|
29
|
+
value:
|
|
30
|
+
param.in === "path" || param.in === "query"
|
|
31
|
+
? e.target.value.replace(/\s/g, "%20")
|
|
32
|
+
: e.target.value,
|
|
33
|
+
})
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -1,61 +1,40 @@
|
|
|
1
|
-
.
|
|
1
|
+
.openapi-explorer__plus-btn--expanded {
|
|
2
2
|
transition: transform 0.2s ease;
|
|
3
3
|
display: inline-block;
|
|
4
4
|
transform: rotate(0deg);
|
|
5
5
|
transform-origin: center;
|
|
6
6
|
margin-right: 6px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.plusExpanded {
|
|
10
|
-
composes: plus;
|
|
11
7
|
transform: rotate(45deg);
|
|
12
8
|
}
|
|
13
9
|
|
|
14
|
-
.
|
|
10
|
+
.openapi-explorer__show-more-btn {
|
|
11
|
+
width: 100%;
|
|
15
12
|
-webkit-appearance: none;
|
|
16
13
|
-moz-appearance: none;
|
|
17
14
|
appearance: none;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
font-size: var(--ifm-code-font-size);
|
|
21
|
-
/* font-weight: var(--ifm-button-font-weight); */
|
|
22
|
-
/* line-height: 1.5; */
|
|
23
|
-
|
|
15
|
+
margin-left: 0.25rem;
|
|
16
|
+
margin-bottom: 0.5rem;
|
|
24
17
|
padding: 0;
|
|
25
|
-
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
font-size: var(--openapi-explorer-font-size-input);
|
|
26
20
|
user-select: none;
|
|
27
21
|
white-space: nowrap;
|
|
28
|
-
|
|
29
22
|
border: 0px solid transparent;
|
|
30
|
-
|
|
31
23
|
display: block;
|
|
32
|
-
width: 100%;
|
|
33
|
-
|
|
34
24
|
background-color: transparent;
|
|
35
|
-
|
|
36
25
|
color: var(--ifm-color-primary);
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
margin-top: var(--ifm-pre-padding);
|
|
39
|
-
margin-bottom: 0;
|
|
40
26
|
text-align: left;
|
|
41
|
-
display: block;
|
|
42
|
-
}
|
|
43
27
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
color: var(--ifm-color-primary-hover);
|
|
48
|
-
}
|
|
28
|
+
&:hover {
|
|
29
|
+
color: var(--ifm-color-primary-hover);
|
|
30
|
+
}
|
|
49
31
|
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
&:first-child {
|
|
33
|
+
margin-top: 0;
|
|
34
|
+
}
|
|
52
35
|
}
|
|
53
36
|
|
|
54
|
-
|
|
55
|
-
margin-bottom: 0;
|
|
56
|
-
} */
|
|
57
|
-
|
|
58
|
-
.buttonDelete {
|
|
37
|
+
.openapi-explorer__delete-btn {
|
|
59
38
|
-webkit-appearance: none;
|
|
60
39
|
-moz-appearance: none;
|
|
61
40
|
appearance: none;
|
|
@@ -88,89 +67,56 @@
|
|
|
88
67
|
color: var(--ifm-pre-color);
|
|
89
68
|
border-radius: 4px;
|
|
90
69
|
margin-left: 4px;
|
|
91
|
-
}
|
|
92
70
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
71
|
+
&:focus {
|
|
72
|
+
outline: 0;
|
|
73
|
+
}
|
|
96
74
|
|
|
97
|
-
|
|
98
|
-
|
|
75
|
+
&:active {
|
|
76
|
+
box-shadow: inset 0px 0px 0px 2px var(--openapi-input-border);
|
|
77
|
+
}
|
|
99
78
|
}
|
|
100
79
|
|
|
101
|
-
.
|
|
80
|
+
.openapi-explorer__thin-btn {
|
|
102
81
|
-webkit-appearance: none;
|
|
103
82
|
-moz-appearance: none;
|
|
104
|
-
appearance: none;
|
|
105
|
-
|
|
106
83
|
cursor: pointer;
|
|
107
|
-
font-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
84
|
+
font-weight: bold;
|
|
85
|
+
padding: 0.5rem 1rem;
|
|
86
|
+
font-size: 12px;
|
|
111
87
|
transition-property: color, background, border-color, box-shadow;
|
|
112
88
|
transition-duration: 100ms, 100ms, 100ms,
|
|
113
89
|
var(--ifm-button-transition-duration);
|
|
114
90
|
transition-timing-function: cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
115
|
-
|
|
116
|
-
-webkit-user-select: none;
|
|
117
91
|
user-select: none;
|
|
118
92
|
white-space: nowrap;
|
|
119
|
-
|
|
120
93
|
background-color: transparent;
|
|
121
94
|
color: var(--openapi-input-border);
|
|
122
95
|
border: 1px solid var(--openapi-input-border);
|
|
123
96
|
border-radius: var(--ifm-pre-border-radius);
|
|
124
|
-
/* height: 48px; */
|
|
125
|
-
padding: 3px 60px 3px 12px;
|
|
126
|
-
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
127
|
-
margin-bottom: var(--ifm-pre-padding);
|
|
128
|
-
|
|
129
|
-
display: block;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.buttonThin:hover {
|
|
133
|
-
color: var(--openapi-inverse-color);
|
|
134
|
-
background-color: var(--openapi-input-border);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.buttonThin:focus {
|
|
138
|
-
outline: 0;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.buttonThin:active {
|
|
142
|
-
box-shadow: inset 0 0 0 1px var(--openapi-input-border),
|
|
143
|
-
inset 0 0 0 2px var(--openapi-inverse-color);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.inputBase {
|
|
147
97
|
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
148
|
-
|
|
149
|
-
background-color: var(--openapi-input-background);
|
|
150
|
-
border: none;
|
|
151
|
-
outline: none;
|
|
152
|
-
width: 100%;
|
|
153
|
-
font-size: var(--ifm-code-font-size);
|
|
154
|
-
color: var(--ifm-pre-color);
|
|
155
|
-
padding: 12px var(--ifm-pre-padding);
|
|
98
|
+
text-transform: uppercase;
|
|
156
99
|
|
|
157
|
-
|
|
158
|
-
|
|
100
|
+
&:hover {
|
|
101
|
+
color: var(--openapi-inverse-color);
|
|
102
|
+
background-color: var(--openapi-input-border);
|
|
103
|
+
}
|
|
159
104
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
105
|
+
&:focus {
|
|
106
|
+
outline: 0;
|
|
107
|
+
}
|
|
163
108
|
|
|
164
|
-
|
|
165
|
-
|
|
109
|
+
&:active {
|
|
110
|
+
box-shadow: inset 0 0 0 1px var(--openapi-input-border),
|
|
111
|
+
inset 0 0 0 2px var(--openapi-inverse-color);
|
|
112
|
+
}
|
|
166
113
|
}
|
|
167
114
|
|
|
168
|
-
.
|
|
115
|
+
.openapi-explorer__show-options {
|
|
169
116
|
visibility: visible;
|
|
170
|
-
margin-top: var(--ifm-pre-padding);
|
|
171
117
|
}
|
|
172
118
|
|
|
173
|
-
.
|
|
119
|
+
.openapi-explorer__hide-options {
|
|
174
120
|
display: none;
|
|
175
121
|
visibility: hidden;
|
|
176
122
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Copyright (c) Palo Alto Networks
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import React, { useState } from "react";
|
|
9
|
+
|
|
10
|
+
import FormItem from "@theme/ApiExplorer/FormItem";
|
|
11
|
+
import ParamArrayFormItem from "@theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem";
|
|
12
|
+
import ParamBooleanFormItem from "@theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem";
|
|
13
|
+
import ParamMultiSelectFormItem from "@theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem";
|
|
14
|
+
import ParamSelectFormItem from "@theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem";
|
|
15
|
+
import ParamTextFormItem from "@theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem";
|
|
16
|
+
import { useTypedSelector } from "@theme/ApiItem/hooks";
|
|
17
|
+
|
|
18
|
+
import { Param } from "./slice";
|
|
19
|
+
|
|
20
|
+
export interface ParamProps {
|
|
21
|
+
param: Param;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function ParamOption({ param }: ParamProps) {
|
|
25
|
+
if (param.schema?.type === "array" && param.schema.items?.enum) {
|
|
26
|
+
return <ParamMultiSelectFormItem param={param} />;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (param.schema?.type === "array") {
|
|
30
|
+
return <ParamArrayFormItem param={param} />;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (param.schema?.enum) {
|
|
34
|
+
return <ParamSelectFormItem param={param} />;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (param.schema?.type === "boolean") {
|
|
38
|
+
return <ParamBooleanFormItem param={param} />;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// integer, number, string, int32, int64, float, double, object, byte, binary,
|
|
42
|
+
// date-time, date, password
|
|
43
|
+
return <ParamTextFormItem param={param} />;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function ParamOptionWrapper({ param }: ParamProps) {
|
|
47
|
+
return (
|
|
48
|
+
<FormItem label={param.name} type={param.in} required={param.required}>
|
|
49
|
+
<ParamOption param={param} />
|
|
50
|
+
</FormItem>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function ParamOptions() {
|
|
55
|
+
const [showOptional, setShowOptional] = useState(false);
|
|
56
|
+
|
|
57
|
+
const pathParams = useTypedSelector((state: any) => state.params.path);
|
|
58
|
+
const queryParams = useTypedSelector((state: any) => state.params.query);
|
|
59
|
+
const cookieParams = useTypedSelector((state: any) => state.params.cookie);
|
|
60
|
+
const headerParams = useTypedSelector((state: any) => state.params.header);
|
|
61
|
+
|
|
62
|
+
const allParams = [
|
|
63
|
+
...pathParams,
|
|
64
|
+
...queryParams,
|
|
65
|
+
...cookieParams,
|
|
66
|
+
...headerParams,
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const requiredParams = allParams.filter((p) => p.required);
|
|
70
|
+
const optionalParams = allParams.filter((p) => !p.required);
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
{/* Required Parameters */}
|
|
75
|
+
{requiredParams.map((param) => (
|
|
76
|
+
<ParamOptionWrapper key={`${param.in}-${param.name}`} param={param} />
|
|
77
|
+
))}
|
|
78
|
+
|
|
79
|
+
{/* Optional Parameters */}
|
|
80
|
+
{optionalParams.length > 0 && (
|
|
81
|
+
<>
|
|
82
|
+
<button
|
|
83
|
+
className="openapi-explorer__show-more-btn"
|
|
84
|
+
onClick={() => setShowOptional((prev) => !prev)}
|
|
85
|
+
>
|
|
86
|
+
<span
|
|
87
|
+
style={{
|
|
88
|
+
width: "1.5em",
|
|
89
|
+
display: "inline-block",
|
|
90
|
+
textAlign: "center",
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
<span
|
|
94
|
+
className={
|
|
95
|
+
showOptional
|
|
96
|
+
? "openapi-explorer__plus-btn--expanded"
|
|
97
|
+
: "openapi-explorer__plus-btn"
|
|
98
|
+
}
|
|
99
|
+
>
|
|
100
|
+
<div>
|
|
101
|
+
<svg
|
|
102
|
+
style={{
|
|
103
|
+
fill: "currentColor",
|
|
104
|
+
width: "10px",
|
|
105
|
+
height: "10px",
|
|
106
|
+
}}
|
|
107
|
+
height="16"
|
|
108
|
+
viewBox="0 0 16 16"
|
|
109
|
+
width="16"
|
|
110
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
111
|
+
>
|
|
112
|
+
<path
|
|
113
|
+
d="M9 7h6a1 1 0 0 1 0 2H9v6a1 1 0 0 1-2 0V9H1a1 1 0 1 1 0-2h6V1a1 1 0 1 1 2 0z"
|
|
114
|
+
fillRule="evenodd"
|
|
115
|
+
></path>
|
|
116
|
+
</svg>
|
|
117
|
+
</div>
|
|
118
|
+
</span>
|
|
119
|
+
</span>
|
|
120
|
+
{showOptional
|
|
121
|
+
? "Hide optional parameters"
|
|
122
|
+
: "Show optional parameters"}
|
|
123
|
+
</button>
|
|
124
|
+
|
|
125
|
+
<div
|
|
126
|
+
className={
|
|
127
|
+
showOptional
|
|
128
|
+
? "openapi-explorer__show-options"
|
|
129
|
+
: "openapi-explorer__hide-options"
|
|
130
|
+
}
|
|
131
|
+
>
|
|
132
|
+
{optionalParams.map((param) => (
|
|
133
|
+
<ParamOptionWrapper
|
|
134
|
+
key={`${param.in}-${param.name}`}
|
|
135
|
+
param={param}
|
|
136
|
+
/>
|
|
137
|
+
))}
|
|
138
|
+
</div>
|
|
139
|
+
</>
|
|
140
|
+
)}
|
|
141
|
+
</>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export default ParamOptions;
|