docusaurus-theme-openapi-docs 2.0.0-beta.2 → 2.0.0-beta.4
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 -55
- 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 +360 -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-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/CodeTabs/index.js +26 -8
- 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/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/FloatingButton/_FloatingButton.scss +4 -4
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/FormFileUpload/_FormFileUpload.scss +6 -6
- 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/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/_FormMultiSelect.scss +9 -5
- package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/_FormSelect.scss +5 -5
- 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/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/LiveEditor/_LiveEditor.scss +2 -2
- 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 +82 -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 → lib/theme/ApiExplorer}/ParamOptions/_ParamOptions.scss +15 -34
- 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 +363 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/{lib-next/theme/ApiDemoPanel/Execute → lib/theme/ApiExplorer/Request}/makeRequest.js +9 -8
- package/lib/theme/ApiExplorer/Response/_Response.scss +81 -0
- package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Response/index.js +184 -0
- package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Response/slice.js +21 -12
- package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
- package/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Server/_Server.scss +11 -1
- 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 +36 -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 +144 -116
- 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 +29 -22
- package/lib/theme/ApiTabs/index.js +4 -3
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +16 -13
- package/lib/theme/Markdown/Details/_Details.scss +82 -3
- package/lib/theme/MimeTabs/_MimeTabs.scss +13 -8
- package/lib/theme/MimeTabs/index.js +2 -2
- package/lib/theme/ParamsItem/_ParamsItem.scss +24 -9
- package/lib/theme/ParamsItem/index.js +9 -6
- package/lib/theme/SchemaItem/_SchemaItem.scss +47 -11
- package/lib/theme/SchemaItem/index.js +23 -12
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +23 -17
- package/lib/theme/SchemaTabs/index.js +50 -54
- package/lib/theme/styles.scss +55 -18
- package/lib/types.d.ts +157 -0
- package/lib/types.js +8 -1
- package/package.json +13 -21
- package/src/index.ts +31 -40
- 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 +54 -37
- package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.tsx +90 -25
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/CodeTabs/index.js +26 -8
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.tsx +2 -2
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/FloatingButton/_FloatingButton.scss +4 -4
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.tsx +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/_FormFileUpload.scss +6 -6
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.tsx +8 -4
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.tsx +9 -11
- package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/FormMultiSelect/_FormMultiSelect.scss +9 -5
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.tsx +7 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/_FormSelect.scss +5 -5
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.tsx +1 -1
- package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/LiveEditor/_LiveEditor.scss +2 -2
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +112 -0
- package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/MethodEndpoint/index.tsx +12 -9
- 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 → src/theme/ApiExplorer}/ParamOptions/_ParamOptions.scss +15 -34
- 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 +8 -5
- package/src/theme/ApiExplorer/Response/_Response.scss +81 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/index.tsx +53 -33
- package/src/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.tsx +5 -3
- package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/Server/_Server.scss +11 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/index.tsx +13 -16
- package/src/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.ts +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/index.tsx +10 -12
- package/src/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.ts +1 -1
- package/src/theme/ApiItem/index.tsx +17 -8
- package/src/theme/ApiItem/store.ts +7 -7
- package/src/theme/ApiTabs/_ApiTabs.scss +29 -22
- package/src/theme/ApiTabs/index.js +4 -3
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +16 -13
- package/src/theme/Markdown/Details/_Details.scss +82 -3
- package/src/theme/MimeTabs/_MimeTabs.scss +13 -8
- package/src/theme/MimeTabs/index.js +2 -2
- package/src/theme/ParamsItem/_ParamsItem.scss +24 -9
- package/src/theme/ParamsItem/index.js +9 -6
- package/src/theme/SchemaItem/_SchemaItem.scss +47 -11
- package/src/theme/SchemaItem/index.js +23 -12
- package/src/theme/SchemaTabs/_SchemaTabs.scss +23 -17
- package/src/theme/SchemaTabs/index.js +50 -54
- package/src/theme/styles.scss +55 -18
- package/src/theme-openapi.d.ts +89 -46
- 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 -262
- package/lib/theme/ApiDemoPanel/Body/slice.js +0 -102
- package/lib/theme/ApiDemoPanel/CodeTabs/_CodeTabs.scss +0 -238
- 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 -238
- package/lib/theme/ApiDemoPanel/Execute/index.js +0 -155
- 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 -29
- package/lib/theme/ApiDemoPanel/FormFileUpload/_FormFileUpload.scss +0 -72
- package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +0 -82
- package/lib/theme/ApiDemoPanel/FormItem/_FormItem.scss +0 -12
- package/lib/theme/ApiDemoPanel/FormItem/index.js +0 -37
- package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -44
- package/lib/theme/ApiDemoPanel/FormSelect/index.js +0 -33
- package/lib/theme/ApiDemoPanel/FormTextInput/_FormTextInput.scss +0 -15
- package/lib/theme/ApiDemoPanel/FormTextInput/index.js +0 -27
- package/lib/theme/ApiDemoPanel/LiveEditor/index.js +0 -61
- package/lib/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +0 -6
- package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -73
- package/lib/theme/ApiDemoPanel/ParamOptions/_ParamOptions.scss +0 -141
- package/lib/theme/ApiDemoPanel/ParamOptions/index.js +0 -215
- package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +0 -34
- package/lib/theme/ApiDemoPanel/Request/_Request.scss +0 -48
- package/lib/theme/ApiDemoPanel/Request/index.js +0 -66
- package/lib/theme/ApiDemoPanel/Response/_Response.scss +0 -27
- package/lib/theme/ApiDemoPanel/Response/index.js +0 -100
- package/lib/theme/ApiDemoPanel/Response/slice.js +0 -56
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -257
- package/lib/theme/ApiDemoPanel/Server/_Server.scss +0 -16
- package/lib/theme/ApiDemoPanel/Server/index.js +0 -103
- package/lib/theme/ApiDemoPanel/Server/slice.js +0 -40
- package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +0 -303
- package/lib/theme/ApiDemoPanel/index.js +0 -35
- 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-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 -68
- 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 -328
- package/lib-next/theme/ApiDemoPanel/CodeTabs/_CodeTabs.scss +0 -238
- package/lib-next/theme/ApiDemoPanel/ContentType/index.js +0 -30
- package/lib-next/theme/ApiDemoPanel/Curl/index.js +0 -281
- package/lib-next/theme/ApiDemoPanel/Execute/index.js +0 -178
- package/lib-next/theme/ApiDemoPanel/Export/index.js +0 -45
- package/lib-next/theme/ApiDemoPanel/FloatingButton/_FloatingButton.scss +0 -25
- package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +0 -21
- package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +0 -107
- package/lib-next/theme/ApiDemoPanel/FormItem/_FormItem.scss +0 -12
- package/lib-next/theme/ApiDemoPanel/FormItem/index.js +0 -35
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -44
- package/lib-next/theme/ApiDemoPanel/FormSelect/_FormSelect.scss +0 -43
- package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +0 -29
- package/lib-next/theme/ApiDemoPanel/FormTextInput/_FormTextInput.scss +0 -15
- package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +0 -23
- package/lib-next/theme/ApiDemoPanel/LiveEditor/_LiveEditor.scss +0 -15
- package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +0 -58
- package/lib-next/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +0 -6
- package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -68
- package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +0 -299
- package/lib-next/theme/ApiDemoPanel/Request/_Request.scss +0 -48
- package/lib-next/theme/ApiDemoPanel/Request/index.js +0 -59
- package/lib-next/theme/ApiDemoPanel/Response/_Response.scss +0 -27
- package/lib-next/theme/ApiDemoPanel/Response/index.js +0 -122
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -274
- package/lib-next/theme/ApiDemoPanel/Server/index.js +0 -131
- package/lib-next/theme/ApiDemoPanel/index.js +0 -25
- 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 -150
- package/lib-next/theme/ApiItem/store.js +0 -38
- package/lib-next/theme/ApiLogo/index.js +0 -48
- package/lib-next/theme/ApiTabs/_ApiTabs.scss +0 -133
- package/lib-next/theme/ApiTabs/index.js +0 -191
- package/lib-next/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +0 -94
- package/lib-next/theme/DiscriminatorTabs/index.js +0 -185
- package/lib-next/theme/Markdown/Details/_Details.scss +0 -40
- package/lib-next/theme/MimeTabs/_MimeTabs.scss +0 -64
- package/lib-next/theme/MimeTabs/index.js +0 -221
- package/lib-next/theme/ParamsItem/_ParamsItem.scss +0 -39
- package/lib-next/theme/ParamsItem/index.js +0 -133
- package/lib-next/theme/ResponseSamples/_ResponseSamples.scss +0 -3
- package/lib-next/theme/ResponseSamples/index.js +0 -22
- package/lib-next/theme/SchemaItem/_SchemaItem.scss +0 -53
- package/lib-next/theme/SchemaItem/index.js +0 -112
- package/lib-next/theme/SchemaTabs/_SchemaTabs.scss +0 -58
- package/lib-next/theme/SchemaTabs/index.js +0 -186
- package/lib-next/theme/styles.scss +0 -123
- 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/_CodeTabs.scss +0 -238
- package/src/theme/ApiDemoPanel/CodeTabs/index.js +0 -156
- package/src/theme/ApiDemoPanel/Curl/languages.json +0 -1386
- package/src/theme/ApiDemoPanel/Execute/index.tsx +0 -200
- package/src/theme/ApiDemoPanel/FormItem/_FormItem.scss +0 -12
- package/src/theme/ApiDemoPanel/FormMultiSelect/_FormMultiSelect.scss +0 -26
- package/src/theme/ApiDemoPanel/FormTextInput/_FormTextInput.scss +0 -15
- package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +0 -32
- package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +0 -73
- package/src/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +0 -6
- package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +0 -333
- package/src/theme/ApiDemoPanel/Request/_Request.scss +0 -48
- package/src/theme/ApiDemoPanel/Request/index.tsx +0 -69
- package/src/theme/ApiDemoPanel/Response/_Response.scss +0 -27
- package/src/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
- package/src/theme/ApiDemoPanel/react-modal.d.ts +0 -8
- /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}/Response/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
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
.openapi-tabs__code-list-container {
|
|
2
|
-
display: table-row-group;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.openapi-tabs__code-item {
|
|
6
|
-
margin-top: 0 !important;
|
|
7
|
-
margin-right: 0.5rem;
|
|
8
|
-
padding-left: 1.5rem;
|
|
9
|
-
padding-right: 1.5rem;
|
|
10
|
-
padding-top: 1rem !important;
|
|
11
|
-
padding-bottom: 1rem !important;
|
|
12
|
-
|
|
13
|
-
&.active {
|
|
14
|
-
border-bottom-left-radius: 0;
|
|
15
|
-
border-bottom-right-radius: 0;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.openapi-tabs__code-item--python {
|
|
20
|
-
color: var(--ifm-color-success);
|
|
21
|
-
|
|
22
|
-
&::after {
|
|
23
|
-
content: "";
|
|
24
|
-
width: 28px;
|
|
25
|
-
height: 28px;
|
|
26
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-original.svg");
|
|
27
|
-
margin-block: auto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.active {
|
|
31
|
-
border-bottom-color: var(--ifm-color-success);
|
|
32
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.language-python {
|
|
37
|
-
max-height: 500px;
|
|
38
|
-
overflow: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.openapi-tabs__code-item--go {
|
|
42
|
-
color: var(--ifm-color-info);
|
|
43
|
-
|
|
44
|
-
&::after {
|
|
45
|
-
content: "";
|
|
46
|
-
width: 28px;
|
|
47
|
-
height: 28px;
|
|
48
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/go/go-original-wordmark.svg");
|
|
49
|
-
margin-block: auto;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.active {
|
|
53
|
-
border-bottom-color: var(--ifm-color-info);
|
|
54
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.language-go {
|
|
59
|
-
max-height: 500px;
|
|
60
|
-
overflow: auto;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.openapi-tabs__code-item--javascript {
|
|
64
|
-
color: var(--ifm-color-warning);
|
|
65
|
-
|
|
66
|
-
&::after {
|
|
67
|
-
content: "";
|
|
68
|
-
width: 28px;
|
|
69
|
-
height: 28px;
|
|
70
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-original.svg");
|
|
71
|
-
margin-block: auto;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&.active {
|
|
75
|
-
border-bottom-color: var(--ifm-color-warning);
|
|
76
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.language-javascript {
|
|
81
|
-
max-height: 500px;
|
|
82
|
-
overflow: auto;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.openapi-tabs__code-item--bash {
|
|
86
|
-
color: var(--ifm-color-danger);
|
|
87
|
-
|
|
88
|
-
&::after {
|
|
89
|
-
content: "";
|
|
90
|
-
width: 28px;
|
|
91
|
-
height: 28px;
|
|
92
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/linux/linux-original.svg");
|
|
93
|
-
margin-block: auto;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&.active {
|
|
97
|
-
border-bottom-color: var(--ifm-color-danger);
|
|
98
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.language-bash {
|
|
103
|
-
max-height: 500px;
|
|
104
|
-
overflow: auto;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.openapi-tabs__code-item--ruby {
|
|
108
|
-
color: var(--ifm-color-danger);
|
|
109
|
-
|
|
110
|
-
&::after {
|
|
111
|
-
content: "";
|
|
112
|
-
width: 28px;
|
|
113
|
-
height: 28px;
|
|
114
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/ruby/ruby-plain.svg");
|
|
115
|
-
margin-block: auto;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&.active {
|
|
119
|
-
border-bottom-color: var(--ifm-color-danger);
|
|
120
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.language-ruby {
|
|
125
|
-
max-height: 500px;
|
|
126
|
-
overflow: auto;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.openapi-tabs__code-item--csharp {
|
|
130
|
-
color: var(--ifm-color-gray-500);
|
|
131
|
-
|
|
132
|
-
&::after {
|
|
133
|
-
content: "";
|
|
134
|
-
width: 28px;
|
|
135
|
-
height: 28px;
|
|
136
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/csharp/csharp-original.svg");
|
|
137
|
-
margin-block: auto;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&.active {
|
|
141
|
-
border-bottom-color: var(--ifm-color-gray-500);
|
|
142
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.language-csharp {
|
|
147
|
-
max-height: 500px;
|
|
148
|
-
overflow: auto;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.openapi-tabs__code-item--nodejs {
|
|
152
|
-
color: var(--ifm-color-success);
|
|
153
|
-
|
|
154
|
-
&::after {
|
|
155
|
-
content: "";
|
|
156
|
-
width: 28px;
|
|
157
|
-
height: 28px;
|
|
158
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/nodejs/nodejs-original.svg");
|
|
159
|
-
margin-block: auto;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&.active {
|
|
163
|
-
border-bottom-color: var(--ifm-color-success);
|
|
164
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.language-nodejs {
|
|
169
|
-
max-height: 500px;
|
|
170
|
-
overflow: auto;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.openapi-tabs__code-item--php {
|
|
174
|
-
color: var(--ifm-color-gray-500);
|
|
175
|
-
|
|
176
|
-
&::after {
|
|
177
|
-
content: "";
|
|
178
|
-
width: 28px;
|
|
179
|
-
height: 28px;
|
|
180
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/php/php-original.svg");
|
|
181
|
-
margin-block: auto;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
&.active {
|
|
185
|
-
border-bottom-color: var(--ifm-color-gray-500);
|
|
186
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.language-php {
|
|
191
|
-
max-height: 500px;
|
|
192
|
-
overflow: auto;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.openapi-tabs__code-item--java {
|
|
196
|
-
color: var(--ifm-color-warning);
|
|
197
|
-
|
|
198
|
-
&::after {
|
|
199
|
-
content: "";
|
|
200
|
-
width: 28px;
|
|
201
|
-
height: 28px;
|
|
202
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/java/java-original.svg");
|
|
203
|
-
margin-block: auto;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&.active {
|
|
207
|
-
border-bottom-color: var(--ifm-color-warning);
|
|
208
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.language-powershell {
|
|
213
|
-
max-height: 500px;
|
|
214
|
-
overflow: auto;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.openapi-tabs__code-item--powershell {
|
|
218
|
-
color: var(--ifm-color-info);
|
|
219
|
-
|
|
220
|
-
&::after {
|
|
221
|
-
content: "";
|
|
222
|
-
width: 28px;
|
|
223
|
-
height: 28px;
|
|
224
|
-
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/windows8/windows8-original.svg");
|
|
225
|
-
margin-block: auto;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
&.active {
|
|
229
|
-
border-bottom-color: var(--ifm-color-success);
|
|
230
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
@media only screen and (min-width: 768px) and (max-width: 996px) {
|
|
235
|
-
.openapi-tabs__code-list {
|
|
236
|
-
justify-content: space-around;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _FormItem = _interopRequireDefault(require("@theme/ApiDemoPanel/FormItem"));
|
|
9
|
-
var _FormSelect = _interopRequireDefault(require("@theme/ApiDemoPanel/FormSelect"));
|
|
10
|
-
var _hooks = require("@theme/ApiItem/hooks");
|
|
11
|
-
var _slice = require("./slice");
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
/* ============================================================================
|
|
14
|
-
* Copyright (c) Palo Alto Networks
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
* ========================================================================== */
|
|
19
|
-
|
|
20
|
-
function ContentType() {
|
|
21
|
-
const value = (0, _hooks.useTypedSelector)(state => state.contentType.value);
|
|
22
|
-
const options = (0, _hooks.useTypedSelector)(state => state.contentType.options);
|
|
23
|
-
const dispatch = (0, _hooks.useTypedDispatch)();
|
|
24
|
-
if (options.length <= 1) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return <_FormItem.default label="Content-Type">
|
|
28
|
-
<_FormSelect.default value={value} options={options} onChange={e => dispatch((0, _slice.setContentType)(e.target.value))} />
|
|
29
|
-
</_FormItem.default>;
|
|
30
|
-
}
|
|
31
|
-
var _default = ContentType;
|
|
32
|
-
exports.default = _default;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.slice = exports.setContentType = exports.default = void 0;
|
|
7
|
-
var _toolkit = require("@reduxjs/toolkit");
|
|
8
|
-
/* ============================================================================
|
|
9
|
-
* Copyright (c) Palo Alto Networks
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
* ========================================================================== */
|
|
14
|
-
|
|
15
|
-
const initialState = {};
|
|
16
|
-
const slice = (0, _toolkit.createSlice)({
|
|
17
|
-
name: "contentType",
|
|
18
|
-
initialState,
|
|
19
|
-
reducers: {
|
|
20
|
-
setContentType: (state, action) => {
|
|
21
|
-
state.value = action.payload;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
exports.slice = slice;
|
|
26
|
-
const {
|
|
27
|
-
setContentType
|
|
28
|
-
} = slice.actions;
|
|
29
|
-
exports.setContentType = setContentType;
|
|
30
|
-
var _default = slice.reducer;
|
|
31
|
-
exports.default = _default;
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.languageSet = exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _useDocusaurusContext = _interopRequireDefault(require("@docusaurus/useDocusaurusContext"));
|
|
9
|
-
var _postmanCodeGenerators = _interopRequireDefault(require("@paloaltonetworks/postman-code-generators"));
|
|
10
|
-
var _buildPostmanRequest = _interopRequireDefault(require("@theme/ApiDemoPanel/buildPostmanRequest"));
|
|
11
|
-
var _CodeTabs = _interopRequireDefault(require("@theme/ApiDemoPanel/CodeTabs"));
|
|
12
|
-
var _hooks = require("@theme/ApiItem/hooks");
|
|
13
|
-
var _CodeBlock = _interopRequireDefault(require("@theme/CodeBlock"));
|
|
14
|
-
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
-
/* ============================================================================
|
|
19
|
-
* Copyright (c) Palo Alto Networks
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license found in the
|
|
22
|
-
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
* ========================================================================== */
|
|
24
|
-
|
|
25
|
-
const languageSet = [{
|
|
26
|
-
highlight: "bash",
|
|
27
|
-
language: "curl",
|
|
28
|
-
logoClass: "bash",
|
|
29
|
-
options: {
|
|
30
|
-
longFormat: false,
|
|
31
|
-
followRedirect: true,
|
|
32
|
-
trimRequestBody: true
|
|
33
|
-
},
|
|
34
|
-
variant: "cURL"
|
|
35
|
-
}, {
|
|
36
|
-
highlight: "python",
|
|
37
|
-
language: "python",
|
|
38
|
-
logoClass: "python",
|
|
39
|
-
options: {
|
|
40
|
-
followRedirect: true,
|
|
41
|
-
trimRequestBody: true
|
|
42
|
-
},
|
|
43
|
-
variant: "requests"
|
|
44
|
-
}, {
|
|
45
|
-
highlight: "go",
|
|
46
|
-
language: "go",
|
|
47
|
-
logoClass: "go",
|
|
48
|
-
options: {
|
|
49
|
-
followRedirect: true,
|
|
50
|
-
trimRequestBody: true
|
|
51
|
-
},
|
|
52
|
-
variant: "native"
|
|
53
|
-
}, {
|
|
54
|
-
highlight: "javascript",
|
|
55
|
-
language: "nodejs",
|
|
56
|
-
logoClass: "nodejs",
|
|
57
|
-
options: {
|
|
58
|
-
ES6_enabled: true,
|
|
59
|
-
followRedirect: true,
|
|
60
|
-
trimRequestBody: true
|
|
61
|
-
},
|
|
62
|
-
variant: "axios"
|
|
63
|
-
}, {
|
|
64
|
-
highlight: "ruby",
|
|
65
|
-
language: "ruby",
|
|
66
|
-
logoClass: "ruby",
|
|
67
|
-
options: {
|
|
68
|
-
followRedirect: true,
|
|
69
|
-
trimRequestBody: true
|
|
70
|
-
},
|
|
71
|
-
variant: "Net::HTTP"
|
|
72
|
-
}, {
|
|
73
|
-
highlight: "csharp",
|
|
74
|
-
language: "csharp",
|
|
75
|
-
logoClass: "csharp",
|
|
76
|
-
options: {
|
|
77
|
-
followRedirect: true,
|
|
78
|
-
trimRequestBody: true
|
|
79
|
-
},
|
|
80
|
-
variant: "RestSharp"
|
|
81
|
-
}, {
|
|
82
|
-
highlight: "php",
|
|
83
|
-
language: "php",
|
|
84
|
-
logoClass: "php",
|
|
85
|
-
options: {
|
|
86
|
-
followRedirect: true,
|
|
87
|
-
trimRequestBody: true
|
|
88
|
-
},
|
|
89
|
-
variant: "cURL"
|
|
90
|
-
}, {
|
|
91
|
-
highlight: "java",
|
|
92
|
-
language: "java",
|
|
93
|
-
logoClass: "java",
|
|
94
|
-
options: {
|
|
95
|
-
followRedirect: true,
|
|
96
|
-
trimRequestBody: true
|
|
97
|
-
},
|
|
98
|
-
variant: "OkHttp"
|
|
99
|
-
}, {
|
|
100
|
-
highlight: "powershell",
|
|
101
|
-
language: "powershell",
|
|
102
|
-
logoClass: "powershell",
|
|
103
|
-
options: {
|
|
104
|
-
followRedirect: true,
|
|
105
|
-
trimRequestBody: true
|
|
106
|
-
},
|
|
107
|
-
variant: "RestMethod"
|
|
108
|
-
}];
|
|
109
|
-
exports.languageSet = languageSet;
|
|
110
|
-
function CodeTab({
|
|
111
|
-
children,
|
|
112
|
-
hidden,
|
|
113
|
-
className,
|
|
114
|
-
onClick
|
|
115
|
-
}) {
|
|
116
|
-
return <div role="tabpanel" className={className} {...{
|
|
117
|
-
hidden
|
|
118
|
-
}}>
|
|
119
|
-
{children}
|
|
120
|
-
</div>;
|
|
121
|
-
}
|
|
122
|
-
function Curl({
|
|
123
|
-
postman,
|
|
124
|
-
codeSamples
|
|
125
|
-
}) {
|
|
126
|
-
var _ref, _siteConfig$themeConf;
|
|
127
|
-
// TODO: match theme for vscode.
|
|
128
|
-
|
|
129
|
-
const {
|
|
130
|
-
siteConfig
|
|
131
|
-
} = (0, _useDocusaurusContext.default)();
|
|
132
|
-
const contentType = (0, _hooks.useTypedSelector)(state => state.contentType.value);
|
|
133
|
-
const accept = (0, _hooks.useTypedSelector)(state => state.accept.value);
|
|
134
|
-
const server = (0, _hooks.useTypedSelector)(state => state.server.value);
|
|
135
|
-
const body = (0, _hooks.useTypedSelector)(state => state.body);
|
|
136
|
-
const pathParams = (0, _hooks.useTypedSelector)(state => state.params.path);
|
|
137
|
-
const queryParams = (0, _hooks.useTypedSelector)(state => state.params.query);
|
|
138
|
-
const cookieParams = (0, _hooks.useTypedSelector)(state => state.params.cookie);
|
|
139
|
-
const headerParams = (0, _hooks.useTypedSelector)(state => state.params.header);
|
|
140
|
-
const auth = (0, _hooks.useTypedSelector)(state => state.auth);
|
|
141
|
-
|
|
142
|
-
// User-defined languages array
|
|
143
|
-
// Can override languageSet, change order of langs, override options and variants
|
|
144
|
-
const langs = [...((_ref = siteConfig === null || siteConfig === void 0 ? void 0 : (_siteConfig$themeConf = siteConfig.themeConfig) === null || _siteConfig$themeConf === void 0 ? void 0 : _siteConfig$themeConf.languageTabs) !== null && _ref !== void 0 ? _ref : languageSet), ...codeSamples];
|
|
145
|
-
|
|
146
|
-
// Filter languageSet by user-defined langs
|
|
147
|
-
const filteredLanguageSet = languageSet.filter(ls => {
|
|
148
|
-
return langs.some(lang => {
|
|
149
|
-
return lang.language === ls.language;
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// Merge user-defined langs into languageSet
|
|
154
|
-
const mergedLangs = (0, _merge.default)(filteredLanguageSet, langs);
|
|
155
|
-
|
|
156
|
-
// Read defaultLang from localStorage
|
|
157
|
-
const defaultLang = mergedLangs.filter(lang => lang.language === localStorage.getItem("docusaurus.tab.code-samples"));
|
|
158
|
-
const [language, setLanguage] = (0, _react.useState)(() => {
|
|
159
|
-
var _defaultLang$;
|
|
160
|
-
// Return first index if only 1 user-defined language exists
|
|
161
|
-
if (mergedLangs.length === 1) {
|
|
162
|
-
return mergedLangs[0];
|
|
163
|
-
}
|
|
164
|
-
// Fall back to language in localStorage or first user-defined language
|
|
165
|
-
return (_defaultLang$ = defaultLang[0]) !== null && _defaultLang$ !== void 0 ? _defaultLang$ : mergedLangs[0];
|
|
166
|
-
});
|
|
167
|
-
const [codeText, setCodeText] = (0, _react.useState)("");
|
|
168
|
-
(0, _react.useEffect)(() => {
|
|
169
|
-
if (language && !!language.options) {
|
|
170
|
-
const postmanRequest = (0, _buildPostmanRequest.default)(postman, {
|
|
171
|
-
queryParams,
|
|
172
|
-
pathParams,
|
|
173
|
-
cookieParams,
|
|
174
|
-
contentType,
|
|
175
|
-
accept,
|
|
176
|
-
headerParams,
|
|
177
|
-
body,
|
|
178
|
-
server,
|
|
179
|
-
auth
|
|
180
|
-
});
|
|
181
|
-
_postmanCodeGenerators.default.convert(language.language, language.variant, postmanRequest, language.options, (error, snippet) => {
|
|
182
|
-
if (error) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
setCodeText(snippet);
|
|
186
|
-
});
|
|
187
|
-
} else if (language && !!language.source) {
|
|
188
|
-
setCodeText(language.source);
|
|
189
|
-
} else if (language && !language.options) {
|
|
190
|
-
const langSource = mergedLangs.filter(lang => lang.language === language.language);
|
|
191
|
-
|
|
192
|
-
// Merges user-defined language with default languageSet
|
|
193
|
-
// This allows users to define only the minimal properties necessary in languageTabs
|
|
194
|
-
// User-defined properties should override languageSet properties
|
|
195
|
-
const mergedLanguage = {
|
|
196
|
-
...langSource[0],
|
|
197
|
-
...language
|
|
198
|
-
};
|
|
199
|
-
const postmanRequest = (0, _buildPostmanRequest.default)(postman, {
|
|
200
|
-
queryParams,
|
|
201
|
-
pathParams,
|
|
202
|
-
cookieParams,
|
|
203
|
-
contentType,
|
|
204
|
-
accept,
|
|
205
|
-
headerParams,
|
|
206
|
-
body,
|
|
207
|
-
server,
|
|
208
|
-
auth
|
|
209
|
-
});
|
|
210
|
-
_postmanCodeGenerators.default.convert(mergedLanguage.language, mergedLanguage.variant, postmanRequest, mergedLanguage.options, (error, snippet) => {
|
|
211
|
-
if (error) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
setCodeText(snippet);
|
|
215
|
-
});
|
|
216
|
-
} else {
|
|
217
|
-
setCodeText("");
|
|
218
|
-
}
|
|
219
|
-
}, [accept, body, contentType, cookieParams, headerParams, language, pathParams, postman, queryParams, server, auth, mergedLangs]);
|
|
220
|
-
if (language === undefined) {
|
|
221
|
-
return null;
|
|
222
|
-
}
|
|
223
|
-
return <>
|
|
224
|
-
<_CodeTabs.default groupId="code-samples" action={setLanguage}>
|
|
225
|
-
{mergedLangs.map(lang => {
|
|
226
|
-
return <CodeTab value={lang.language} label={""} key={lang.variant ? `${lang.language}-${lang.variant}` : lang.language} attributes={{
|
|
227
|
-
className: `openapi-tabs__code-item--${lang.logoClass}`
|
|
228
|
-
}}>
|
|
229
|
-
<_CodeBlock.default language={lang.highlight} className="openapi-demo__code-block" title={`${lang.language} / ${lang.variant}`}>
|
|
230
|
-
{codeText}
|
|
231
|
-
</_CodeBlock.default>
|
|
232
|
-
</CodeTab>;
|
|
233
|
-
})}
|
|
234
|
-
</_CodeTabs.default>
|
|
235
|
-
</>;
|
|
236
|
-
}
|
|
237
|
-
var _default = Curl;
|
|
238
|
-
exports.default = _default;
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _buildPostmanRequest = _interopRequireDefault(require("@theme/ApiDemoPanel/buildPostmanRequest"));
|
|
9
|
-
var _slice = require("@theme/ApiDemoPanel/Response/slice");
|
|
10
|
-
var _hooks = require("@theme/ApiItem/hooks");
|
|
11
|
-
var _reactModal = _interopRequireDefault(require("react-modal"));
|
|
12
|
-
var _makeRequest = _interopRequireDefault(require("./makeRequest"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
/* ============================================================================
|
|
15
|
-
* Copyright (c) Palo Alto Networks
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
* ========================================================================== */
|
|
20
|
-
|
|
21
|
-
function validateRequest(params) {
|
|
22
|
-
for (let paramList of Object.values(params)) {
|
|
23
|
-
for (let param of paramList) {
|
|
24
|
-
if (param.required && !param.value) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
function Execute({
|
|
32
|
-
postman,
|
|
33
|
-
proxy
|
|
34
|
-
}) {
|
|
35
|
-
const pathParams = (0, _hooks.useTypedSelector)(state => state.params.path);
|
|
36
|
-
const queryParams = (0, _hooks.useTypedSelector)(state => state.params.query);
|
|
37
|
-
const cookieParams = (0, _hooks.useTypedSelector)(state => state.params.cookie);
|
|
38
|
-
const headerParams = (0, _hooks.useTypedSelector)(state => state.params.header);
|
|
39
|
-
const contentType = (0, _hooks.useTypedSelector)(state => state.contentType.value);
|
|
40
|
-
const body = (0, _hooks.useTypedSelector)(state => state.body);
|
|
41
|
-
const accept = (0, _hooks.useTypedSelector)(state => state.accept.value);
|
|
42
|
-
const server = (0, _hooks.useTypedSelector)(state => state.server.value);
|
|
43
|
-
const params = (0, _hooks.useTypedSelector)(state => state.params);
|
|
44
|
-
const auth = (0, _hooks.useTypedSelector)(state => state.auth);
|
|
45
|
-
const isValidRequest = validateRequest(params);
|
|
46
|
-
const dispatch = (0, _hooks.useTypedDispatch)();
|
|
47
|
-
const postmanRequest = (0, _buildPostmanRequest.default)(postman, {
|
|
48
|
-
queryParams,
|
|
49
|
-
pathParams,
|
|
50
|
-
cookieParams,
|
|
51
|
-
contentType,
|
|
52
|
-
accept,
|
|
53
|
-
headerParams,
|
|
54
|
-
body,
|
|
55
|
-
server,
|
|
56
|
-
auth
|
|
57
|
-
});
|
|
58
|
-
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
59
|
-
function openModal() {
|
|
60
|
-
setIsOpen(true);
|
|
61
|
-
}
|
|
62
|
-
function closeModal() {
|
|
63
|
-
setIsOpen(false);
|
|
64
|
-
}
|
|
65
|
-
function acceptAgreement() {
|
|
66
|
-
setIsOpen(false);
|
|
67
|
-
setAgreementAccepted(true);
|
|
68
|
-
sessionStorage.setItem("agreement-ack", "true");
|
|
69
|
-
}
|
|
70
|
-
const [modalIsOpen, setIsOpen] = _react.default.useState(false);
|
|
71
|
-
// Set the following as default value to persist to session and enable modal
|
|
72
|
-
// sessionStorage.getItem("agreement-ack") === "true"
|
|
73
|
-
const [agreementAccepted, setAgreementAccepted] = _react.default.useState(true);
|
|
74
|
-
const customStyles = {
|
|
75
|
-
overlay: {
|
|
76
|
-
backdropFilter: "blur(10px)",
|
|
77
|
-
backgroundColor: "transparent"
|
|
78
|
-
},
|
|
79
|
-
content: {
|
|
80
|
-
top: "50%",
|
|
81
|
-
left: "50%",
|
|
82
|
-
right: "auto",
|
|
83
|
-
bottom: "auto",
|
|
84
|
-
marginRight: "-50%",
|
|
85
|
-
border: "none",
|
|
86
|
-
padding: "none",
|
|
87
|
-
borderRadius: "var(--openapi-card-border-radius)",
|
|
88
|
-
background: "var(--ifm-card-background-color)",
|
|
89
|
-
transform: "translate(-50%, -50%)",
|
|
90
|
-
maxWidth: "550px"
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
if (agreementAccepted) {
|
|
94
|
-
return <button className="button button--sm button--secondary" disabled={!isValidRequest} style={!isValidRequest ? {
|
|
95
|
-
pointerEvents: "all"
|
|
96
|
-
} : {}} onClick={async () => {
|
|
97
|
-
dispatch((0, _slice.setResponse)("Fetching..."));
|
|
98
|
-
try {
|
|
99
|
-
await delay(1200);
|
|
100
|
-
const res = await (0, _makeRequest.default)(postmanRequest, proxy, body);
|
|
101
|
-
dispatch((0, _slice.setResponse)(await res.text()));
|
|
102
|
-
dispatch((0, _slice.setCode)(res.status));
|
|
103
|
-
res.headers && dispatch((0, _slice.setHeaders)(Object.fromEntries(res.headers)));
|
|
104
|
-
} catch (e) {
|
|
105
|
-
console.log(e);
|
|
106
|
-
dispatch((0, _slice.setResponse)("Connection failed"));
|
|
107
|
-
dispatch((0, _slice.clearCode)());
|
|
108
|
-
dispatch((0, _slice.clearHeaders)());
|
|
109
|
-
}
|
|
110
|
-
}}>
|
|
111
|
-
Send API Request
|
|
112
|
-
</button>;
|
|
113
|
-
} else {
|
|
114
|
-
return <_react.default.Fragment>
|
|
115
|
-
<button className="button button--sm button--secondary" onClick={openModal}>
|
|
116
|
-
Send API Request
|
|
117
|
-
</button>
|
|
118
|
-
<_reactModal.default isOpen={modalIsOpen} onRequestClose={closeModal} style={customStyles} contentLabel="Terms of Use">
|
|
119
|
-
<form>
|
|
120
|
-
<div className="card">
|
|
121
|
-
<div className="card__header">
|
|
122
|
-
<h2>Terms of Use</h2>
|
|
123
|
-
<hr></hr>
|
|
124
|
-
</div>
|
|
125
|
-
<div className="card__body">
|
|
126
|
-
<p>
|
|
127
|
-
By accepting this agreement the end user acknowledges the
|
|
128
|
-
risks of performing authenticated and non-authenticated API
|
|
129
|
-
requests from the browser.
|
|
130
|
-
</p>
|
|
131
|
-
<p>
|
|
132
|
-
The end user also accepts the responsibility of safeguarding
|
|
133
|
-
API credentials and any potentially sensitive data returned by
|
|
134
|
-
the API.
|
|
135
|
-
</p>
|
|
136
|
-
<br></br>
|
|
137
|
-
</div>
|
|
138
|
-
<div className="card__footer">
|
|
139
|
-
<div className="button-group button-group--block">
|
|
140
|
-
<button className="button button--sm button--outline button--success" onClick={acceptAgreement}>
|
|
141
|
-
AGREE
|
|
142
|
-
</button>
|
|
143
|
-
<button className="button button--sm button--outline button--danger" onClick={closeModal}>
|
|
144
|
-
DISAGREE
|
|
145
|
-
</button>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</form>
|
|
150
|
-
</_reactModal.default>
|
|
151
|
-
</_react.default.Fragment>;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
var _default = Execute;
|
|
155
|
-
exports.default = _default;
|