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
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
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
|
-
.tabItem {
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
height: 2rem;
|
|
13
|
-
margin-top: 0 !important;
|
|
14
|
-
margin-right: 0.5rem;
|
|
15
|
-
/* border: 1px solid var(--openapi-code-dim-dark);
|
|
16
|
-
border-radius: 0; */
|
|
17
|
-
font-weight: var(--ifm-font-weight-normal);
|
|
18
|
-
/* color: var(--openapi-code-dim-dark); */
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.tabItem:active {
|
|
24
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* .tabItem:hover {
|
|
28
|
-
color: var(--ifm-color-emphasis-500) !important;
|
|
29
|
-
} */
|
|
30
|
-
|
|
31
|
-
.tabItem:last-child {
|
|
32
|
-
margin-right: 0 !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Open API Response Code Tabs */
|
|
36
|
-
.mimeTabsTopSection {
|
|
37
|
-
display: flex;
|
|
38
|
-
justify-content: space-between;
|
|
39
|
-
align-items: center;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.mimeTabsContainer {
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
max-width: 390px;
|
|
46
|
-
/* padding-left: 1rem; */
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.mimeTabsListContainer {
|
|
51
|
-
overflow-y: hidden;
|
|
52
|
-
overflow-x: scroll;
|
|
53
|
-
scroll-behavior: smooth;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.mimeTabsListContainer::-webkit-scrollbar {
|
|
57
|
-
display: none;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Response Code Tabs - Colored Dots */
|
|
61
|
-
.mimeTabDot {
|
|
62
|
-
width: 12.5px;
|
|
63
|
-
height: 12.5px;
|
|
64
|
-
margin-right: 5px;
|
|
65
|
-
border-radius: 50%;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.mimeTabDotSuccess {
|
|
69
|
-
background-color: var(--ifm-color-success);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.mimeTabDotDanger {
|
|
73
|
-
background-color: var(--ifm-color-danger);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.mimeTabDotInfo {
|
|
77
|
-
background-color: var(--ifm-color-info);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.mimeTabActive {
|
|
81
|
-
border-bottom-color: var(--ifm-tabs-color-active-border);
|
|
82
|
-
border-bottom-left-radius: 0;
|
|
83
|
-
border-bottom-right-radius: 0;
|
|
84
|
-
color: var(--ifm-tabs-color-active);
|
|
85
|
-
background-color: var(--ifm-color-emphasis-100);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.mimeSchemaContainer {
|
|
89
|
-
max-width: 600px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* Tab Arrows */
|
|
93
|
-
.tabArrow {
|
|
94
|
-
content: "";
|
|
95
|
-
height: 1.25rem;
|
|
96
|
-
width: 1.25rem;
|
|
97
|
-
border: none;
|
|
98
|
-
min-width: 1.25rem;
|
|
99
|
-
background: var(--ifm-menu-link-sublist-icon) 50% / 2rem 2rem;
|
|
100
|
-
filter: var(--ifm-menu-link-sublist-icon-filter);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.tabArrow:hover {
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.tabArrowLeft {
|
|
108
|
-
transform: rotate(270deg);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.tabArrowRight {
|
|
112
|
-
transform: rotate(90deg);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@media screen and (max-width: 500px) {
|
|
116
|
-
.mimeTabsTopSection {
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
align-items: flex-start;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.mimeTabsContainer {
|
|
122
|
-
width: 100%;
|
|
123
|
-
margin-top: var(--ifm-spacing-vertical);
|
|
124
|
-
padding: 0;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
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 CodeBlock from "@theme/CodeBlock";
|
|
11
|
-
import SchemaTabs from "@theme/SchemaTabs";
|
|
12
|
-
import TabItem from "@theme/TabItem";
|
|
13
|
-
/* eslint-disable import/no-extraneous-dependencies*/
|
|
14
|
-
import { createDescription } from "docusaurus-theme-openapi-docs/lib/markdown/createDescription";
|
|
15
|
-
/* eslint-disable import/no-extraneous-dependencies*/
|
|
16
|
-
import {
|
|
17
|
-
getQualifierMessage,
|
|
18
|
-
getSchemaName,
|
|
19
|
-
} from "docusaurus-theme-openapi-docs/lib/markdown/schema";
|
|
20
|
-
/* eslint-disable import/no-extraneous-dependencies*/
|
|
21
|
-
import {
|
|
22
|
-
guard,
|
|
23
|
-
toString,
|
|
24
|
-
} from "docusaurus-theme-openapi-docs/lib/markdown/utils";
|
|
25
|
-
import ReactMarkdown from "react-markdown";
|
|
26
|
-
import rehypeRaw from "rehype-raw";
|
|
27
|
-
|
|
28
|
-
import styles from "./styles.module.css";
|
|
29
|
-
|
|
30
|
-
function ParamsItem({
|
|
31
|
-
param: { description, example, examples, name, required, schema },
|
|
32
|
-
}) {
|
|
33
|
-
if (!schema || !schema?.type) {
|
|
34
|
-
schema = { type: "any" };
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const renderSchemaName = guard(schema, (schema) => (
|
|
38
|
-
<span className={styles.schemaName}> {getSchemaName(schema)}</span>
|
|
39
|
-
));
|
|
40
|
-
|
|
41
|
-
const renderSchemaRequired = guard(required, () => (
|
|
42
|
-
<strong className={styles.paramsRequired}> required</strong>
|
|
43
|
-
));
|
|
44
|
-
|
|
45
|
-
const renderSchema = guard(getQualifierMessage(schema), (message) => (
|
|
46
|
-
<div>
|
|
47
|
-
<ReactMarkdown
|
|
48
|
-
children={createDescription(message)}
|
|
49
|
-
rehypePlugins={[rehypeRaw]}
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
));
|
|
53
|
-
|
|
54
|
-
const renderDescription = guard(description, (description) => (
|
|
55
|
-
<div>
|
|
56
|
-
<ReactMarkdown
|
|
57
|
-
children={createDescription(description)}
|
|
58
|
-
components={{
|
|
59
|
-
pre: "div",
|
|
60
|
-
code({ node, inline, className, children, ...props }) {
|
|
61
|
-
const match = /language-(\w+)/.exec(className || "");
|
|
62
|
-
if (inline) return <code>{children}</code>;
|
|
63
|
-
return !inline && match ? (
|
|
64
|
-
<CodeBlock className={className}>{children}</CodeBlock>
|
|
65
|
-
) : (
|
|
66
|
-
<CodeBlock>{children}</CodeBlock>
|
|
67
|
-
);
|
|
68
|
-
},
|
|
69
|
-
}}
|
|
70
|
-
rehypePlugins={[rehypeRaw]}
|
|
71
|
-
/>
|
|
72
|
-
</div>
|
|
73
|
-
));
|
|
74
|
-
|
|
75
|
-
const renderDefaultValue = guard(
|
|
76
|
-
schema && schema.items
|
|
77
|
-
? schema.items.default
|
|
78
|
-
: schema
|
|
79
|
-
? schema.default
|
|
80
|
-
: undefined,
|
|
81
|
-
(value) => (
|
|
82
|
-
<div>
|
|
83
|
-
<ReactMarkdown children={`**Default value:** \`${value}\``} />
|
|
84
|
-
</div>
|
|
85
|
-
)
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const renderExample = guard(toString(example), (example) => (
|
|
89
|
-
<div>
|
|
90
|
-
<strong>Example: </strong>
|
|
91
|
-
{example}
|
|
92
|
-
</div>
|
|
93
|
-
));
|
|
94
|
-
|
|
95
|
-
const renderExamples = guard(examples, (examples) => {
|
|
96
|
-
const exampleEntries = Object.entries(examples);
|
|
97
|
-
return (
|
|
98
|
-
<>
|
|
99
|
-
<strong>Examples:</strong>
|
|
100
|
-
<SchemaTabs>
|
|
101
|
-
{exampleEntries.map(([exampleName, exampleProperties]) => (
|
|
102
|
-
<TabItem value={exampleName} label={exampleName}>
|
|
103
|
-
{exampleProperties.summary && <p>{exampleProperties.summary}</p>}
|
|
104
|
-
{exampleProperties.description && (
|
|
105
|
-
<p>
|
|
106
|
-
<strong>Description: </strong>
|
|
107
|
-
<span>{exampleProperties.description}</span>
|
|
108
|
-
</p>
|
|
109
|
-
)}
|
|
110
|
-
<p>
|
|
111
|
-
<strong>Example: </strong>
|
|
112
|
-
<code>{exampleProperties.value}</code>
|
|
113
|
-
</p>
|
|
114
|
-
</TabItem>
|
|
115
|
-
))}
|
|
116
|
-
</SchemaTabs>
|
|
117
|
-
</>
|
|
118
|
-
);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
return (
|
|
122
|
-
<div className={styles.paramsItem}>
|
|
123
|
-
<strong>{name}</strong>
|
|
124
|
-
{renderSchemaName}
|
|
125
|
-
{renderSchemaRequired}
|
|
126
|
-
{renderSchema}
|
|
127
|
-
{renderDefaultValue}
|
|
128
|
-
{renderDescription}
|
|
129
|
-
{renderExample}
|
|
130
|
-
{renderExamples}
|
|
131
|
-
</div>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export default ParamsItem;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.paramsItem {
|
|
2
|
-
margin: 0 0 0 1rem !important;
|
|
3
|
-
position: relative;
|
|
4
|
-
padding-left: 1rem;
|
|
5
|
-
border-left: thin solid var(--ifm-color-gray-500) !important;
|
|
6
|
-
margin-top: unset !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.paramsItem:hover {
|
|
10
|
-
background-color: var(--ifm-menu-color-background-active);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.paramsItem:focus {
|
|
14
|
-
background-color: var(--ifm-menu-color-background-active);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.schemaName {
|
|
18
|
-
opacity: 0.6;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.paramsRequired {
|
|
22
|
-
font-size: var(--ifm-code-font-size);
|
|
23
|
-
color: var(--openapi-required);
|
|
24
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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 CodeBlock from "@theme/CodeBlock";
|
|
11
|
-
|
|
12
|
-
import styles from "./styles.module.css";
|
|
13
|
-
|
|
14
|
-
function ResponseSamples({ responseExample, language }) {
|
|
15
|
-
return (
|
|
16
|
-
<div className={styles.responseSamplesContainer}>
|
|
17
|
-
<CodeBlock
|
|
18
|
-
language={language ? language : "json"}
|
|
19
|
-
className={styles.responseSamplesCodeBlock}
|
|
20
|
-
>
|
|
21
|
-
{responseExample}
|
|
22
|
-
</CodeBlock>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default ResponseSamples;
|
|
@@ -1,114 +0,0 @@
|
|
|
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 CodeBlock from "@theme/CodeBlock";
|
|
11
|
-
/* eslint-disable import/no-extraneous-dependencies*/
|
|
12
|
-
import { createDescription } from "docusaurus-theme-openapi-docs/lib/markdown/createDescription";
|
|
13
|
-
/* eslint-disable import/no-extraneous-dependencies*/
|
|
14
|
-
import {
|
|
15
|
-
guard,
|
|
16
|
-
toString,
|
|
17
|
-
} from "docusaurus-theme-openapi-docs/lib/markdown/utils";
|
|
18
|
-
import ReactMarkdown from "react-markdown";
|
|
19
|
-
import rehypeRaw from "rehype-raw";
|
|
20
|
-
|
|
21
|
-
import styles from "./styles.module.css";
|
|
22
|
-
|
|
23
|
-
function SchemaItem({
|
|
24
|
-
children: collapsibleSchemaContent,
|
|
25
|
-
collapsible,
|
|
26
|
-
name,
|
|
27
|
-
qualifierMessage,
|
|
28
|
-
required,
|
|
29
|
-
schemaName,
|
|
30
|
-
schema,
|
|
31
|
-
discriminator,
|
|
32
|
-
}) {
|
|
33
|
-
let deprecated;
|
|
34
|
-
let schemaDescription;
|
|
35
|
-
let defaultValue;
|
|
36
|
-
let nullable;
|
|
37
|
-
if (schema) {
|
|
38
|
-
deprecated = schema.deprecated;
|
|
39
|
-
schemaDescription = schema.description;
|
|
40
|
-
defaultValue = schema.default;
|
|
41
|
-
nullable = schema.nullable;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const renderRequired = guard(
|
|
45
|
-
Array.isArray(required) ? required.includes(name) : required,
|
|
46
|
-
() => <strong className={styles.required}> required</strong>
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const renderDeprecated = guard(deprecated, () => (
|
|
50
|
-
<strong className={styles.deprecated}> deprecated</strong>
|
|
51
|
-
));
|
|
52
|
-
|
|
53
|
-
const renderNullable = guard(nullable, () => (
|
|
54
|
-
<strong className={styles.nullable}> nullable</strong>
|
|
55
|
-
));
|
|
56
|
-
|
|
57
|
-
const renderSchemaDescription = guard(schemaDescription, (description) => (
|
|
58
|
-
<div>
|
|
59
|
-
<ReactMarkdown
|
|
60
|
-
children={createDescription(description)}
|
|
61
|
-
components={{
|
|
62
|
-
pre: "div",
|
|
63
|
-
code({ node, inline, className, children, ...props }) {
|
|
64
|
-
const match = /language-(\w+)/.exec(className || "");
|
|
65
|
-
if (inline) return <code>{children}</code>;
|
|
66
|
-
return !inline && match ? (
|
|
67
|
-
<CodeBlock className={className}>{children}</CodeBlock>
|
|
68
|
-
) : (
|
|
69
|
-
<CodeBlock>{children}</CodeBlock>
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
}}
|
|
73
|
-
rehypePlugins={[rehypeRaw]}
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
));
|
|
77
|
-
|
|
78
|
-
const renderQualifierMessage = guard(qualifierMessage, (message) => (
|
|
79
|
-
<div className={styles.schemaQualifierMessage}>
|
|
80
|
-
<ReactMarkdown
|
|
81
|
-
children={createDescription(message)}
|
|
82
|
-
rehypePlugins={[rehypeRaw]}
|
|
83
|
-
/>
|
|
84
|
-
</div>
|
|
85
|
-
));
|
|
86
|
-
|
|
87
|
-
const renderDefaultValue = guard(toString(defaultValue), (value) => (
|
|
88
|
-
<div className={styles.schemaQualifierMessage}>
|
|
89
|
-
<ReactMarkdown children={`**Default value:** \`${value}\``} />
|
|
90
|
-
</div>
|
|
91
|
-
));
|
|
92
|
-
|
|
93
|
-
const schemaContent = (
|
|
94
|
-
<div>
|
|
95
|
-
<strong className={deprecated && styles.strikethrough}>{name}</strong>
|
|
96
|
-
<span className={styles.schemaName}> {schemaName}</span>
|
|
97
|
-
{renderNullable}
|
|
98
|
-
{!deprecated && renderRequired}
|
|
99
|
-
{renderDeprecated}
|
|
100
|
-
{renderQualifierMessage}
|
|
101
|
-
{renderDefaultValue}
|
|
102
|
-
{renderSchemaDescription}
|
|
103
|
-
{collapsibleSchemaContent ?? collapsibleSchemaContent}
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<div className={styles.schemaItem}>
|
|
109
|
-
{collapsible ? collapsibleSchemaContent : schemaContent}
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export default SchemaItem;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.schemaItem {
|
|
2
|
-
list-style: none;
|
|
3
|
-
position: relative;
|
|
4
|
-
margin: 0 !important;
|
|
5
|
-
padding: 5px 0 5px 1rem;
|
|
6
|
-
border-left: thin solid var(--ifm-color-gray-500) !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.schemaItem:hover {
|
|
10
|
-
background-color: var(--ifm-menu-color-background-active);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.schemaItem:focus {
|
|
14
|
-
background-color: var(--ifm-menu-color-background-active);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.schemaName {
|
|
18
|
-
opacity: 0.6;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.required {
|
|
22
|
-
font-size: var(--ifm-code-font-size);
|
|
23
|
-
color: var(--openapi-required);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.deprecated {
|
|
27
|
-
font-size: var(--ifm-code-font-size);
|
|
28
|
-
color: var(--openapi-deprecated);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.nullable {
|
|
32
|
-
font-size: var(--ifm-code-font-size);
|
|
33
|
-
color: var(--openapi-nullable);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.strikethrough {
|
|
37
|
-
text-decoration: line-through;
|
|
38
|
-
}
|