@redocly/openapi-docs 0.74.2-pingfed.3 → 0.81.2-rc.2
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/dist/redocly-openapi-docs.min.js +10620 -8618
- package/lib/components/ApiInfo/ApiInfo.d.ts +3 -3
- package/lib/components/ApiInfo/ApiInfo.js +2 -2
- package/lib/components/ApiInfo/Metadata.d.ts +2 -2
- package/lib/components/ApiInfo/Metadata.js +1 -1
- package/lib/components/ApiInfo/styled.js +4 -1
- package/lib/components/CallbackSamples/CallbackSamples.d.ts +4 -4
- package/lib/components/CallbackSamples/CallbackSamples.js +15 -1
- package/lib/components/Callbacks/CallbackDetails.d.ts +2 -2
- package/lib/components/Callbacks/CallbackDetails.js +18 -2
- package/lib/components/Callbacks/CallbackOperation.d.ts +4 -2
- package/lib/components/Callbacks/CallbackOperation.js +14 -1
- package/lib/components/Callbacks/CallbackSummary.d.ts +3 -3
- package/lib/components/Callbacks/CallbackSummary.js +18 -1
- package/lib/components/Callbacks/CallbacksList.d.ts +5 -3
- package/lib/components/Callbacks/CallbacksList.js +1 -1
- package/lib/components/Callbacks/styled.js +1 -0
- package/lib/components/Content/Content.d.ts +8 -0
- package/lib/components/Content/Content.js +2 -0
- package/lib/components/Content/index.d.ts +1 -0
- package/lib/components/Content/index.js +2 -0
- package/lib/components/Content/useAutoScroll.d.ts +1 -0
- package/lib/components/Content/useAutoScroll.js +2 -0
- package/lib/components/ContentItem/ContentItem.d.ts +3 -3
- package/lib/components/ContentItem/ContentItem.js +1 -1
- package/lib/components/ContentItem/useIsExpanded.d.ts +5 -0
- package/lib/components/ContentItem/useIsExpanded.js +2 -0
- package/lib/components/ContentItems/ContentItems.d.ts +3 -3
- package/lib/components/ContentItems/ContentItems.js +1 -1
- package/lib/components/ContentItems/helpers.d.ts +0 -8
- package/lib/components/ContentItems/helpers.js +1 -1
- package/lib/components/Discriminator/Discriminator.d.ts +9 -0
- package/lib/components/Discriminator/Discriminator.js +6 -0
- package/lib/components/Discriminator/index.d.ts +1 -0
- package/lib/components/Discriminator/index.js +2 -0
- package/lib/components/Download/DownloadSpecification.d.ts +4 -0
- package/lib/components/Download/DownloadSpecification.js +40 -0
- package/lib/components/Download/index.d.ts +1 -3
- package/lib/components/Download/index.js +1 -1
- package/lib/components/Download/types.d.ts +10 -14
- package/lib/components/Download/useDownloadInfo.d.ts +1 -1
- package/lib/components/Download/useDownloadInfo.js +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.d.ts +2 -2
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ExpandAllButton/ExpandAllButton.d.ts +6 -0
- package/lib/components/ExpandAllButton/ExpandAllButton.js +4 -0
- package/lib/components/ExpandAllButton/getAllNestedSchema.d.ts +8 -0
- package/lib/components/ExpandAllButton/getAllNestedSchema.js +2 -0
- package/lib/components/ExpandAllButton/index.d.ts +2 -0
- package/lib/components/ExpandAllButton/index.js +2 -0
- package/lib/components/ExpandAllButton/useUpdateExpandedFields.d.ts +2 -0
- package/lib/components/ExpandAllButton/useUpdateExpandedFields.js +2 -0
- package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +2 -2
- package/lib/components/ExternalDocumentation/ExternalDocumentation.js +4 -4
- package/lib/components/Language/LanguageDropdown.d.ts +15 -0
- package/lib/components/Language/LanguageDropdown.js +2 -0
- package/lib/components/Language/LanguageItem.d.ts +11 -0
- package/lib/components/Language/LanguageItem.js +2 -0
- package/lib/components/Language/LanguageList.d.ts +11 -0
- package/lib/components/Language/LanguageList.js +2 -0
- package/lib/components/Language/_tests_/LanguageDropdown.test.d.ts +1 -0
- package/lib/components/Language/_tests_/LanguageDropdown.test.js +2 -0
- package/lib/components/Language/constants.d.ts +1 -0
- package/lib/components/Language/constants.js +2 -0
- package/lib/components/Language/index.d.ts +3 -0
- package/lib/components/Language/index.js +2 -0
- package/lib/components/Language/styled.d.ts +30 -0
- package/lib/components/Language/styled.js +76 -0
- package/lib/components/Markdown/Markdown.d.ts +2 -2
- package/lib/components/Markdown/Markdown.js +1 -1
- package/lib/components/Markdown/index.d.ts +0 -1
- package/lib/components/Markdown/index.js +1 -1
- package/lib/components/Markdown/types.d.ts +3 -2
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +5 -5
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib/components/OperationItem/Description.d.ts +10 -0
- package/lib/components/OperationItem/Description.js +2 -0
- package/lib/components/OperationItem/OperationItem.d.ts +2 -2
- package/lib/components/OperationItem/OperationItem.js +20 -12
- package/lib/components/OperationItem/_tests_/OperationItem.test.d.ts +1 -0
- package/lib/components/OperationItem/_tests_/OperationItem.test.js +2 -0
- package/lib/components/Overlay.d.ts +2 -2
- package/lib/components/Overlay.js +1 -1
- package/lib/components/Overview/Overview.d.ts +4 -0
- package/lib/components/Overview/Overview.js +2 -0
- package/lib/components/Overview/index.d.ts +1 -0
- package/lib/components/Overview/index.js +2 -0
- package/lib/components/PageFooter/PageFooter.d.ts +3 -14
- package/lib/components/PageFooter/PageFooter.js +1 -1
- package/lib/components/Panel/ContentPanel.d.ts +2 -4
- package/lib/components/Panel/ResponsePanel.d.ts +3 -8
- package/lib/components/Panel/ResponsePanel.js +7 -8
- package/lib/components/Panel/index.d.ts +0 -4
- package/lib/components/Panel/index.js +1 -1
- package/lib/components/PanelItem/PanelItem.d.ts +9 -0
- package/lib/components/PanelItem/PanelItem.js +2 -0
- package/lib/components/PanelItem/index.d.ts +2 -0
- package/lib/components/PanelItem/index.js +2 -0
- package/lib/components/PanelItem/styled.d.ts +17 -0
- package/lib/components/PanelItem/styled.js +53 -0
- package/lib/components/PayloadSamples/Example.d.ts +2 -2
- package/lib/components/PayloadSamples/Example.js +1 -1
- package/lib/components/PayloadSamples/ExampleValue.d.ts +1 -1
- package/lib/components/PayloadSamples/ExampleValue.js +1 -1
- package/lib/components/PayloadSamples/ExternalExample.d.ts +2 -2
- package/lib/components/PayloadSamples/ExternalExample.js +1 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +2 -2
- package/lib/components/PayloadSamples/MediaTypeSamples.js +3 -1
- package/lib/components/PayloadSamples/PayloadSamples.d.ts +2 -2
- package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib/components/PayloadSamples/styled.d.ts +4 -3
- package/lib/components/PayloadSamples/styled.js +10 -5
- package/lib/components/PayloadSamples/types.d.ts +0 -1
- package/lib/components/PropertyDetails/DescriptionEnums.d.ts +4 -0
- package/lib/components/PropertyDetails/DescriptionEnums.js +10 -0
- package/lib/components/PropertyDetails/EnumValues.d.ts +3 -0
- package/lib/components/PropertyDetails/EnumValues.js +2 -0
- package/lib/components/PropertyDetails/Examples.d.ts +5 -0
- package/lib/components/PropertyDetails/Examples.js +2 -0
- package/lib/components/PropertyDetails/Extensions.d.ts +3 -0
- package/lib/components/PropertyDetails/Extensions.js +4 -0
- package/lib/components/PropertyDetails/FieldDetail.d.ts +7 -0
- package/lib/components/PropertyDetails/FieldDetail.js +8 -0
- package/lib/components/PropertyDetails/FieldDetails.d.ts +3 -0
- package/lib/components/PropertyDetails/FieldDetails.js +43 -0
- package/lib/components/PropertyDetails/Pattern.d.ts +6 -0
- package/lib/components/PropertyDetails/Pattern.js +2 -0
- package/lib/components/PropertyDetails/PlusCircleIcon.d.ts +7 -0
- package/lib/components/PropertyDetails/PlusCircleIcon.js +11 -0
- package/lib/components/PropertyDetails/PropertyDetails.d.ts +3 -0
- package/lib/components/PropertyDetails/PropertyDetails.js +17 -0
- package/lib/components/PropertyDetails/SchemaTypeInfo.d.ts +6 -0
- package/lib/components/PropertyDetails/SchemaTypeInfo.js +16 -0
- package/lib/components/PropertyDetails/SimpleEnums.d.ts +4 -0
- package/lib/components/PropertyDetails/SimpleEnums.js +8 -0
- package/lib/components/PropertyDetails/cycleColorsByLevel.d.ts +1 -0
- package/lib/components/PropertyDetails/cycleColorsByLevel.js +2 -0
- package/lib/components/PropertyDetails/index.d.ts +3 -0
- package/lib/components/PropertyDetails/index.js +2 -0
- package/lib/components/PropertyDetails/styled.d.ts +11 -0
- package/lib/components/PropertyDetails/styled.js +23 -0
- package/lib/components/PropertyDetails/types.d.ts +42 -0
- package/lib/components/RedoclyOpenAPIDocs/Providers.d.ts +4 -6
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +3 -4
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/index.d.ts +2 -2
- package/lib/components/RedoclyOpenAPIDocs/index.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.d.ts +0 -6
- package/lib/components/RedoclyOpenAPIDocs/styled.js +23 -89
- package/lib/components/RedoclyOpenAPIDocs/types.d.ts +12 -30
- package/lib/components/RedoclyOpenAPIDocs/utils.d.ts +1 -3
- package/lib/components/RedoclyOpenAPIDocs/utils.js +1 -1
- package/lib/components/RenderHook/RenderHook.d.ts +3 -3
- package/lib/components/RenderHook/RenderHook.js +1 -1
- package/lib/components/Replay/EmbeddedReplay.d.ts +11 -0
- package/lib/components/Replay/EmbeddedReplay.js +11 -0
- package/lib/components/Replay/Replay.d.ts +10 -0
- package/lib/components/Replay/Replay.js +14 -0
- package/lib/components/Replay/index.d.ts +2 -0
- package/lib/components/Replay/index.js +2 -0
- package/lib/components/Replay/utils.d.ts +14 -0
- package/lib/components/Replay/utils.js +2 -0
- package/lib/components/Request/RequestDetails.d.ts +3 -0
- package/lib/components/Request/RequestDetails.js +2 -0
- package/lib/components/Request/types.d.ts +6 -0
- package/lib/components/RequestParameters/Body.d.ts +10 -0
- package/lib/components/RequestParameters/Body.js +2 -0
- package/lib/components/RequestParameters/ParametersGroup.d.ts +9 -0
- package/lib/components/RequestParameters/ParametersGroup.js +21 -0
- package/lib/components/RequestParameters/RequestParameters.d.ts +9 -0
- package/lib/components/RequestParameters/RequestParameters.js +2 -0
- package/lib/components/RequestParameters/index.d.ts +2 -0
- package/lib/components/RequestParameters/index.js +2 -0
- package/lib/components/RequestSamples/CodeSample.d.ts +3 -4
- package/lib/components/RequestSamples/CodeSample.js +9 -1
- package/lib/components/RequestSamples/Example.d.ts +3 -4
- package/lib/components/RequestSamples/Example.js +1 -1
- package/lib/components/RequestSamples/RequestSamples.d.ts +4 -9
- package/lib/components/RequestSamples/RequestSamples.js +6 -1
- package/lib/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib/components/RequestSamples/useCodeSamples.js +1 -1
- package/lib/components/ResponseSamples/ResponseSamples.d.ts +5 -3
- package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
- package/lib/components/ResponseSamples/Summary.d.ts +5 -0
- package/lib/components/ResponseSamples/Summary.js +2 -0
- package/lib/components/Responses/OperationResponseList.d.ts +8 -2
- package/lib/components/Responses/OperationResponseList.js +4 -1
- package/lib/components/Responses/ResponseDetails.d.ts +2 -2
- package/lib/components/Responses/ResponseDetails.js +1 -3
- package/lib/components/Responses/ResponseHeaders.d.ts +2 -2
- package/lib/components/Responses/ResponseHeaders.js +1 -1
- package/lib/components/Responses/index.d.ts +0 -3
- package/lib/components/Responses/index.js +1 -1
- package/lib/components/Responses/styled.d.ts +6 -3
- package/lib/components/Responses/styled.js +21 -12
- package/lib/components/Responses/types.d.ts +5 -7
- package/lib/components/RightPanel/RightPanel.d.ts +5 -0
- package/lib/components/RightPanel/RightPanel.js +2 -0
- package/lib/components/RightPanel/index.d.ts +1 -0
- package/lib/components/RightPanel/index.js +2 -0
- package/lib/components/Samples/ExampleSwitch.d.ts +2 -3
- package/lib/components/Samples/ExampleSwitch.js +1 -1
- package/lib/components/Samples/index.d.ts +0 -2
- package/lib/components/Samples/index.js +1 -1
- package/lib/components/Samples/use-example-key.d.ts +1 -2
- package/lib/components/Samples/use-example-key.js +1 -1
- package/lib/components/Schema/ArraySchema.d.ts +3 -2
- package/lib/components/Schema/ArraySchema.js +33 -3
- package/lib/components/Schema/ObjectSchema.d.ts +2 -2
- package/lib/components/Schema/ObjectSchema.js +1 -1
- package/lib/components/Schema/OneOfSchema.d.ts +2 -2
- package/lib/components/Schema/OneOfSchema.js +9 -1
- package/lib/components/Schema/RecursiveSchema.d.ts +2 -2
- package/lib/components/Schema/RecursiveSchema.js +1 -1
- package/lib/components/Schema/Schema.d.ts +2 -2
- package/lib/components/Schema/Schema.js +4 -1
- package/lib/components/Schema/SubSchema.d.ts +13 -0
- package/lib/components/Schema/SubSchema.js +2 -0
- package/lib/components/Schema/helpers.d.ts +5 -0
- package/lib/components/Schema/helpers.js +2 -0
- package/lib/components/Schema/types.d.ts +9 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib/components/SchemaDefinition/SchemaDefinition.js +1 -4
- package/lib/components/SectionContent/SectionContent.d.ts +2 -10
- package/lib/components/SectionContent/SectionContent.js +24 -1
- package/lib/components/SectionItem/SectionItem.d.ts +2 -2
- package/lib/components/SectionItem/SectionItem.js +1 -1
- package/lib/components/Security/Divider.d.ts +3 -0
- package/lib/components/Security/Divider.js +15 -0
- package/lib/components/Security/OAuthFlow.d.ts +6 -0
- package/lib/components/Security/OAuthFlow.js +4 -0
- package/lib/components/Security/Security.d.ts +7 -0
- package/lib/components/Security/Security.js +2 -0
- package/lib/components/Security/SecurityButton.d.ts +10 -0
- package/lib/components/Security/SecurityButton.js +28 -0
- package/lib/components/Security/SecurityFlow.d.ts +5 -0
- package/lib/components/Security/SecurityFlow.js +21 -0
- package/lib/components/Security/SecurityModal.d.ts +8 -0
- package/lib/components/Security/SecurityModal.js +45 -0
- package/lib/components/Security/SecuritySchemeItem.d.ts +7 -0
- package/lib/components/Security/SecuritySchemeItem.js +20 -0
- package/lib/components/Security/helper.d.ts +2 -0
- package/lib/components/Security/helper.js +2 -0
- package/lib/components/Security/index.d.ts +1 -0
- package/lib/components/Security/index.js +2 -0
- package/lib/components/Security/styled.d.ts +2 -0
- package/lib/components/Security/styled.js +14 -0
- package/lib/components/SelectOrLabel/SelectOrLabel.d.ts +7 -0
- package/lib/components/SelectOrLabel/SelectOrLabel.js +8 -0
- package/lib/components/SelectOrLabel/index.d.ts +1 -0
- package/lib/components/SelectOrLabel/index.js +2 -0
- package/lib/components/ServerList/ServerList.d.ts +3 -0
- package/lib/components/ServerList/ServerList.js +60 -0
- package/lib/components/ServerList/index.d.ts +1 -0
- package/lib/components/ServerList/index.js +2 -0
- package/lib/components/ServerList/types.d.ts +2 -0
- package/lib/components/ServerListDropdown/ServerListDropdown.d.ts +7 -0
- package/lib/components/ServerListDropdown/ServerListDropdown.js +2 -0
- package/lib/components/ServerListDropdown/index.d.ts +1 -0
- package/lib/components/ServerListDropdown/index.js +2 -0
- package/lib/components/ServerListDropdown/styled.d.ts +16 -0
- package/lib/components/ServerListDropdown/styled.js +23 -0
- package/lib/components/SideMenu/SideMenu.d.ts +3 -2
- package/lib/components/SideMenu/SideMenu.js +3 -1
- package/lib/components/SideMenu/hooks/useMenuItems.d.ts +1 -3
- package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib/components/SideMenu/index.d.ts +0 -3
- package/lib/components/SideMenu/index.js +1 -1
- package/lib/components/SideMenu/types.d.ts +1 -15
- package/lib/components/StickySidebar/SidebarActions.d.ts +1 -0
- package/lib/components/StickySidebar/SidebarActions.js +6 -0
- package/lib/components/StickySidebar/StickyResponsiveSidebar.d.ts +2 -3
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +12 -26
- package/lib/components/Tabs/Tabs.d.ts +8 -0
- package/lib/components/Tabs/Tabs.js +35 -0
- package/lib/components/Tabs/index.d.ts +2 -5
- package/lib/components/Tabs/index.js +1 -1
- package/lib/components/Tabs/useTabsState.d.ts +11 -0
- package/lib/components/Tabs/useTabsState.js +2 -0
- package/lib/components/TagItem/OperationsNavigation.d.ts +9 -0
- package/lib/components/TagItem/OperationsNavigation.js +46 -0
- package/lib/components/TagItem/TagItem.d.ts +8 -2
- package/lib/components/TagItem/TagItem.js +22 -1
- package/lib/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.d.ts +1 -0
- package/lib/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.js +18 -0
- package/lib/components/UnsupportedFeatureScreen/index.d.ts +1 -0
- package/lib/components/UnsupportedFeatureScreen/index.js +2 -0
- package/lib/components/ViewNested/ViewNested.d.ts +13 -0
- package/lib/components/ViewNested/ViewNested.js +31 -0
- package/lib/components/ViewNested/index.d.ts +1 -0
- package/lib/components/ViewNested/index.js +2 -0
- package/lib/components/common/BodyContent/BodyContent.d.ts +12 -0
- package/lib/components/common/BodyContent/BodyContent.js +28 -0
- package/lib/components/common/BodyContent/index.d.ts +1 -0
- package/lib/components/common/BodyContent/index.js +2 -0
- package/lib/components/common/ClearButton/ClearButton.d.ts +2 -2
- package/lib/components/common/ClearButton/ClearButton.js +1 -1
- package/lib/components/common/ClearButton/types.d.ts +2 -2
- package/lib/components/common/CodeBlockPanel.d.ts +2 -0
- package/lib/components/common/CodeBlockPanel.js +6 -0
- package/lib/components/common/ConstraintsView.d.ts +5 -0
- package/lib/components/common/ConstraintsView.js +4 -0
- package/lib/components/common/Dropdown/Dropdown.d.ts +15 -3
- package/lib/components/common/Dropdown/Dropdown.js +26 -15
- package/lib/components/common/Dropdown/index.d.ts +2 -2
- package/lib/components/common/Dropdown/index.js +1 -1
- package/lib/components/common/Extensions.d.ts +7 -0
- package/lib/components/common/Extensions.js +4 -0
- package/lib/components/common/Fields/fields-layout.js +12 -13
- package/lib/components/common/Fields/fields.d.ts +33 -16
- package/lib/components/common/Fields/fields.js +45 -64
- package/lib/components/common/LinkToField.d.ts +3 -9
- package/lib/components/common/LinkToField.js +14 -8
- package/lib/components/common/OperationItemTitle.d.ts +2 -0
- package/lib/components/common/OperationItemTitle.js +33 -0
- package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +12 -0
- package/lib/components/common/SchemaSelection/SchemaSelection.js +2 -0
- package/lib/components/common/SchemaSelection/index.d.ts +1 -0
- package/lib/components/common/SchemaSelection/index.js +2 -0
- package/lib/components/common/Select/Select.d.ts +3 -0
- package/lib/components/common/Select/Select.js +2 -0
- package/lib/components/common/Select/index.d.ts +2 -0
- package/lib/components/common/Select/index.js +2 -0
- package/lib/components/common/Select/styled.d.ts +23 -0
- package/lib/components/common/Select/styled.js +111 -0
- package/lib/components/common/Select/types.d.ts +20 -0
- package/lib/components/common/Skeleton/LanguageListSkeleton.d.ts +4 -0
- package/lib/components/common/Skeleton/LanguageListSkeleton.js +23 -0
- package/lib/components/common/Skeleton/Skeleton.d.ts +5 -2
- package/lib/components/common/Skeleton/Skeleton.js +7 -5
- package/lib/components/common/headers.d.ts +0 -1
- package/lib/components/common/headers.js +2 -6
- package/lib/components/common/index.d.ts +5 -7
- package/lib/components/common/index.js +1 -1
- package/lib/components/common/linkify.d.ts +4 -3
- package/lib/components/common/linkify.js +12 -3
- package/lib/components/common/panels.d.ts +5 -1
- package/lib/components/common/panels.js +61 -40
- package/lib/components/common/schema.d.ts +4 -3
- package/lib/components/common/schema.js +26 -20
- package/lib/components/common/styled.d.ts +4 -0
- package/lib/components/common/styled.js +27 -0
- package/lib/components/index.d.ts +5 -13
- package/lib/components/index.js +1 -1
- package/lib/components/pluggable/RedocExample.d.ts +2 -2
- package/lib/components/pluggable/RedocExample.js +1 -1
- package/lib/components/pluggable/RedocSchema.d.ts +2 -2
- package/lib/components/pluggable/RedocSchema.js +1 -1
- package/lib/components/pluggable/index.d.ts +0 -3
- package/lib/components/pluggable/index.js +1 -1
- package/lib/components/pluggable/styled.components.d.ts +1 -0
- package/lib/components/pluggable/styled.components.js +1 -1
- package/lib/constants.d.ts +5 -3
- package/lib/constants.js +1 -1
- package/lib/events/codeSampleCopy.js +1 -1
- package/lib/events/index.d.ts +0 -1
- package/lib/events/index.js +1 -1
- package/lib/events/types.d.ts +1 -8
- package/lib/events/types.js +1 -1
- package/lib/hoc/types.d.ts +3 -10
- package/lib/hoc/utils.d.ts +2 -2
- package/lib/hoc/withRouter.d.ts +2 -2
- package/lib/hoc/withRouter.js +1 -1
- package/lib/hoc/withStore.d.ts +2 -2
- package/lib/hoc/withStore.js +1 -1
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useActiveWithFallback.d.ts +3 -0
- package/lib/hooks/useActiveWithFallback.js +2 -0
- package/lib/hooks/useContentItems.js +1 -1
- package/lib/hooks/useRouter.d.ts +3 -3
- package/lib/hooks/useUppercase2LowercaseRedirect.d.ts +1 -0
- package/lib/hooks/useUppercase2LowercaseRedirect.js +2 -0
- package/lib/icons/CSharpIcon/CSharpIcon.d.ts +4 -0
- package/lib/icons/CSharpIcon/CSharpIcon.js +2 -0
- package/lib/icons/CSharpIcon/index.d.ts +1 -0
- package/lib/icons/CSharpIcon/index.js +2 -0
- package/lib/icons/CurlIcon/CurlIcon.d.ts +4 -0
- package/lib/icons/CurlIcon/CurlIcon.js +2 -0
- package/lib/icons/CurlIcon/index.d.ts +1 -0
- package/lib/icons/CurlIcon/index.js +2 -0
- package/lib/icons/GOIcon/GOIcon.d.ts +4 -0
- package/lib/icons/GOIcon/GOIcon.js +2 -0
- package/lib/icons/GOIcon/index.d.ts +1 -0
- package/lib/icons/GOIcon/index.js +2 -0
- package/lib/icons/JavaIcon/JavaIcon.d.ts +4 -0
- package/lib/icons/JavaIcon/JavaIcon.js +2 -0
- package/lib/icons/JavaIcon/index.d.ts +1 -0
- package/lib/icons/JavaIcon/index.js +2 -0
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +4 -0
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +2 -0
- package/lib/icons/JavaScriptIcon/index.d.ts +1 -0
- package/lib/icons/JavaScriptIcon/index.js +2 -0
- package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +4 -0
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +2 -0
- package/lib/icons/NodeJSIcon/index.d.ts +1 -0
- package/lib/icons/NodeJSIcon/index.js +2 -0
- package/lib/icons/PHPIcon/PHPIcon.d.ts +4 -0
- package/lib/icons/PHPIcon/PHPIcon.js +2 -0
- package/lib/icons/PHPIcon/index.d.ts +1 -0
- package/lib/icons/PHPIcon/index.js +2 -0
- package/lib/icons/PayloadIcon/PayloadIcon.d.ts +4 -0
- package/lib/icons/PayloadIcon/PayloadIcon.js +2 -0
- package/lib/icons/PayloadIcon/index.d.ts +1 -0
- package/lib/icons/PayloadIcon/index.js +2 -0
- package/lib/icons/PythonIcon/PythonIcon.d.ts +4 -0
- package/lib/icons/PythonIcon/PythonIcon.js +2 -0
- package/lib/icons/PythonIcon/index.d.ts +1 -0
- package/lib/icons/PythonIcon/index.js +2 -0
- package/lib/icons/RIcon/RIcon.d.ts +4 -0
- package/lib/icons/RIcon/RIcon.js +2 -0
- package/lib/icons/RIcon/index.d.ts +1 -0
- package/lib/icons/RIcon/index.js +2 -0
- package/lib/icons/RubyIcon/RubyIcon.d.ts +4 -0
- package/lib/icons/RubyIcon/RubyIcon.js +2 -0
- package/lib/icons/RubyIcon/index.d.ts +1 -0
- package/lib/icons/RubyIcon/index.js +2 -0
- package/lib/index.d.ts +7 -6
- package/lib/index.js +1 -1
- package/lib/jotai/app.d.ts +34 -22
- package/lib/jotai/app.js +1 -1
- package/lib/jotai/operation.d.ts +27 -3
- package/lib/jotai/operation.js +1 -1
- package/lib/jotai/replay.d.ts +3 -0
- package/lib/jotai/replay.js +2 -0
- package/lib/jotai/store.d.ts +5 -10
- package/lib/jotai/store.js +1 -1
- package/lib/models/code-sample-options.d.ts +1 -4
- package/lib/models/group.d.ts +2 -2
- package/lib/models/group.js +1 -1
- package/lib/models/index.d.ts +0 -1
- package/lib/models/index.js +1 -1
- package/lib/models/mediaContent.js +1 -1
- package/lib/models/mediaType.js +1 -1
- package/lib/models/operation.js +1 -1
- package/lib/models/response.js +1 -1
- package/lib/models/schema.js +1 -1
- package/lib/models/tab.d.ts +4 -0
- package/lib/models/tab.js +2 -0
- package/lib/models/types.d.ts +11 -14
- package/lib/services/OpenAPIParser.d.ts +1 -2
- package/lib/services/OpenAPIParser.js +1 -1
- package/lib/services/code-samples/constants.d.ts +2 -0
- package/lib/services/code-samples/constants.js +2 -0
- package/lib/services/code-samples/generator.d.ts +3 -3
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +2 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +1 -1
- package/lib/services/code-samples/httpsnippet/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/python/requests.js +1 -1
- package/lib/services/code-samples/types.d.ts +5 -2
- package/lib/services/config-options/helpers.d.ts +3 -0
- package/lib/services/config-options/helpers.js +2 -0
- package/lib/services/config-options/normalizeOptions.js +2 -0
- package/lib/services/config-options/types.d.ts +100 -0
- package/lib/services/history/helpers.d.ts +1 -0
- package/lib/services/history/helpers.js +1 -1
- package/lib/services/index.d.ts +1 -5
- package/lib/services/index.js +1 -1
- package/lib/services/menu/builder.d.ts +1 -1
- package/lib/services/menu/builder.js +1 -1
- package/lib/services/menu/markdown.d.ts +1 -4
- package/lib/services/menu/markdown.js +1 -1
- package/lib/services/menu/operation.d.ts +2 -5
- package/lib/services/menu/operation.js +1 -1
- package/lib/services/menu/tags.d.ts +1 -1
- package/lib/services/menu/tags.js +1 -1
- package/lib/services/types.d.ts +4 -50
- package/lib/services/types.js +1 -1
- package/lib/services/utils.d.ts +0 -7
- package/lib/services/utils.js +1 -1
- package/lib/setupTests.js +1 -1
- package/lib/standalone.d.ts +2 -6
- package/lib/standalone.js +1 -1
- package/lib/testProviders.d.ts +2 -6
- package/lib/testProviders.js +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +1 -1
- package/lib/types/open-api.d.ts +10 -4
- package/lib/utils/argValuesHelpers.d.ts +1 -1
- package/lib/utils/argValuesHelpers.js +1 -1
- package/lib/utils/cookies.d.ts +7 -0
- package/lib/utils/cookies.js +2 -0
- package/lib/utils/dom.d.ts +0 -1
- package/lib/utils/dom.js +1 -1
- package/lib/utils/environments.d.ts +4 -0
- package/lib/utils/environments.js +2 -0
- package/lib/utils/helpers.d.ts +0 -3
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/index.js +1 -1
- package/lib/utils/isMobile.d.ts +5 -0
- package/lib/utils/isMobile.js +2 -0
- package/lib/utils/loadAndBundleSpec.js +1 -1
- package/lib/utils/local-storage.js +1 -1
- package/lib/utils/object.d.ts +1 -0
- package/lib/utils/object.js +1 -1
- package/lib/utils/openapi.d.ts +2 -5
- package/lib/utils/openapi.js +1 -1
- package/lib/utils/path.d.ts +0 -2
- package/lib/utils/path.js +1 -1
- package/lib/utils/replaceVariables.d.ts +2 -0
- package/lib/utils/replaceVariables.js +2 -0
- package/lib/utils/saveTextBeforeHeading.d.ts +1 -1
- package/lib/utils/saveTextBeforeHeading.js +1 -1
- package/lib/utils/security-details.d.ts +1 -5
- package/lib/utils/security-details.js +1 -1
- package/lib/utils/session-storage.js +1 -1
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/string.js +1 -1
- package/lib-esm/components/ApiInfo/ApiInfo.d.ts +3 -3
- package/lib-esm/components/ApiInfo/ApiInfo.js +2 -2
- package/lib-esm/components/ApiInfo/Metadata.d.ts +2 -2
- package/lib-esm/components/ApiInfo/Metadata.js +1 -1
- package/lib-esm/components/ApiInfo/styled.js +5 -2
- package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +4 -4
- package/lib-esm/components/CallbackSamples/CallbackSamples.js +15 -1
- package/lib-esm/components/Callbacks/CallbackDetails.d.ts +2 -2
- package/lib-esm/components/Callbacks/CallbackDetails.js +18 -2
- package/lib-esm/components/Callbacks/CallbackOperation.d.ts +4 -2
- package/lib-esm/components/Callbacks/CallbackOperation.js +14 -1
- package/lib-esm/components/Callbacks/CallbackSummary.d.ts +3 -3
- package/lib-esm/components/Callbacks/CallbackSummary.js +18 -1
- package/lib-esm/components/Callbacks/CallbacksList.d.ts +5 -3
- package/lib-esm/components/Callbacks/CallbacksList.js +1 -1
- package/lib-esm/components/Callbacks/styled.js +1 -0
- package/lib-esm/components/Content/Content.d.ts +8 -0
- package/lib-esm/components/Content/Content.js +2 -0
- package/lib-esm/components/Content/index.d.ts +1 -0
- package/lib-esm/components/Content/index.js +2 -0
- package/lib-esm/components/Content/useAutoScroll.d.ts +1 -0
- package/lib-esm/components/Content/useAutoScroll.js +2 -0
- package/lib-esm/components/ContentItem/ContentItem.d.ts +3 -3
- package/lib-esm/components/ContentItem/ContentItem.js +1 -1
- package/lib-esm/components/ContentItem/useIsExpanded.d.ts +5 -0
- package/lib-esm/components/ContentItem/useIsExpanded.js +2 -0
- package/lib-esm/components/ContentItems/ContentItems.d.ts +3 -3
- package/lib-esm/components/ContentItems/ContentItems.js +1 -1
- package/lib-esm/components/ContentItems/helpers.d.ts +0 -8
- package/lib-esm/components/ContentItems/helpers.js +1 -1
- package/lib-esm/components/Discriminator/Discriminator.d.ts +9 -0
- package/lib-esm/components/Discriminator/Discriminator.js +6 -0
- package/lib-esm/components/Discriminator/index.d.ts +1 -0
- package/lib-esm/components/Discriminator/index.js +2 -0
- package/lib-esm/components/Download/DownloadSpecification.d.ts +4 -0
- package/lib-esm/components/Download/DownloadSpecification.js +40 -0
- package/lib-esm/components/Download/index.d.ts +1 -3
- package/lib-esm/components/Download/index.js +1 -1
- package/lib-esm/components/Download/types.d.ts +10 -14
- package/lib-esm/components/Download/useDownloadInfo.d.ts +1 -1
- package/lib-esm/components/Download/useDownloadInfo.js +1 -1
- package/lib-esm/components/ErrorBoundary/ErrorBoundary.d.ts +2 -2
- package/lib-esm/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib-esm/components/ExpandAllButton/ExpandAllButton.d.ts +6 -0
- package/lib-esm/components/ExpandAllButton/ExpandAllButton.js +4 -0
- package/lib-esm/components/ExpandAllButton/getAllNestedSchema.d.ts +8 -0
- package/lib-esm/components/ExpandAllButton/getAllNestedSchema.js +2 -0
- package/lib-esm/components/ExpandAllButton/index.d.ts +2 -0
- package/lib-esm/components/ExpandAllButton/index.js +2 -0
- package/lib-esm/components/ExpandAllButton/useUpdateExpandedFields.d.ts +2 -0
- package/lib-esm/components/ExpandAllButton/useUpdateExpandedFields.js +2 -0
- package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +2 -2
- package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.js +4 -4
- package/lib-esm/components/Language/LanguageDropdown.d.ts +15 -0
- package/lib-esm/components/Language/LanguageDropdown.js +2 -0
- package/lib-esm/components/Language/LanguageItem.d.ts +11 -0
- package/lib-esm/components/Language/LanguageItem.js +2 -0
- package/lib-esm/components/Language/LanguageList.d.ts +11 -0
- package/lib-esm/components/Language/LanguageList.js +2 -0
- package/lib-esm/components/Language/_tests_/LanguageDropdown.test.d.ts +1 -0
- package/lib-esm/components/Language/_tests_/LanguageDropdown.test.js +2 -0
- package/lib-esm/components/Language/constants.d.ts +1 -0
- package/lib-esm/components/Language/constants.js +2 -0
- package/lib-esm/components/Language/index.d.ts +3 -0
- package/lib-esm/components/Language/index.js +2 -0
- package/lib-esm/components/Language/styled.d.ts +30 -0
- package/lib-esm/components/Language/styled.js +76 -0
- package/lib-esm/components/Markdown/Markdown.d.ts +2 -2
- package/lib-esm/components/Markdown/Markdown.js +1 -1
- package/lib-esm/components/Markdown/index.d.ts +0 -1
- package/lib-esm/components/Markdown/index.js +1 -1
- package/lib-esm/components/Markdown/types.d.ts +3 -2
- package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +5 -5
- package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib-esm/components/OperationItem/Description.d.ts +10 -0
- package/lib-esm/components/OperationItem/Description.js +2 -0
- package/lib-esm/components/OperationItem/OperationItem.d.ts +2 -2
- package/lib-esm/components/OperationItem/OperationItem.js +19 -11
- package/lib-esm/components/OperationItem/_tests_/OperationItem.test.d.ts +1 -0
- package/lib-esm/components/OperationItem/_tests_/OperationItem.test.js +2 -0
- package/lib-esm/components/Overlay.d.ts +2 -2
- package/lib-esm/components/Overlay.js +1 -1
- package/lib-esm/components/Overview/Overview.d.ts +4 -0
- package/lib-esm/components/Overview/Overview.js +2 -0
- package/lib-esm/components/Overview/index.d.ts +1 -0
- package/lib-esm/components/Overview/index.js +2 -0
- package/lib-esm/components/PageFooter/PageFooter.d.ts +3 -14
- package/lib-esm/components/PageFooter/PageFooter.js +1 -1
- package/lib-esm/components/Panel/ContentPanel.d.ts +2 -4
- package/lib-esm/components/Panel/ResponsePanel.d.ts +3 -8
- package/lib-esm/components/Panel/ResponsePanel.js +7 -8
- package/lib-esm/components/Panel/index.d.ts +0 -4
- package/lib-esm/components/Panel/index.js +1 -1
- package/lib-esm/components/PanelItem/PanelItem.d.ts +9 -0
- package/lib-esm/components/PanelItem/PanelItem.js +2 -0
- package/lib-esm/components/PanelItem/index.d.ts +2 -0
- package/lib-esm/components/PanelItem/index.js +2 -0
- package/lib-esm/components/PanelItem/styled.d.ts +17 -0
- package/lib-esm/components/PanelItem/styled.js +53 -0
- package/lib-esm/components/PayloadSamples/Example.d.ts +2 -2
- package/lib-esm/components/PayloadSamples/Example.js +1 -1
- package/lib-esm/components/PayloadSamples/ExampleValue.d.ts +1 -1
- package/lib-esm/components/PayloadSamples/ExampleValue.js +1 -1
- package/lib-esm/components/PayloadSamples/ExternalExample.d.ts +2 -2
- package/lib-esm/components/PayloadSamples/ExternalExample.js +1 -1
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +2 -2
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +3 -1
- package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +2 -2
- package/lib-esm/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib-esm/components/PayloadSamples/styled.d.ts +4 -3
- package/lib-esm/components/PayloadSamples/styled.js +10 -5
- package/lib-esm/components/PayloadSamples/types.d.ts +0 -1
- package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +4 -0
- package/lib-esm/components/PropertyDetails/DescriptionEnums.js +10 -0
- package/lib-esm/components/PropertyDetails/EnumValues.d.ts +3 -0
- package/lib-esm/components/PropertyDetails/EnumValues.js +2 -0
- package/lib-esm/components/PropertyDetails/Examples.d.ts +5 -0
- package/lib-esm/components/PropertyDetails/Examples.js +2 -0
- package/lib-esm/components/PropertyDetails/Extensions.d.ts +3 -0
- package/lib-esm/components/PropertyDetails/Extensions.js +4 -0
- package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +7 -0
- package/lib-esm/components/PropertyDetails/FieldDetail.js +8 -0
- package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +3 -0
- package/lib-esm/components/PropertyDetails/FieldDetails.js +43 -0
- package/lib-esm/components/PropertyDetails/Pattern.d.ts +6 -0
- package/lib-esm/components/PropertyDetails/Pattern.js +2 -0
- package/lib-esm/components/PropertyDetails/PlusCircleIcon.d.ts +7 -0
- package/lib-esm/components/PropertyDetails/PlusCircleIcon.js +11 -0
- package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +3 -0
- package/lib-esm/components/PropertyDetails/PropertyDetails.js +17 -0
- package/lib-esm/components/PropertyDetails/SchemaTypeInfo.d.ts +6 -0
- package/lib-esm/components/PropertyDetails/SchemaTypeInfo.js +16 -0
- package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +4 -0
- package/lib-esm/components/PropertyDetails/SimpleEnums.js +8 -0
- package/lib-esm/components/PropertyDetails/cycleColorsByLevel.d.ts +1 -0
- package/lib-esm/components/PropertyDetails/cycleColorsByLevel.js +2 -0
- package/lib-esm/components/PropertyDetails/index.d.ts +3 -0
- package/lib-esm/components/PropertyDetails/index.js +2 -0
- package/lib-esm/components/PropertyDetails/styled.d.ts +11 -0
- package/lib-esm/components/PropertyDetails/styled.js +23 -0
- package/lib-esm/components/PropertyDetails/types.d.ts +42 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/Providers.d.ts +4 -6
- package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +3 -4
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/index.d.ts +2 -2
- package/lib-esm/components/RedoclyOpenAPIDocs/index.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.d.ts +0 -6
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +23 -89
- package/lib-esm/components/RedoclyOpenAPIDocs/types.d.ts +12 -30
- package/lib-esm/components/RedoclyOpenAPIDocs/utils.d.ts +1 -3
- package/lib-esm/components/RedoclyOpenAPIDocs/utils.js +1 -1
- package/lib-esm/components/RenderHook/RenderHook.d.ts +3 -3
- package/lib-esm/components/RenderHook/RenderHook.js +1 -1
- package/lib-esm/components/Replay/EmbeddedReplay.d.ts +11 -0
- package/lib-esm/components/Replay/EmbeddedReplay.js +11 -0
- package/lib-esm/components/Replay/Replay.d.ts +10 -0
- package/lib-esm/components/Replay/Replay.js +14 -0
- package/lib-esm/components/Replay/index.d.ts +2 -0
- package/lib-esm/components/Replay/index.js +2 -0
- package/lib-esm/components/Replay/utils.d.ts +14 -0
- package/lib-esm/components/Replay/utils.js +2 -0
- package/lib-esm/components/Request/RequestDetails.d.ts +3 -0
- package/lib-esm/components/Request/RequestDetails.js +2 -0
- package/lib-esm/components/Request/types.d.ts +6 -0
- package/lib-esm/components/RequestParameters/Body.d.ts +10 -0
- package/lib-esm/components/RequestParameters/Body.js +2 -0
- package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +9 -0
- package/lib-esm/components/RequestParameters/ParametersGroup.js +21 -0
- package/lib-esm/components/RequestParameters/RequestParameters.d.ts +9 -0
- package/lib-esm/components/RequestParameters/RequestParameters.js +2 -0
- package/lib-esm/components/RequestParameters/index.d.ts +2 -0
- package/lib-esm/components/RequestParameters/index.js +2 -0
- package/lib-esm/components/RequestSamples/CodeSample.d.ts +3 -4
- package/lib-esm/components/RequestSamples/CodeSample.js +9 -1
- package/lib-esm/components/RequestSamples/Example.d.ts +3 -4
- package/lib-esm/components/RequestSamples/Example.js +1 -1
- package/lib-esm/components/RequestSamples/RequestSamples.d.ts +4 -9
- package/lib-esm/components/RequestSamples/RequestSamples.js +6 -1
- package/lib-esm/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib-esm/components/RequestSamples/useCodeSamples.js +1 -1
- package/lib-esm/components/ResponseSamples/ResponseSamples.d.ts +5 -3
- package/lib-esm/components/ResponseSamples/ResponseSamples.js +1 -1
- package/lib-esm/components/ResponseSamples/Summary.d.ts +5 -0
- package/lib-esm/components/ResponseSamples/Summary.js +2 -0
- package/lib-esm/components/Responses/OperationResponseList.d.ts +8 -2
- package/lib-esm/components/Responses/OperationResponseList.js +4 -1
- package/lib-esm/components/Responses/ResponseDetails.d.ts +2 -2
- package/lib-esm/components/Responses/ResponseDetails.js +1 -3
- package/lib-esm/components/Responses/ResponseHeaders.d.ts +2 -2
- package/lib-esm/components/Responses/ResponseHeaders.js +1 -1
- package/lib-esm/components/Responses/index.d.ts +0 -3
- package/lib-esm/components/Responses/index.js +1 -1
- package/lib-esm/components/Responses/styled.d.ts +6 -3
- package/lib-esm/components/Responses/styled.js +21 -12
- package/lib-esm/components/Responses/types.d.ts +5 -7
- package/lib-esm/components/RightPanel/RightPanel.d.ts +5 -0
- package/lib-esm/components/RightPanel/RightPanel.js +2 -0
- package/lib-esm/components/RightPanel/index.d.ts +1 -0
- package/lib-esm/components/RightPanel/index.js +2 -0
- package/lib-esm/components/Samples/ExampleSwitch.d.ts +2 -3
- package/lib-esm/components/Samples/ExampleSwitch.js +1 -1
- package/lib-esm/components/Samples/index.d.ts +0 -2
- package/lib-esm/components/Samples/index.js +1 -1
- package/lib-esm/components/Samples/use-example-key.d.ts +1 -2
- package/lib-esm/components/Samples/use-example-key.js +1 -1
- package/lib-esm/components/Schema/ArraySchema.d.ts +3 -2
- package/lib-esm/components/Schema/ArraySchema.js +33 -3
- package/lib-esm/components/Schema/ObjectSchema.d.ts +2 -2
- package/lib-esm/components/Schema/ObjectSchema.js +1 -1
- package/lib-esm/components/Schema/OneOfSchema.d.ts +2 -2
- package/lib-esm/components/Schema/OneOfSchema.js +9 -1
- package/lib-esm/components/Schema/RecursiveSchema.d.ts +2 -2
- package/lib-esm/components/Schema/RecursiveSchema.js +1 -1
- package/lib-esm/components/Schema/Schema.d.ts +2 -2
- package/lib-esm/components/Schema/Schema.js +4 -1
- package/lib-esm/components/Schema/SubSchema.d.ts +13 -0
- package/lib-esm/components/Schema/SubSchema.js +2 -0
- package/lib-esm/components/Schema/helpers.d.ts +5 -0
- package/lib-esm/components/Schema/helpers.js +2 -0
- package/lib-esm/components/Schema/types.d.ts +9 -1
- package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib-esm/components/SchemaDefinition/SchemaDefinition.js +1 -4
- package/lib-esm/components/SectionContent/SectionContent.d.ts +2 -10
- package/lib-esm/components/SectionContent/SectionContent.js +24 -1
- package/lib-esm/components/SectionItem/SectionItem.d.ts +2 -2
- package/lib-esm/components/SectionItem/SectionItem.js +1 -1
- package/lib-esm/components/Security/Divider.d.ts +3 -0
- package/lib-esm/components/Security/Divider.js +15 -0
- package/lib-esm/components/Security/OAuthFlow.d.ts +6 -0
- package/lib-esm/components/Security/OAuthFlow.js +4 -0
- package/lib-esm/components/Security/Security.d.ts +7 -0
- package/lib-esm/components/Security/Security.js +2 -0
- package/lib-esm/components/Security/SecurityButton.d.ts +10 -0
- package/lib-esm/components/Security/SecurityButton.js +28 -0
- package/lib-esm/components/Security/SecurityFlow.d.ts +5 -0
- package/lib-esm/components/Security/SecurityFlow.js +21 -0
- package/lib-esm/components/Security/SecurityModal.d.ts +8 -0
- package/lib-esm/components/Security/SecurityModal.js +45 -0
- package/lib-esm/components/Security/SecuritySchemeItem.d.ts +7 -0
- package/lib-esm/components/Security/SecuritySchemeItem.js +20 -0
- package/lib-esm/components/Security/helper.d.ts +2 -0
- package/lib-esm/components/Security/helper.js +2 -0
- package/lib-esm/components/Security/index.d.ts +1 -0
- package/lib-esm/components/Security/index.js +2 -0
- package/lib-esm/components/Security/styled.d.ts +2 -0
- package/lib-esm/components/Security/styled.js +14 -0
- package/lib-esm/components/SelectOrLabel/SelectOrLabel.d.ts +7 -0
- package/lib-esm/components/SelectOrLabel/SelectOrLabel.js +8 -0
- package/lib-esm/components/SelectOrLabel/index.d.ts +1 -0
- package/lib-esm/components/SelectOrLabel/index.js +2 -0
- package/lib-esm/components/ServerList/ServerList.d.ts +3 -0
- package/lib-esm/components/ServerList/ServerList.js +60 -0
- package/lib-esm/components/ServerList/index.d.ts +1 -0
- package/lib-esm/components/ServerList/index.js +2 -0
- package/lib-esm/components/ServerList/types.d.ts +2 -0
- package/lib-esm/components/ServerListDropdown/ServerListDropdown.d.ts +7 -0
- package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +2 -0
- package/lib-esm/components/ServerListDropdown/index.d.ts +1 -0
- package/lib-esm/components/ServerListDropdown/index.js +2 -0
- package/lib-esm/components/ServerListDropdown/styled.d.ts +16 -0
- package/lib-esm/components/ServerListDropdown/styled.js +23 -0
- package/lib-esm/components/SideMenu/SideMenu.d.ts +3 -2
- package/lib-esm/components/SideMenu/SideMenu.js +3 -1
- package/lib-esm/components/SideMenu/hooks/useMenuItems.d.ts +1 -3
- package/lib-esm/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib-esm/components/SideMenu/index.d.ts +0 -3
- package/lib-esm/components/SideMenu/index.js +1 -1
- package/lib-esm/components/SideMenu/types.d.ts +1 -15
- package/lib-esm/components/StickySidebar/SidebarActions.d.ts +1 -0
- package/lib-esm/components/StickySidebar/SidebarActions.js +6 -0
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.d.ts +2 -3
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +12 -26
- package/lib-esm/components/Tabs/Tabs.d.ts +8 -0
- package/lib-esm/components/Tabs/Tabs.js +35 -0
- package/lib-esm/components/Tabs/index.d.ts +2 -5
- package/lib-esm/components/Tabs/index.js +1 -1
- package/lib-esm/components/Tabs/useTabsState.d.ts +11 -0
- package/lib-esm/components/Tabs/useTabsState.js +2 -0
- package/lib-esm/components/TagItem/OperationsNavigation.d.ts +9 -0
- package/lib-esm/components/TagItem/OperationsNavigation.js +46 -0
- package/lib-esm/components/TagItem/TagItem.d.ts +8 -2
- package/lib-esm/components/TagItem/TagItem.js +22 -1
- package/lib-esm/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.d.ts +1 -0
- package/lib-esm/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.js +18 -0
- package/lib-esm/components/UnsupportedFeatureScreen/index.d.ts +1 -0
- package/lib-esm/components/UnsupportedFeatureScreen/index.js +2 -0
- package/lib-esm/components/ViewNested/ViewNested.d.ts +13 -0
- package/lib-esm/components/ViewNested/ViewNested.js +31 -0
- package/lib-esm/components/ViewNested/index.d.ts +1 -0
- package/lib-esm/components/ViewNested/index.js +2 -0
- package/lib-esm/components/common/BodyContent/BodyContent.d.ts +12 -0
- package/lib-esm/components/common/BodyContent/BodyContent.js +28 -0
- package/lib-esm/components/common/BodyContent/index.d.ts +1 -0
- package/lib-esm/components/common/BodyContent/index.js +2 -0
- package/lib-esm/components/common/ClearButton/ClearButton.d.ts +2 -2
- package/lib-esm/components/common/ClearButton/ClearButton.js +1 -1
- package/lib-esm/components/common/ClearButton/types.d.ts +2 -2
- package/lib-esm/components/common/CodeBlockPanel.d.ts +2 -0
- package/lib-esm/components/common/CodeBlockPanel.js +6 -0
- package/lib-esm/components/common/ConstraintsView.d.ts +5 -0
- package/lib-esm/components/common/ConstraintsView.js +4 -0
- package/lib-esm/components/common/Dropdown/Dropdown.d.ts +15 -3
- package/lib-esm/components/common/Dropdown/Dropdown.js +26 -15
- package/lib-esm/components/common/Dropdown/index.d.ts +2 -2
- package/lib-esm/components/common/Dropdown/index.js +1 -1
- package/lib-esm/components/common/Extensions.d.ts +7 -0
- package/lib-esm/components/common/Extensions.js +4 -0
- package/lib-esm/components/common/Fields/fields-layout.js +12 -13
- package/lib-esm/components/common/Fields/fields.d.ts +33 -16
- package/lib-esm/components/common/Fields/fields.js +45 -64
- package/lib-esm/components/common/LinkToField.d.ts +3 -9
- package/lib-esm/components/common/LinkToField.js +14 -8
- package/lib-esm/components/common/OperationItemTitle.d.ts +2 -0
- package/lib-esm/components/common/OperationItemTitle.js +33 -0
- package/lib-esm/components/common/SchemaSelection/SchemaSelection.d.ts +12 -0
- package/lib-esm/components/common/SchemaSelection/SchemaSelection.js +2 -0
- package/lib-esm/components/common/SchemaSelection/index.d.ts +1 -0
- package/lib-esm/components/common/SchemaSelection/index.js +2 -0
- package/lib-esm/components/common/Select/Select.d.ts +3 -0
- package/lib-esm/components/common/Select/Select.js +2 -0
- package/lib-esm/components/common/Select/index.d.ts +2 -0
- package/lib-esm/components/common/Select/index.js +2 -0
- package/lib-esm/components/common/Select/styled.d.ts +23 -0
- package/lib-esm/components/common/Select/styled.js +111 -0
- package/lib-esm/components/common/Select/types.d.ts +20 -0
- package/lib-esm/components/common/Skeleton/LanguageListSkeleton.d.ts +4 -0
- package/lib-esm/components/common/Skeleton/LanguageListSkeleton.js +23 -0
- package/lib-esm/components/common/Skeleton/Skeleton.d.ts +5 -2
- package/lib-esm/components/common/Skeleton/Skeleton.js +7 -5
- package/lib-esm/components/common/headers.d.ts +0 -1
- package/lib-esm/components/common/headers.js +2 -6
- package/lib-esm/components/common/index.d.ts +5 -7
- package/lib-esm/components/common/index.js +1 -1
- package/lib-esm/components/common/linkify.d.ts +4 -3
- package/lib-esm/components/common/linkify.js +13 -4
- package/lib-esm/components/common/panels.d.ts +5 -1
- package/lib-esm/components/common/panels.js +65 -44
- package/lib-esm/components/common/schema.d.ts +4 -3
- package/lib-esm/components/common/schema.js +25 -19
- package/lib-esm/components/common/styled.d.ts +4 -0
- package/lib-esm/components/common/styled.js +27 -0
- package/lib-esm/components/index.d.ts +5 -13
- package/lib-esm/components/index.js +1 -1
- package/lib-esm/components/pluggable/RedocExample.d.ts +2 -2
- package/lib-esm/components/pluggable/RedocExample.js +1 -1
- package/lib-esm/components/pluggable/RedocSchema.d.ts +2 -2
- package/lib-esm/components/pluggable/RedocSchema.js +1 -1
- package/lib-esm/components/pluggable/index.d.ts +0 -3
- package/lib-esm/components/pluggable/index.js +1 -1
- package/lib-esm/components/pluggable/styled.components.d.ts +1 -0
- package/lib-esm/components/pluggable/styled.components.js +1 -1
- package/lib-esm/constants.d.ts +5 -3
- package/lib-esm/constants.js +1 -1
- package/lib-esm/events/codeSampleCopy.js +1 -1
- package/lib-esm/events/index.d.ts +0 -1
- package/lib-esm/events/index.js +1 -1
- package/lib-esm/events/types.d.ts +1 -8
- package/lib-esm/events/types.js +1 -1
- package/lib-esm/hoc/types.d.ts +3 -10
- package/lib-esm/hoc/utils.d.ts +2 -2
- package/lib-esm/hoc/withRouter.d.ts +2 -2
- package/lib-esm/hoc/withRouter.js +1 -1
- package/lib-esm/hoc/withStore.d.ts +2 -2
- package/lib-esm/hoc/withStore.js +1 -1
- package/lib-esm/hooks/index.d.ts +2 -0
- package/lib-esm/hooks/index.js +1 -1
- package/lib-esm/hooks/useActiveWithFallback.d.ts +3 -0
- package/lib-esm/hooks/useActiveWithFallback.js +2 -0
- package/lib-esm/hooks/useContentItems.js +1 -1
- package/lib-esm/hooks/useRouter.d.ts +3 -3
- package/lib-esm/hooks/useUppercase2LowercaseRedirect.d.ts +1 -0
- package/lib-esm/hooks/useUppercase2LowercaseRedirect.js +2 -0
- package/lib-esm/icons/CSharpIcon/CSharpIcon.d.ts +4 -0
- package/lib-esm/icons/CSharpIcon/CSharpIcon.js +2 -0
- package/lib-esm/icons/CSharpIcon/index.d.ts +1 -0
- package/lib-esm/icons/CSharpIcon/index.js +2 -0
- package/lib-esm/icons/CurlIcon/CurlIcon.d.ts +4 -0
- package/lib-esm/icons/CurlIcon/CurlIcon.js +2 -0
- package/lib-esm/icons/CurlIcon/index.d.ts +1 -0
- package/lib-esm/icons/CurlIcon/index.js +2 -0
- package/lib-esm/icons/GOIcon/GOIcon.d.ts +4 -0
- package/lib-esm/icons/GOIcon/GOIcon.js +2 -0
- package/lib-esm/icons/GOIcon/index.d.ts +1 -0
- package/lib-esm/icons/GOIcon/index.js +2 -0
- package/lib-esm/icons/JavaIcon/JavaIcon.d.ts +4 -0
- package/lib-esm/icons/JavaIcon/JavaIcon.js +2 -0
- package/lib-esm/icons/JavaIcon/index.d.ts +1 -0
- package/lib-esm/icons/JavaIcon/index.js +2 -0
- package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.d.ts +4 -0
- package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.js +2 -0
- package/lib-esm/icons/JavaScriptIcon/index.d.ts +1 -0
- package/lib-esm/icons/JavaScriptIcon/index.js +2 -0
- package/lib-esm/icons/NodeJSIcon/NodeJSIcon.d.ts +4 -0
- package/lib-esm/icons/NodeJSIcon/NodeJSIcon.js +2 -0
- package/lib-esm/icons/NodeJSIcon/index.d.ts +1 -0
- package/lib-esm/icons/NodeJSIcon/index.js +2 -0
- package/lib-esm/icons/PHPIcon/PHPIcon.d.ts +4 -0
- package/lib-esm/icons/PHPIcon/PHPIcon.js +2 -0
- package/lib-esm/icons/PHPIcon/index.d.ts +1 -0
- package/lib-esm/icons/PHPIcon/index.js +2 -0
- package/lib-esm/icons/PayloadIcon/PayloadIcon.d.ts +4 -0
- package/lib-esm/icons/PayloadIcon/PayloadIcon.js +2 -0
- package/lib-esm/icons/PayloadIcon/index.d.ts +1 -0
- package/lib-esm/icons/PayloadIcon/index.js +2 -0
- package/lib-esm/icons/PythonIcon/PythonIcon.d.ts +4 -0
- package/lib-esm/icons/PythonIcon/PythonIcon.js +2 -0
- package/lib-esm/icons/PythonIcon/index.d.ts +1 -0
- package/lib-esm/icons/PythonIcon/index.js +2 -0
- package/lib-esm/icons/RIcon/RIcon.d.ts +4 -0
- package/lib-esm/icons/RIcon/RIcon.js +2 -0
- package/lib-esm/icons/RIcon/index.d.ts +1 -0
- package/lib-esm/icons/RIcon/index.js +2 -0
- package/lib-esm/icons/RubyIcon/RubyIcon.d.ts +4 -0
- package/lib-esm/icons/RubyIcon/RubyIcon.js +2 -0
- package/lib-esm/icons/RubyIcon/index.d.ts +1 -0
- package/lib-esm/icons/RubyIcon/index.js +2 -0
- package/lib-esm/index.d.ts +7 -6
- package/lib-esm/index.js +1 -1
- package/lib-esm/jotai/app.d.ts +34 -22
- package/lib-esm/jotai/app.js +1 -1
- package/lib-esm/jotai/operation.d.ts +27 -3
- package/lib-esm/jotai/operation.js +1 -1
- package/lib-esm/jotai/replay.d.ts +3 -0
- package/lib-esm/jotai/replay.js +2 -0
- package/lib-esm/jotai/store.d.ts +5 -10
- package/lib-esm/jotai/store.js +1 -1
- package/lib-esm/models/code-sample-options.d.ts +1 -4
- package/lib-esm/models/group.d.ts +2 -2
- package/lib-esm/models/group.js +1 -1
- package/lib-esm/models/index.d.ts +0 -1
- package/lib-esm/models/index.js +1 -1
- package/lib-esm/models/mediaContent.js +1 -1
- package/lib-esm/models/mediaType.js +1 -1
- package/lib-esm/models/operation.js +1 -1
- package/lib-esm/models/response.js +1 -1
- package/lib-esm/models/schema.js +1 -1
- package/lib-esm/models/tab.d.ts +4 -0
- package/lib-esm/models/tab.js +2 -0
- package/lib-esm/models/types.d.ts +11 -14
- package/lib-esm/services/OpenAPIParser.d.ts +1 -2
- package/lib-esm/services/OpenAPIParser.js +1 -1
- package/lib-esm/services/code-samples/constants.d.ts +2 -0
- package/lib-esm/services/code-samples/constants.js +2 -0
- package/lib-esm/services/code-samples/generator.d.ts +3 -3
- package/lib-esm/services/code-samples/generator.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.d.ts +2 -1
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/index.d.ts +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/__mocks__/mock.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/index.d.ts +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.js +1 -1
- package/lib-esm/services/code-samples/types.d.ts +5 -2
- package/lib-esm/services/config-options/helpers.d.ts +3 -0
- package/lib-esm/services/config-options/helpers.js +2 -0
- package/lib-esm/services/config-options/normalizeOptions.js +2 -0
- package/lib-esm/services/config-options/types.d.ts +100 -0
- package/lib-esm/services/history/helpers.d.ts +1 -0
- package/lib-esm/services/history/helpers.js +1 -1
- package/lib-esm/services/index.d.ts +1 -5
- package/lib-esm/services/index.js +1 -1
- package/lib-esm/services/menu/builder.d.ts +1 -1
- package/lib-esm/services/menu/builder.js +1 -1
- package/lib-esm/services/menu/markdown.d.ts +1 -4
- package/lib-esm/services/menu/markdown.js +1 -1
- package/lib-esm/services/menu/operation.d.ts +2 -5
- package/lib-esm/services/menu/operation.js +1 -1
- package/lib-esm/services/menu/tags.d.ts +1 -1
- package/lib-esm/services/menu/tags.js +1 -1
- package/lib-esm/services/types.d.ts +4 -50
- package/lib-esm/services/types.js +1 -1
- package/lib-esm/services/utils.d.ts +0 -7
- package/lib-esm/services/utils.js +1 -1
- package/lib-esm/setupTests.js +1 -1
- package/lib-esm/standalone.d.ts +2 -6
- package/lib-esm/standalone.js +1 -1
- package/lib-esm/testProviders.d.ts +2 -6
- package/lib-esm/testProviders.js +1 -1
- package/lib-esm/types/index.d.ts +0 -1
- package/lib-esm/types/index.js +1 -1
- package/lib-esm/types/open-api.d.ts +10 -4
- package/lib-esm/utils/argValuesHelpers.d.ts +1 -1
- package/lib-esm/utils/argValuesHelpers.js +1 -1
- package/lib-esm/utils/cookies.d.ts +7 -0
- package/lib-esm/utils/cookies.js +2 -0
- package/lib-esm/utils/dom.d.ts +0 -1
- package/lib-esm/utils/dom.js +1 -1
- package/lib-esm/utils/environments.d.ts +4 -0
- package/lib-esm/utils/environments.js +2 -0
- package/lib-esm/utils/helpers.d.ts +0 -3
- package/lib-esm/utils/helpers.js +1 -1
- package/lib-esm/utils/index.d.ts +2 -2
- package/lib-esm/utils/index.js +1 -1
- package/lib-esm/utils/isMobile.d.ts +5 -0
- package/lib-esm/utils/isMobile.js +2 -0
- package/lib-esm/utils/loadAndBundleSpec.js +1 -1
- package/lib-esm/utils/local-storage.js +1 -1
- package/lib-esm/utils/object.d.ts +1 -0
- package/lib-esm/utils/object.js +1 -1
- package/lib-esm/utils/openapi.d.ts +2 -5
- package/lib-esm/utils/openapi.js +1 -1
- package/lib-esm/utils/path.d.ts +0 -2
- package/lib-esm/utils/path.js +1 -1
- package/lib-esm/utils/replaceVariables.d.ts +2 -0
- package/lib-esm/utils/replaceVariables.js +2 -0
- package/lib-esm/utils/saveTextBeforeHeading.d.ts +1 -1
- package/lib-esm/utils/saveTextBeforeHeading.js +1 -1
- package/lib-esm/utils/security-details.d.ts +1 -5
- package/lib-esm/utils/security-details.js +1 -1
- package/lib-esm/utils/session-storage.js +1 -1
- package/lib-esm/utils/string.d.ts +1 -0
- package/lib-esm/utils/string.js +1 -1
- package/package.json +19 -33
- package/dist/console.redocly-openapi-docs.min.js +0 -423
- package/dist/oauth2-redirect.html +0 -7
- package/dist/oauth2-redirect.js +0 -9
- package/lib/components/ApiInfo/types.d.ts +0 -9
- package/lib/components/CallbackSamples/CallbackReqSamples.d.ts +0 -7
- package/lib/components/CallbackSamples/CallbackReqSamples.js +0 -4
- package/lib/components/ContentItems/useAutoScroll.d.ts +0 -1
- package/lib/components/ContentItems/useAutoScroll.js +0 -2
- package/lib/components/DiscriminatorDropdown/DiscriminatorDropdown.d.ts +0 -11
- package/lib/components/DiscriminatorDropdown/DiscriminatorDropdown.js +0 -2
- package/lib/components/DiscriminatorDropdown/index.d.ts +0 -1
- package/lib/components/DiscriminatorDropdown/index.js +0 -2
- package/lib/components/Download/DownloadButtonWithLabel.d.ts +0 -3
- package/lib/components/Download/DownloadButtonWithLabel.js +0 -13
- package/lib/components/Download/DownloadLink.d.ts +0 -3
- package/lib/components/Download/DownloadLink.js +0 -4
- package/lib/components/DropdownOrLabel/DropdownOrLabel.d.ts +0 -7
- package/lib/components/DropdownOrLabel/DropdownOrLabel.js +0 -8
- package/lib/components/DropdownOrLabel/index.d.ts +0 -1
- package/lib/components/DropdownOrLabel/index.js +0 -2
- package/lib/components/Endpoint/Endpoint.d.ts +0 -3
- package/lib/components/Endpoint/Endpoint.js +0 -2
- package/lib/components/Endpoint/ServerList.d.ts +0 -3
- package/lib/components/Endpoint/ServerList.js +0 -2
- package/lib/components/Endpoint/Summary.d.ts +0 -3
- package/lib/components/Endpoint/Summary.js +0 -2
- package/lib/components/Endpoint/api-client.d.ts +0 -7
- package/lib/components/Endpoint/api-client.js +0 -2
- package/lib/components/Endpoint/index.d.ts +0 -2
- package/lib/components/Endpoint/index.js +0 -2
- package/lib/components/Endpoint/styled.d.ts +0 -9
- package/lib/components/Endpoint/styled.js +0 -49
- package/lib/components/Endpoint/types.d.ts +0 -21
- package/lib/components/Fields/ConstraintsView.d.ts +0 -5
- package/lib/components/Fields/ConstraintsView.js +0 -2
- package/lib/components/Fields/DescriptionEnums.d.ts +0 -4
- package/lib/components/Fields/DescriptionEnums.js +0 -5
- package/lib/components/Fields/EnumValues.d.ts +0 -3
- package/lib/components/Fields/EnumValues.js +0 -2
- package/lib/components/Fields/Examples.d.ts +0 -6
- package/lib/components/Fields/Examples.js +0 -2
- package/lib/components/Fields/Extensions.d.ts +0 -3
- package/lib/components/Fields/Extensions.js +0 -4
- package/lib/components/Fields/Field.d.ts +0 -5
- package/lib/components/Fields/Field.js +0 -2
- package/lib/components/Fields/FieldDetail.d.ts +0 -8
- package/lib/components/Fields/FieldDetail.js +0 -2
- package/lib/components/Fields/FieldDetails.d.ts +0 -3
- package/lib/components/Fields/FieldDetails.js +0 -2
- package/lib/components/Fields/SimpleEnums.d.ts +0 -4
- package/lib/components/Fields/SimpleEnums.js +0 -2
- package/lib/components/Fields/index.d.ts +0 -4
- package/lib/components/Fields/index.js +0 -2
- package/lib/components/Fields/styled.d.ts +0 -11
- package/lib/components/Fields/styled.js +0 -30
- package/lib/components/Fields/types.d.ts +0 -40
- package/lib/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +0 -10
- package/lib/components/GenericChildrenSwitcher/GenericChildrenSwitcher.js +0 -2
- package/lib/components/GenericChildrenSwitcher/index.d.ts +0 -1
- package/lib/components/GenericChildrenSwitcher/index.js +0 -2
- package/lib/components/Loading/Loading.d.ts +0 -5
- package/lib/components/Loading/Loading.js +0 -9
- package/lib/components/Loading/index.d.ts +0 -1
- package/lib/components/Loading/index.js +0 -2
- package/lib/components/Markdown/styled.d.ts +0 -4
- package/lib/components/Markdown/styled.js +0 -2
- package/lib/components/NextSectionButton/NextSectionButton.d.ts +0 -9
- package/lib/components/NextSectionButton/NextSectionButton.js +0 -2
- package/lib/components/NextSectionButton/index.d.ts +0 -1
- package/lib/components/NextSectionButton/index.js +0 -2
- package/lib/components/OperationParameters/OperationParameters.d.ts +0 -3
- package/lib/components/OperationParameters/OperationParameters.js +0 -2
- package/lib/components/OperationParameters/index.d.ts +0 -1
- package/lib/components/OperationParameters/index.js +0 -2
- package/lib/components/OperationParameters/types.d.ts +0 -13
- package/lib/components/OperationParameters/types.js +0 -2
- package/lib/components/OperationParameters/utils.d.ts +0 -8
- package/lib/components/OperationParameters/utils.js +0 -2
- package/lib/components/Panel/Accordion.d.ts +0 -5
- package/lib/components/Panel/Accordion.js +0 -2
- package/lib/components/Panel/CodeHeader.d.ts +0 -2
- package/lib/components/Panel/CodeHeader.js +0 -15
- package/lib/components/Panel/CodePanel.d.ts +0 -4
- package/lib/components/Panel/CodePanel.js +0 -2
- package/lib/components/Panel/MiddlePanelWrapper.d.ts +0 -1
- package/lib/components/Panel/MiddlePanelWrapper.js +0 -22
- package/lib/components/Parameters/BodyContent.d.ts +0 -9
- package/lib/components/Parameters/BodyContent.js +0 -4
- package/lib/components/Parameters/DropdownWithinHeader.d.ts +0 -5
- package/lib/components/Parameters/DropdownWithinHeader.js +0 -7
- package/lib/components/Parameters/Parameters.d.ts +0 -7
- package/lib/components/Parameters/Parameters.js +0 -2
- package/lib/components/Parameters/ParametersGroup.d.ts +0 -9
- package/lib/components/Parameters/ParametersGroup.js +0 -16
- package/lib/components/Parameters/index.d.ts +0 -2
- package/lib/components/Parameters/index.js +0 -2
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.d.ts +0 -3
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.js +0 -2
- package/lib/components/Responses/Response.d.ts +0 -3
- package/lib/components/Responses/Response.js +0 -2
- package/lib/components/Responses/ResponseSummary.d.ts +0 -3
- package/lib/components/Responses/ResponseSummary.js +0 -15
- package/lib/components/Responses/ResponsesList.d.ts +0 -3
- package/lib/components/Responses/ResponsesList.js +0 -2
- package/lib/components/Samples/LoadingWrapper.d.ts +0 -1
- package/lib/components/Samples/LoadingWrapper.js +0 -8
- package/lib/components/Samples/SamplesTabs.d.ts +0 -14
- package/lib/components/Samples/SamplesTabs.js +0 -2
- package/lib/components/Search/MenuItemSearch.d.ts +0 -3
- package/lib/components/Search/MenuItemSearch.js +0 -2
- package/lib/components/Search/Search.d.ts +0 -3
- package/lib/components/Search/Search.js +0 -2
- package/lib/components/Search/SearchBox.d.ts +0 -3
- package/lib/components/Search/SearchBox.js +0 -2
- package/lib/components/Search/SearchField.d.ts +0 -10
- package/lib/components/Search/SearchField.js +0 -2
- package/lib/components/Search/index.d.ts +0 -3
- package/lib/components/Search/index.js +0 -2
- package/lib/components/Search/styled.d.ts +0 -24
- package/lib/components/Search/styled.js +0 -145
- package/lib/components/Search/types.d.ts +0 -42
- package/lib/components/Search/utils.d.ts +0 -11
- package/lib/components/Search/utils.js +0 -2
- package/lib/components/SecurityRequirement/PanelDescription.d.ts +0 -3
- package/lib/components/SecurityRequirement/PanelDescription.js +0 -4
- package/lib/components/SecurityRequirement/RequiredScopesRow.d.ts +0 -4
- package/lib/components/SecurityRequirement/RequiredScopesRow.js +0 -2
- package/lib/components/SecurityRequirement/RequirementElement.d.ts +0 -3
- package/lib/components/SecurityRequirement/RequirementElement.js +0 -24
- package/lib/components/SecurityRequirement/SecurityDefs.d.ts +0 -2
- package/lib/components/SecurityRequirement/SecurityDefs.js +0 -4
- package/lib/components/SecurityRequirement/SecurityRequirement.d.ts +0 -3
- package/lib/components/SecurityRequirement/SecurityRequirement.js +0 -24
- package/lib/components/SecurityRequirement/constants.d.ts +0 -6
- package/lib/components/SecurityRequirement/constants.js +0 -2
- package/lib/components/SecurityRequirement/index.d.ts +0 -3
- package/lib/components/SecurityRequirement/index.js +0 -2
- package/lib/components/SecurityRequirement/styled.d.ts +0 -1
- package/lib/components/SecurityRequirement/styled.js +0 -4
- package/lib/components/SecurityRequirement/types.d.ts +0 -19
- package/lib/components/SecurityRequirement/useSecurityRequirements.d.ts +0 -3
- package/lib/components/SecurityRequirement/useSecurityRequirements.js +0 -2
- package/lib/components/SecuritySchemes/OAuthFlow.d.ts +0 -3
- package/lib/components/SecuritySchemes/OAuthFlow.js +0 -2
- package/lib/components/SecuritySchemes/helpers.d.ts +0 -34
- package/lib/components/SecuritySchemes/helpers.js +0 -2
- package/lib/components/SecuritySchemes/index.d.ts +0 -2
- package/lib/components/SecuritySchemes/index.js +0 -2
- package/lib/components/SecuritySchemes/types.d.ts +0 -5
- package/lib/components/SecuritySchemes/types.js +0 -2
- package/lib/components/SeeMore/SeeMore.d.ts +0 -7
- package/lib/components/SeeMore/SeeMore.js +0 -10
- package/lib/components/SeeMore/index.d.ts +0 -1
- package/lib/components/SeeMore/index.js +0 -2
- package/lib/components/SideMenu/Actions.d.ts +0 -2
- package/lib/components/SideMenu/Actions.js +0 -5
- package/lib/components/SideMenu/MenuItem.d.ts +0 -13
- package/lib/components/SideMenu/MenuItem.js +0 -2
- package/lib/components/SideMenu/MenuItemEternalLink.d.ts +0 -5
- package/lib/components/SideMenu/MenuItemEternalLink.js +0 -2
- package/lib/components/SideMenu/MenuItemLink.d.ts +0 -3
- package/lib/components/SideMenu/MenuItemLink.js +0 -2
- package/lib/components/SideMenu/MenuItems.d.ts +0 -3
- package/lib/components/SideMenu/MenuItems.js +0 -2
- package/lib/components/SideMenu/MenuOperationItemContent.d.ts +0 -9
- package/lib/components/SideMenu/MenuOperationItemContent.js +0 -8
- package/lib/components/SideMenu/hooks/index.d.ts +0 -2
- package/lib/components/SideMenu/hooks/index.js +0 -2
- package/lib/components/SideMenu/hooks/useMenuItemExpanded.d.ts +0 -3
- package/lib/components/SideMenu/hooks/useMenuItemExpanded.js +0 -2
- package/lib/components/SideMenu/styled.d.ts +0 -29
- package/lib/components/SideMenu/styled.js +0 -97
- package/lib/components/SourceCodeWithFile/SourceCodeWithFile.d.ts +0 -3
- package/lib/components/SourceCodeWithFile/SourceCodeWithFile.js +0 -2
- package/lib/components/SourceCodeWithFile/index.d.ts +0 -1
- package/lib/components/SourceCodeWithFile/index.js +0 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTab.d.ts +0 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTab.js +0 -11
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabList.d.ts +0 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabList.js +0 -12
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +0 -3
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabs.js +0 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +0 -19
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabsBase.js +0 -2
- package/lib/components/Tabs/CollapsingTabs/index.d.ts +0 -4
- package/lib/components/Tabs/CollapsingTabs/index.js +0 -2
- package/lib/components/Tabs/Tab.d.ts +0 -2
- package/lib/components/Tabs/Tab.js +0 -28
- package/lib/components/Tabs/TabList.d.ts +0 -2
- package/lib/components/Tabs/TabList.js +0 -7
- package/lib/components/Tabs/TabPanel.d.ts +0 -2
- package/lib/components/Tabs/TabPanel.js +0 -11
- package/lib/components/TagItems/TagItems.d.ts +0 -14
- package/lib/components/TagItems/TagItems.js +0 -2
- package/lib/components/TagItems/index.d.ts +0 -1
- package/lib/components/TagItems/index.js +0 -2
- package/lib/components/VersionSwitcher.d.ts +0 -9
- package/lib/components/VersionSwitcher.js +0 -7
- package/lib/components/common/Checkbox.d.ts +0 -10
- package/lib/components/common/Checkbox.js +0 -31
- package/lib/components/common/CheckboxList.d.ts +0 -14
- package/lib/components/common/CheckboxList.js +0 -8
- package/lib/components/common/Dropdown/styled.d.ts +0 -28
- package/lib/components/common/Dropdown/styled.js +0 -133
- package/lib/components/common/Dropdown/types.d.ts +0 -25
- package/lib/components/common/Dropdown/types.js +0 -2
- package/lib/components/common/FileUpload/FileUpload.d.ts +0 -9
- package/lib/components/common/FileUpload/FileUpload.js +0 -2
- package/lib/components/common/FileUpload/helper.d.ts +0 -11
- package/lib/components/common/FileUpload/helper.js +0 -2
- package/lib/components/common/FileUpload/index.d.ts +0 -1
- package/lib/components/common/FileUpload/index.js +0 -2
- package/lib/components/common/LinearProgress.d.ts +0 -2
- package/lib/components/common/LinearProgress.js +0 -104
- package/lib/components/common/Portal/Portal.d.ts +0 -7
- package/lib/components/common/Portal/Portal.js +0 -2
- package/lib/components/common/Portal/index.d.ts +0 -1
- package/lib/components/common/Portal/index.js +0 -2
- package/lib/components/common/TextField.d.ts +0 -35
- package/lib/components/common/TextField.js +0 -50
- package/lib/components/common/form.d.ts +0 -17
- package/lib/components/common/form.js +0 -64
- package/lib/components/common/perfect-scrollbar.d.ts +0 -18
- package/lib/components/common/perfect-scrollbar.js +0 -4
- package/lib/components/common/shelfs.d.ts +0 -3
- package/lib/components/common/shelfs.js +0 -23
- package/lib/components/icons/CrossIcon.d.ts +0 -5
- package/lib/components/icons/CrossIcon.js +0 -11
- package/lib/components/icons/FileIcon.d.ts +0 -5
- package/lib/components/icons/FileIcon.js +0 -9
- package/lib/components/icons/LinkIcon.d.ts +0 -5
- package/lib/components/icons/LinkIcon.js +0 -11
- package/lib/components/icons/LockIcon.d.ts +0 -3
- package/lib/components/icons/LockIcon.js +0 -12
- package/lib/components/icons/SearchIcon.d.ts +0 -6
- package/lib/components/icons/SearchIcon.js +0 -11
- package/lib/components/icons/ShelfIcon.d.ts +0 -3
- package/lib/components/icons/ShelfIcon.js +0 -12
- package/lib/components/icons/Spinner.d.ts +0 -3
- package/lib/components/icons/Spinner.js +0 -19
- package/lib/components/icons/index.d.ts +0 -8
- package/lib/components/icons/index.js +0 -2
- package/lib/components/icons/types.d.ts +0 -10
- package/lib/components/icons/types.js +0 -2
- package/lib/components/pluggable/PullRight.d.ts +0 -4
- package/lib/components/pluggable/PullRight.js +0 -7
- package/lib/components/pluggable/RedocRequestBody.d.ts +0 -7
- package/lib/components/pluggable/RedocRequestBody.js +0 -2
- package/lib/components/pluggable/RedocResponse.d.ts +0 -6
- package/lib/components/pluggable/RedocResponse.js +0 -2
- package/lib/components/rightPanel/ActionPanel.d.ts +0 -11
- package/lib/components/rightPanel/ActionPanel.js +0 -4
- package/lib/components/rightPanel/AuthPanel/AuthPanel.d.ts +0 -3
- package/lib/components/rightPanel/AuthPanel/AuthPanel.js +0 -2
- package/lib/components/rightPanel/AuthPanel/index.d.ts +0 -2
- package/lib/components/rightPanel/AuthPanel/index.js +0 -2
- package/lib/components/rightPanel/AuthPanel/types.d.ts +0 -11
- package/lib/components/rightPanel/AuthPanel/types.js +0 -2
- package/lib/components/rightPanel/CodemirrorInput/CodemirrorInput.d.ts +0 -4
- package/lib/components/rightPanel/CodemirrorInput/CodemirrorInput.js +0 -2
- package/lib/components/rightPanel/CodemirrorInput/helpers.d.ts +0 -6
- package/lib/components/rightPanel/CodemirrorInput/helpers.js +0 -2
- package/lib/components/rightPanel/CodemirrorInput/index.d.ts +0 -1
- package/lib/components/rightPanel/CodemirrorInput/index.js +0 -2
- package/lib/components/rightPanel/CodemirrorInput/styled.d.ts +0 -2
- package/lib/components/rightPanel/CodemirrorInput/styled.js +0 -53
- package/lib/components/rightPanel/CodemirrorInput/types.d.ts +0 -11
- package/lib/components/rightPanel/CodemirrorInput/types.js +0 -2
- package/lib/components/rightPanel/Console/Console.d.ts +0 -3
- package/lib/components/rightPanel/Console/Console.js +0 -2
- package/lib/components/rightPanel/Console/ConsoleLazy.d.ts +0 -3
- package/lib/components/rightPanel/Console/ConsoleLazy.js +0 -2
- package/lib/components/rightPanel/Console/ConsoleWrapper.d.ts +0 -9
- package/lib/components/rightPanel/Console/ConsoleWrapper.js +0 -2
- package/lib/components/rightPanel/Console/Request.d.ts +0 -3
- package/lib/components/rightPanel/Console/Request.js +0 -2
- package/lib/components/rightPanel/Console/index.d.ts +0 -1
- package/lib/components/rightPanel/Console/index.js +0 -2
- package/lib/components/rightPanel/Console/shallowCopyForTryIt.d.ts +0 -2
- package/lib/components/rightPanel/Console/shallowCopyForTryIt.js +0 -2
- package/lib/components/rightPanel/Console/types.d.ts +0 -26
- package/lib/components/rightPanel/Console/types.js +0 -2
- package/lib/components/rightPanel/ConsoleTabs/ConsoleTabs.d.ts +0 -7
- package/lib/components/rightPanel/ConsoleTabs/ConsoleTabs.js +0 -2
- package/lib/components/rightPanel/ConsoleTabs/index.d.ts +0 -2
- package/lib/components/rightPanel/ConsoleTabs/index.js +0 -2
- package/lib/components/rightPanel/ConsoleTabs/styled.d.ts +0 -5
- package/lib/components/rightPanel/ConsoleTabs/styled.js +0 -38
- package/lib/components/rightPanel/OAuth2Flow/Error.d.ts +0 -8
- package/lib/components/rightPanel/OAuth2Flow/Error.js +0 -2
- package/lib/components/rightPanel/OAuth2Flow/OAuth2Flow.d.ts +0 -3
- package/lib/components/rightPanel/OAuth2Flow/OAuth2Flow.js +0 -2
- package/lib/components/rightPanel/OAuth2Flow/index.d.ts +0 -2
- package/lib/components/rightPanel/OAuth2Flow/index.js +0 -2
- package/lib/components/rightPanel/OAuth2Flow/styled.d.ts +0 -4
- package/lib/components/rightPanel/OAuth2Flow/styled.js +0 -14
- package/lib/components/rightPanel/OAuth2Flow/types.d.ts +0 -17
- package/lib/components/rightPanel/OAuth2Flow/types.js +0 -2
- package/lib/components/rightPanel/OAuth2TokenInput.d.ts +0 -16
- package/lib/components/rightPanel/OAuth2TokenInput.js +0 -2
- package/lib/components/rightPanel/OpenIDConnect.d.ts +0 -15
- package/lib/components/rightPanel/OpenIDConnect.js +0 -2
- package/lib/components/rightPanel/ParameterArray.d.ts +0 -10
- package/lib/components/rightPanel/ParameterArray.js +0 -30
- package/lib/components/rightPanel/ParameterDropdown.d.ts +0 -8
- package/lib/components/rightPanel/ParameterDropdown.js +0 -2
- package/lib/components/rightPanel/RequestBody/Body.d.ts +0 -3
- package/lib/components/rightPanel/RequestBody/Body.js +0 -2
- package/lib/components/rightPanel/RequestBody/RequestBody.d.ts +0 -3
- package/lib/components/rightPanel/RequestBody/RequestBody.js +0 -2
- package/lib/components/rightPanel/RequestBody/index.d.ts +0 -2
- package/lib/components/rightPanel/RequestBody/index.js +0 -2
- package/lib/components/rightPanel/RequestBody/types.d.ts +0 -16
- package/lib/components/rightPanel/RequestBody/types.js +0 -2
- package/lib/components/rightPanel/RequestBodyForm.d.ts +0 -9
- package/lib/components/rightPanel/RequestBodyForm.js +0 -10
- package/lib/components/rightPanel/RequestMimeLabel.d.ts +0 -1
- package/lib/components/rightPanel/RequestMimeLabel.js +0 -5
- package/lib/components/rightPanel/ResponseBody.d.ts +0 -5
- package/lib/components/rightPanel/ResponseBody.js +0 -2
- package/lib/components/rightPanel/ResponseHeadersList.d.ts +0 -4
- package/lib/components/rightPanel/ResponseHeadersList.js +0 -10
- package/lib/components/rightPanel/ResponsePanel.d.ts +0 -10
- package/lib/components/rightPanel/ResponsePanel.js +0 -18
- package/lib/components/rightPanel/Scope.d.ts +0 -7
- package/lib/components/rightPanel/Scope.js +0 -2
- package/lib/components/rightPanel/ServerVariable.d.ts +0 -11
- package/lib/components/rightPanel/ServerVariable.js +0 -5
- package/lib/components/rightPanel/ServersDropdown/ServersDropdown.d.ts +0 -3
- package/lib/components/rightPanel/ServersDropdown/ServersDropdown.js +0 -4
- package/lib/components/rightPanel/ServersDropdown/index.d.ts +0 -1
- package/lib/components/rightPanel/ServersDropdown/index.js +0 -2
- package/lib/components/rightPanel/ServersDropdown/types.d.ts +0 -6
- package/lib/components/rightPanel/ServersDropdown/types.js +0 -2
- package/lib/components/rightPanel/TryItPanel.d.ts +0 -7
- package/lib/components/rightPanel/TryItPanel.js +0 -14
- package/lib/components/rightPanel/styled.d.ts +0 -16
- package/lib/components/rightPanel/styled.js +0 -76
- package/lib/components/rightPanel/types.d.ts +0 -10
- package/lib/components/rightPanel/types.js +0 -2
- package/lib/components/rightPanel/utils.d.ts +0 -28
- package/lib/components/rightPanel/utils.js +0 -2
- package/lib/components/shared/HttpVerb.d.ts +0 -2
- package/lib/components/shared/HttpVerb.js +0 -4
- package/lib/components/shared/MimeLabel.d.ts +0 -1
- package/lib/components/shared/MimeLabel.js +0 -12
- package/lib/components/shared/NoSampleLabel.d.ts +0 -2
- package/lib/components/shared/NoSampleLabel.js +0 -10
- package/lib/components/shared/index.d.ts +0 -3
- package/lib/components/shared/index.js +0 -2
- package/lib/events/serverSwitch.d.ts +0 -2
- package/lib/events/serverSwitch.js +0 -2
- package/lib/models/file-upload.d.ts +0 -11
- package/lib/models/file-upload.js +0 -2
- package/lib/oauth2-redirect-page/handler/helpers.d.ts +0 -6
- package/lib/oauth2-redirect-page/handler/helpers.js +0 -2
- package/lib/oauth2-redirect-page/handler/oauth2-redirect-handler.d.ts +0 -1
- package/lib/oauth2-redirect-page/handler/oauth2-redirect-handler.js +0 -2
- package/lib/oauth2-redirect-page/index.d.ts +0 -1
- package/lib/oauth2-redirect-page/index.js +0 -2
- package/lib/services/MarkerService.d.ts +0 -11
- package/lib/services/MarkerService.js +0 -2
- package/lib/services/OAuth2.d.ts +0 -43
- package/lib/services/OAuth2.js +0 -2
- package/lib/services/OpenIDConnect.d.ts +0 -38
- package/lib/services/OpenIDConnect.js +0 -2
- package/lib/services/Options/helpers.d.ts +0 -8
- package/lib/services/Options/helpers.js +0 -2
- package/lib/services/Options/normalizeOptions.js +0 -2
- package/lib/services/Options/types.d.ts +0 -279
- package/lib/services/Options/types.js +0 -2
- package/lib/services/labels/LabelsService.d.ts +0 -3
- package/lib/services/labels/LabelsService.js +0 -2
- package/lib/services/labels/index.d.ts +0 -2
- package/lib/services/labels/index.js +0 -2
- package/lib/services/labels/types.d.ts +0 -29
- package/lib/services/labels/types.js +0 -2
- package/lib/services/menu/helpers.d.ts +0 -6
- package/lib/services/menu/helpers.js +0 -2
- package/lib/services/search/DeepSearchStore.d.ts +0 -19
- package/lib/services/search/DeepSearchStore.js +0 -2
- package/lib/services/search/RemoteSearch.d.ts +0 -17
- package/lib/services/search/RemoteSearch.js +0 -2
- package/lib/services/search/SearchStore.d.ts +0 -14
- package/lib/services/search/SearchStore.js +0 -2
- package/lib/services/search/SearchWorker.worker.d.ts +0 -17
- package/lib/services/search/SearchWorker.worker.js +0 -2
- package/lib/services/search/index.d.ts +0 -4
- package/lib/services/search/index.js +0 -2
- package/lib/services/search/types.d.ts +0 -15
- package/lib/services/search/types.js +0 -2
- package/lib/services/search/useSearch.d.ts +0 -13
- package/lib/services/search/useSearch.js +0 -2
- package/lib/types/server.d.ts +0 -7
- package/lib/types/server.js +0 -2
- package/lib/utils/media-css.d.ts +0 -8
- package/lib/utils/media-css.js +0 -2
- package/lib/utils/typeGuards.d.ts +0 -5
- package/lib/utils/typeGuards.js +0 -2
- package/lib-esm/components/ApiInfo/types.d.ts +0 -9
- package/lib-esm/components/CallbackSamples/CallbackReqSamples.d.ts +0 -7
- package/lib-esm/components/CallbackSamples/CallbackReqSamples.js +0 -4
- package/lib-esm/components/ContentItems/useAutoScroll.d.ts +0 -1
- package/lib-esm/components/ContentItems/useAutoScroll.js +0 -2
- package/lib-esm/components/DiscriminatorDropdown/DiscriminatorDropdown.d.ts +0 -11
- package/lib-esm/components/DiscriminatorDropdown/DiscriminatorDropdown.js +0 -2
- package/lib-esm/components/DiscriminatorDropdown/index.d.ts +0 -1
- package/lib-esm/components/DiscriminatorDropdown/index.js +0 -2
- package/lib-esm/components/Download/DownloadButtonWithLabel.d.ts +0 -3
- package/lib-esm/components/Download/DownloadButtonWithLabel.js +0 -13
- package/lib-esm/components/Download/DownloadLink.d.ts +0 -3
- package/lib-esm/components/Download/DownloadLink.js +0 -4
- package/lib-esm/components/DropdownOrLabel/DropdownOrLabel.d.ts +0 -7
- package/lib-esm/components/DropdownOrLabel/DropdownOrLabel.js +0 -8
- package/lib-esm/components/DropdownOrLabel/index.d.ts +0 -1
- package/lib-esm/components/DropdownOrLabel/index.js +0 -2
- package/lib-esm/components/Endpoint/Endpoint.d.ts +0 -3
- package/lib-esm/components/Endpoint/Endpoint.js +0 -2
- package/lib-esm/components/Endpoint/ServerList.d.ts +0 -3
- package/lib-esm/components/Endpoint/ServerList.js +0 -2
- package/lib-esm/components/Endpoint/Summary.d.ts +0 -3
- package/lib-esm/components/Endpoint/Summary.js +0 -2
- package/lib-esm/components/Endpoint/api-client.d.ts +0 -7
- package/lib-esm/components/Endpoint/api-client.js +0 -2
- package/lib-esm/components/Endpoint/index.d.ts +0 -2
- package/lib-esm/components/Endpoint/index.js +0 -2
- package/lib-esm/components/Endpoint/styled.d.ts +0 -9
- package/lib-esm/components/Endpoint/styled.js +0 -49
- package/lib-esm/components/Endpoint/types.d.ts +0 -21
- package/lib-esm/components/Fields/ConstraintsView.d.ts +0 -5
- package/lib-esm/components/Fields/ConstraintsView.js +0 -2
- package/lib-esm/components/Fields/DescriptionEnums.d.ts +0 -4
- package/lib-esm/components/Fields/DescriptionEnums.js +0 -5
- package/lib-esm/components/Fields/EnumValues.d.ts +0 -3
- package/lib-esm/components/Fields/EnumValues.js +0 -2
- package/lib-esm/components/Fields/Examples.d.ts +0 -6
- package/lib-esm/components/Fields/Examples.js +0 -2
- package/lib-esm/components/Fields/Extensions.d.ts +0 -3
- package/lib-esm/components/Fields/Extensions.js +0 -4
- package/lib-esm/components/Fields/Field.d.ts +0 -5
- package/lib-esm/components/Fields/Field.js +0 -2
- package/lib-esm/components/Fields/FieldDetail.d.ts +0 -8
- package/lib-esm/components/Fields/FieldDetail.js +0 -2
- package/lib-esm/components/Fields/FieldDetails.d.ts +0 -3
- package/lib-esm/components/Fields/FieldDetails.js +0 -2
- package/lib-esm/components/Fields/SimpleEnums.d.ts +0 -4
- package/lib-esm/components/Fields/SimpleEnums.js +0 -2
- package/lib-esm/components/Fields/index.d.ts +0 -4
- package/lib-esm/components/Fields/index.js +0 -2
- package/lib-esm/components/Fields/styled.d.ts +0 -11
- package/lib-esm/components/Fields/styled.js +0 -30
- package/lib-esm/components/Fields/types.d.ts +0 -40
- package/lib-esm/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +0 -10
- package/lib-esm/components/GenericChildrenSwitcher/GenericChildrenSwitcher.js +0 -2
- package/lib-esm/components/GenericChildrenSwitcher/index.d.ts +0 -1
- package/lib-esm/components/GenericChildrenSwitcher/index.js +0 -2
- package/lib-esm/components/Loading/Loading.d.ts +0 -5
- package/lib-esm/components/Loading/Loading.js +0 -9
- package/lib-esm/components/Loading/index.d.ts +0 -1
- package/lib-esm/components/Loading/index.js +0 -2
- package/lib-esm/components/Markdown/styled.d.ts +0 -4
- package/lib-esm/components/Markdown/styled.js +0 -2
- package/lib-esm/components/NextSectionButton/NextSectionButton.d.ts +0 -9
- package/lib-esm/components/NextSectionButton/NextSectionButton.js +0 -2
- package/lib-esm/components/NextSectionButton/index.d.ts +0 -1
- package/lib-esm/components/NextSectionButton/index.js +0 -2
- package/lib-esm/components/OperationParameters/OperationParameters.d.ts +0 -3
- package/lib-esm/components/OperationParameters/OperationParameters.js +0 -2
- package/lib-esm/components/OperationParameters/index.d.ts +0 -1
- package/lib-esm/components/OperationParameters/index.js +0 -2
- package/lib-esm/components/OperationParameters/types.d.ts +0 -13
- package/lib-esm/components/OperationParameters/types.js +0 -2
- package/lib-esm/components/OperationParameters/utils.d.ts +0 -8
- package/lib-esm/components/OperationParameters/utils.js +0 -2
- package/lib-esm/components/Panel/Accordion.d.ts +0 -5
- package/lib-esm/components/Panel/Accordion.js +0 -2
- package/lib-esm/components/Panel/CodeHeader.d.ts +0 -2
- package/lib-esm/components/Panel/CodeHeader.js +0 -15
- package/lib-esm/components/Panel/CodePanel.d.ts +0 -4
- package/lib-esm/components/Panel/CodePanel.js +0 -2
- package/lib-esm/components/Panel/MiddlePanelWrapper.d.ts +0 -1
- package/lib-esm/components/Panel/MiddlePanelWrapper.js +0 -22
- package/lib-esm/components/Parameters/BodyContent.d.ts +0 -9
- package/lib-esm/components/Parameters/BodyContent.js +0 -4
- package/lib-esm/components/Parameters/DropdownWithinHeader.d.ts +0 -5
- package/lib-esm/components/Parameters/DropdownWithinHeader.js +0 -7
- package/lib-esm/components/Parameters/Parameters.d.ts +0 -7
- package/lib-esm/components/Parameters/Parameters.js +0 -2
- package/lib-esm/components/Parameters/ParametersGroup.d.ts +0 -9
- package/lib-esm/components/Parameters/ParametersGroup.js +0 -16
- package/lib-esm/components/Parameters/index.d.ts +0 -2
- package/lib-esm/components/Parameters/index.js +0 -2
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.d.ts +0 -3
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.js +0 -2
- package/lib-esm/components/Responses/Response.d.ts +0 -3
- package/lib-esm/components/Responses/Response.js +0 -2
- package/lib-esm/components/Responses/ResponseSummary.d.ts +0 -3
- package/lib-esm/components/Responses/ResponseSummary.js +0 -15
- package/lib-esm/components/Responses/ResponsesList.d.ts +0 -3
- package/lib-esm/components/Responses/ResponsesList.js +0 -2
- package/lib-esm/components/Samples/LoadingWrapper.d.ts +0 -1
- package/lib-esm/components/Samples/LoadingWrapper.js +0 -8
- package/lib-esm/components/Samples/SamplesTabs.d.ts +0 -14
- package/lib-esm/components/Samples/SamplesTabs.js +0 -2
- package/lib-esm/components/Search/MenuItemSearch.d.ts +0 -3
- package/lib-esm/components/Search/MenuItemSearch.js +0 -2
- package/lib-esm/components/Search/Search.d.ts +0 -3
- package/lib-esm/components/Search/Search.js +0 -2
- package/lib-esm/components/Search/SearchBox.d.ts +0 -3
- package/lib-esm/components/Search/SearchBox.js +0 -2
- package/lib-esm/components/Search/SearchField.d.ts +0 -10
- package/lib-esm/components/Search/SearchField.js +0 -2
- package/lib-esm/components/Search/index.d.ts +0 -3
- package/lib-esm/components/Search/index.js +0 -2
- package/lib-esm/components/Search/styled.d.ts +0 -24
- package/lib-esm/components/Search/styled.js +0 -145
- package/lib-esm/components/Search/types.d.ts +0 -42
- package/lib-esm/components/Search/utils.d.ts +0 -11
- package/lib-esm/components/Search/utils.js +0 -2
- package/lib-esm/components/SecurityRequirement/PanelDescription.d.ts +0 -3
- package/lib-esm/components/SecurityRequirement/PanelDescription.js +0 -4
- package/lib-esm/components/SecurityRequirement/RequiredScopesRow.d.ts +0 -4
- package/lib-esm/components/SecurityRequirement/RequiredScopesRow.js +0 -2
- package/lib-esm/components/SecurityRequirement/RequirementElement.d.ts +0 -3
- package/lib-esm/components/SecurityRequirement/RequirementElement.js +0 -24
- package/lib-esm/components/SecurityRequirement/SecurityDefs.d.ts +0 -2
- package/lib-esm/components/SecurityRequirement/SecurityDefs.js +0 -4
- package/lib-esm/components/SecurityRequirement/SecurityRequirement.d.ts +0 -3
- package/lib-esm/components/SecurityRequirement/SecurityRequirement.js +0 -24
- package/lib-esm/components/SecurityRequirement/constants.d.ts +0 -6
- package/lib-esm/components/SecurityRequirement/constants.js +0 -2
- package/lib-esm/components/SecurityRequirement/index.d.ts +0 -3
- package/lib-esm/components/SecurityRequirement/index.js +0 -2
- package/lib-esm/components/SecurityRequirement/styled.d.ts +0 -1
- package/lib-esm/components/SecurityRequirement/styled.js +0 -4
- package/lib-esm/components/SecurityRequirement/types.d.ts +0 -19
- package/lib-esm/components/SecurityRequirement/useSecurityRequirements.d.ts +0 -3
- package/lib-esm/components/SecurityRequirement/useSecurityRequirements.js +0 -2
- package/lib-esm/components/SecuritySchemes/OAuthFlow.d.ts +0 -3
- package/lib-esm/components/SecuritySchemes/OAuthFlow.js +0 -2
- package/lib-esm/components/SecuritySchemes/helpers.d.ts +0 -34
- package/lib-esm/components/SecuritySchemes/helpers.js +0 -2
- package/lib-esm/components/SecuritySchemes/index.d.ts +0 -2
- package/lib-esm/components/SecuritySchemes/index.js +0 -2
- package/lib-esm/components/SecuritySchemes/types.d.ts +0 -5
- package/lib-esm/components/SecuritySchemes/types.js +0 -2
- package/lib-esm/components/SeeMore/SeeMore.d.ts +0 -7
- package/lib-esm/components/SeeMore/SeeMore.js +0 -10
- package/lib-esm/components/SeeMore/index.d.ts +0 -1
- package/lib-esm/components/SeeMore/index.js +0 -2
- package/lib-esm/components/SideMenu/Actions.d.ts +0 -2
- package/lib-esm/components/SideMenu/Actions.js +0 -5
- package/lib-esm/components/SideMenu/MenuItem.d.ts +0 -13
- package/lib-esm/components/SideMenu/MenuItem.js +0 -2
- package/lib-esm/components/SideMenu/MenuItemEternalLink.d.ts +0 -5
- package/lib-esm/components/SideMenu/MenuItemEternalLink.js +0 -2
- package/lib-esm/components/SideMenu/MenuItemLink.d.ts +0 -3
- package/lib-esm/components/SideMenu/MenuItemLink.js +0 -2
- package/lib-esm/components/SideMenu/MenuItems.d.ts +0 -3
- package/lib-esm/components/SideMenu/MenuItems.js +0 -2
- package/lib-esm/components/SideMenu/MenuOperationItemContent.d.ts +0 -9
- package/lib-esm/components/SideMenu/MenuOperationItemContent.js +0 -8
- package/lib-esm/components/SideMenu/hooks/index.d.ts +0 -2
- package/lib-esm/components/SideMenu/hooks/index.js +0 -2
- package/lib-esm/components/SideMenu/hooks/useMenuItemExpanded.d.ts +0 -3
- package/lib-esm/components/SideMenu/hooks/useMenuItemExpanded.js +0 -2
- package/lib-esm/components/SideMenu/styled.d.ts +0 -29
- package/lib-esm/components/SideMenu/styled.js +0 -97
- package/lib-esm/components/SourceCodeWithFile/SourceCodeWithFile.d.ts +0 -3
- package/lib-esm/components/SourceCodeWithFile/SourceCodeWithFile.js +0 -2
- package/lib-esm/components/SourceCodeWithFile/index.d.ts +0 -1
- package/lib-esm/components/SourceCodeWithFile/index.js +0 -2
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTab.d.ts +0 -2
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTab.js +0 -11
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabList.d.ts +0 -2
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabList.js +0 -12
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +0 -3
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabs.js +0 -2
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +0 -19
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabsBase.js +0 -2
- package/lib-esm/components/Tabs/CollapsingTabs/index.d.ts +0 -4
- package/lib-esm/components/Tabs/CollapsingTabs/index.js +0 -2
- package/lib-esm/components/Tabs/Tab.d.ts +0 -2
- package/lib-esm/components/Tabs/Tab.js +0 -28
- package/lib-esm/components/Tabs/TabList.d.ts +0 -2
- package/lib-esm/components/Tabs/TabList.js +0 -7
- package/lib-esm/components/Tabs/TabPanel.d.ts +0 -2
- package/lib-esm/components/Tabs/TabPanel.js +0 -11
- package/lib-esm/components/TagItems/TagItems.d.ts +0 -14
- package/lib-esm/components/TagItems/TagItems.js +0 -2
- package/lib-esm/components/TagItems/index.d.ts +0 -1
- package/lib-esm/components/TagItems/index.js +0 -2
- package/lib-esm/components/VersionSwitcher.d.ts +0 -9
- package/lib-esm/components/VersionSwitcher.js +0 -7
- package/lib-esm/components/common/Checkbox.d.ts +0 -10
- package/lib-esm/components/common/Checkbox.js +0 -31
- package/lib-esm/components/common/CheckboxList.d.ts +0 -14
- package/lib-esm/components/common/CheckboxList.js +0 -8
- package/lib-esm/components/common/Dropdown/styled.d.ts +0 -28
- package/lib-esm/components/common/Dropdown/styled.js +0 -133
- package/lib-esm/components/common/Dropdown/types.d.ts +0 -25
- package/lib-esm/components/common/Dropdown/types.js +0 -2
- package/lib-esm/components/common/FileUpload/FileUpload.d.ts +0 -9
- package/lib-esm/components/common/FileUpload/FileUpload.js +0 -2
- package/lib-esm/components/common/FileUpload/helper.d.ts +0 -11
- package/lib-esm/components/common/FileUpload/helper.js +0 -2
- package/lib-esm/components/common/FileUpload/index.d.ts +0 -1
- package/lib-esm/components/common/FileUpload/index.js +0 -2
- package/lib-esm/components/common/LinearProgress.d.ts +0 -2
- package/lib-esm/components/common/LinearProgress.js +0 -104
- package/lib-esm/components/common/Portal/Portal.d.ts +0 -7
- package/lib-esm/components/common/Portal/Portal.js +0 -2
- package/lib-esm/components/common/Portal/index.d.ts +0 -1
- package/lib-esm/components/common/Portal/index.js +0 -2
- package/lib-esm/components/common/TextField.d.ts +0 -35
- package/lib-esm/components/common/TextField.js +0 -79
- package/lib-esm/components/common/form.d.ts +0 -17
- package/lib-esm/components/common/form.js +0 -64
- package/lib-esm/components/common/perfect-scrollbar.d.ts +0 -18
- package/lib-esm/components/common/perfect-scrollbar.js +0 -4
- package/lib-esm/components/common/shelfs.d.ts +0 -3
- package/lib-esm/components/common/shelfs.js +0 -23
- package/lib-esm/components/icons/CrossIcon.d.ts +0 -5
- package/lib-esm/components/icons/CrossIcon.js +0 -11
- package/lib-esm/components/icons/FileIcon.d.ts +0 -5
- package/lib-esm/components/icons/FileIcon.js +0 -9
- package/lib-esm/components/icons/LinkIcon.d.ts +0 -5
- package/lib-esm/components/icons/LinkIcon.js +0 -11
- package/lib-esm/components/icons/LockIcon.d.ts +0 -3
- package/lib-esm/components/icons/LockIcon.js +0 -12
- package/lib-esm/components/icons/SearchIcon.d.ts +0 -6
- package/lib-esm/components/icons/SearchIcon.js +0 -11
- package/lib-esm/components/icons/ShelfIcon.d.ts +0 -3
- package/lib-esm/components/icons/ShelfIcon.js +0 -12
- package/lib-esm/components/icons/Spinner.d.ts +0 -3
- package/lib-esm/components/icons/Spinner.js +0 -19
- package/lib-esm/components/icons/index.d.ts +0 -8
- package/lib-esm/components/icons/index.js +0 -2
- package/lib-esm/components/icons/types.d.ts +0 -10
- package/lib-esm/components/icons/types.js +0 -2
- package/lib-esm/components/pluggable/PullRight.d.ts +0 -4
- package/lib-esm/components/pluggable/PullRight.js +0 -7
- package/lib-esm/components/pluggable/RedocRequestBody.d.ts +0 -7
- package/lib-esm/components/pluggable/RedocRequestBody.js +0 -2
- package/lib-esm/components/pluggable/RedocResponse.d.ts +0 -6
- package/lib-esm/components/pluggable/RedocResponse.js +0 -2
- package/lib-esm/components/rightPanel/ActionPanel.d.ts +0 -11
- package/lib-esm/components/rightPanel/ActionPanel.js +0 -4
- package/lib-esm/components/rightPanel/AuthPanel/AuthPanel.d.ts +0 -3
- package/lib-esm/components/rightPanel/AuthPanel/AuthPanel.js +0 -2
- package/lib-esm/components/rightPanel/AuthPanel/index.d.ts +0 -2
- package/lib-esm/components/rightPanel/AuthPanel/index.js +0 -2
- package/lib-esm/components/rightPanel/AuthPanel/types.d.ts +0 -11
- package/lib-esm/components/rightPanel/AuthPanel/types.js +0 -2
- package/lib-esm/components/rightPanel/CodemirrorInput/CodemirrorInput.d.ts +0 -4
- package/lib-esm/components/rightPanel/CodemirrorInput/CodemirrorInput.js +0 -2
- package/lib-esm/components/rightPanel/CodemirrorInput/helpers.d.ts +0 -6
- package/lib-esm/components/rightPanel/CodemirrorInput/helpers.js +0 -2
- package/lib-esm/components/rightPanel/CodemirrorInput/index.d.ts +0 -1
- package/lib-esm/components/rightPanel/CodemirrorInput/index.js +0 -2
- package/lib-esm/components/rightPanel/CodemirrorInput/styled.d.ts +0 -2
- package/lib-esm/components/rightPanel/CodemirrorInput/styled.js +0 -53
- package/lib-esm/components/rightPanel/CodemirrorInput/types.d.ts +0 -11
- package/lib-esm/components/rightPanel/CodemirrorInput/types.js +0 -2
- package/lib-esm/components/rightPanel/Console/Console.d.ts +0 -3
- package/lib-esm/components/rightPanel/Console/Console.js +0 -2
- package/lib-esm/components/rightPanel/Console/ConsoleLazy.d.ts +0 -3
- package/lib-esm/components/rightPanel/Console/ConsoleLazy.js +0 -2
- package/lib-esm/components/rightPanel/Console/ConsoleWrapper.d.ts +0 -9
- package/lib-esm/components/rightPanel/Console/ConsoleWrapper.js +0 -2
- package/lib-esm/components/rightPanel/Console/Request.d.ts +0 -3
- package/lib-esm/components/rightPanel/Console/Request.js +0 -2
- package/lib-esm/components/rightPanel/Console/index.d.ts +0 -1
- package/lib-esm/components/rightPanel/Console/index.js +0 -2
- package/lib-esm/components/rightPanel/Console/shallowCopyForTryIt.d.ts +0 -2
- package/lib-esm/components/rightPanel/Console/shallowCopyForTryIt.js +0 -2
- package/lib-esm/components/rightPanel/Console/types.d.ts +0 -26
- package/lib-esm/components/rightPanel/Console/types.js +0 -2
- package/lib-esm/components/rightPanel/ConsoleTabs/ConsoleTabs.d.ts +0 -7
- package/lib-esm/components/rightPanel/ConsoleTabs/ConsoleTabs.js +0 -2
- package/lib-esm/components/rightPanel/ConsoleTabs/index.d.ts +0 -2
- package/lib-esm/components/rightPanel/ConsoleTabs/index.js +0 -2
- package/lib-esm/components/rightPanel/ConsoleTabs/styled.d.ts +0 -5
- package/lib-esm/components/rightPanel/ConsoleTabs/styled.js +0 -38
- package/lib-esm/components/rightPanel/OAuth2Flow/Error.d.ts +0 -8
- package/lib-esm/components/rightPanel/OAuth2Flow/Error.js +0 -2
- package/lib-esm/components/rightPanel/OAuth2Flow/OAuth2Flow.d.ts +0 -3
- package/lib-esm/components/rightPanel/OAuth2Flow/OAuth2Flow.js +0 -2
- package/lib-esm/components/rightPanel/OAuth2Flow/index.d.ts +0 -2
- package/lib-esm/components/rightPanel/OAuth2Flow/index.js +0 -2
- package/lib-esm/components/rightPanel/OAuth2Flow/styled.d.ts +0 -4
- package/lib-esm/components/rightPanel/OAuth2Flow/styled.js +0 -14
- package/lib-esm/components/rightPanel/OAuth2Flow/types.d.ts +0 -17
- package/lib-esm/components/rightPanel/OAuth2Flow/types.js +0 -2
- package/lib-esm/components/rightPanel/OAuth2TokenInput.d.ts +0 -16
- package/lib-esm/components/rightPanel/OAuth2TokenInput.js +0 -2
- package/lib-esm/components/rightPanel/OpenIDConnect.d.ts +0 -15
- package/lib-esm/components/rightPanel/OpenIDConnect.js +0 -2
- package/lib-esm/components/rightPanel/ParameterArray.d.ts +0 -10
- package/lib-esm/components/rightPanel/ParameterArray.js +0 -30
- package/lib-esm/components/rightPanel/ParameterDropdown.d.ts +0 -8
- package/lib-esm/components/rightPanel/ParameterDropdown.js +0 -2
- package/lib-esm/components/rightPanel/RequestBody/Body.d.ts +0 -3
- package/lib-esm/components/rightPanel/RequestBody/Body.js +0 -2
- package/lib-esm/components/rightPanel/RequestBody/RequestBody.d.ts +0 -3
- package/lib-esm/components/rightPanel/RequestBody/RequestBody.js +0 -2
- package/lib-esm/components/rightPanel/RequestBody/index.d.ts +0 -2
- package/lib-esm/components/rightPanel/RequestBody/index.js +0 -2
- package/lib-esm/components/rightPanel/RequestBody/types.d.ts +0 -16
- package/lib-esm/components/rightPanel/RequestBody/types.js +0 -2
- package/lib-esm/components/rightPanel/RequestBodyForm.d.ts +0 -9
- package/lib-esm/components/rightPanel/RequestBodyForm.js +0 -10
- package/lib-esm/components/rightPanel/RequestMimeLabel.d.ts +0 -1
- package/lib-esm/components/rightPanel/RequestMimeLabel.js +0 -5
- package/lib-esm/components/rightPanel/ResponseBody.d.ts +0 -5
- package/lib-esm/components/rightPanel/ResponseBody.js +0 -2
- package/lib-esm/components/rightPanel/ResponseHeadersList.d.ts +0 -4
- package/lib-esm/components/rightPanel/ResponseHeadersList.js +0 -10
- package/lib-esm/components/rightPanel/ResponsePanel.d.ts +0 -10
- package/lib-esm/components/rightPanel/ResponsePanel.js +0 -18
- package/lib-esm/components/rightPanel/Scope.d.ts +0 -7
- package/lib-esm/components/rightPanel/Scope.js +0 -2
- package/lib-esm/components/rightPanel/ServerVariable.d.ts +0 -11
- package/lib-esm/components/rightPanel/ServerVariable.js +0 -5
- package/lib-esm/components/rightPanel/ServersDropdown/ServersDropdown.d.ts +0 -3
- package/lib-esm/components/rightPanel/ServersDropdown/ServersDropdown.js +0 -4
- package/lib-esm/components/rightPanel/ServersDropdown/index.d.ts +0 -1
- package/lib-esm/components/rightPanel/ServersDropdown/index.js +0 -2
- package/lib-esm/components/rightPanel/ServersDropdown/types.d.ts +0 -6
- package/lib-esm/components/rightPanel/ServersDropdown/types.js +0 -2
- package/lib-esm/components/rightPanel/TryItPanel.d.ts +0 -7
- package/lib-esm/components/rightPanel/TryItPanel.js +0 -14
- package/lib-esm/components/rightPanel/styled.d.ts +0 -16
- package/lib-esm/components/rightPanel/styled.js +0 -76
- package/lib-esm/components/rightPanel/types.d.ts +0 -10
- package/lib-esm/components/rightPanel/types.js +0 -2
- package/lib-esm/components/rightPanel/utils.d.ts +0 -28
- package/lib-esm/components/rightPanel/utils.js +0 -2
- package/lib-esm/components/shared/HttpVerb.d.ts +0 -2
- package/lib-esm/components/shared/HttpVerb.js +0 -4
- package/lib-esm/components/shared/MimeLabel.d.ts +0 -1
- package/lib-esm/components/shared/MimeLabel.js +0 -12
- package/lib-esm/components/shared/NoSampleLabel.d.ts +0 -2
- package/lib-esm/components/shared/NoSampleLabel.js +0 -10
- package/lib-esm/components/shared/index.d.ts +0 -3
- package/lib-esm/components/shared/index.js +0 -2
- package/lib-esm/events/serverSwitch.d.ts +0 -2
- package/lib-esm/events/serverSwitch.js +0 -2
- package/lib-esm/models/file-upload.d.ts +0 -11
- package/lib-esm/models/file-upload.js +0 -2
- package/lib-esm/oauth2-redirect-page/handler/helpers.d.ts +0 -6
- package/lib-esm/oauth2-redirect-page/handler/helpers.js +0 -2
- package/lib-esm/oauth2-redirect-page/handler/oauth2-redirect-handler.d.ts +0 -1
- package/lib-esm/oauth2-redirect-page/handler/oauth2-redirect-handler.js +0 -2
- package/lib-esm/oauth2-redirect-page/index.d.ts +0 -1
- package/lib-esm/oauth2-redirect-page/index.js +0 -2
- package/lib-esm/services/MarkerService.d.ts +0 -11
- package/lib-esm/services/MarkerService.js +0 -2
- package/lib-esm/services/OAuth2.d.ts +0 -43
- package/lib-esm/services/OAuth2.js +0 -2
- package/lib-esm/services/OpenIDConnect.d.ts +0 -38
- package/lib-esm/services/OpenIDConnect.js +0 -2
- package/lib-esm/services/Options/helpers.d.ts +0 -8
- package/lib-esm/services/Options/helpers.js +0 -2
- package/lib-esm/services/Options/normalizeOptions.js +0 -2
- package/lib-esm/services/Options/types.d.ts +0 -279
- package/lib-esm/services/Options/types.js +0 -2
- package/lib-esm/services/labels/LabelsService.d.ts +0 -3
- package/lib-esm/services/labels/LabelsService.js +0 -2
- package/lib-esm/services/labels/index.d.ts +0 -2
- package/lib-esm/services/labels/index.js +0 -2
- package/lib-esm/services/labels/types.d.ts +0 -29
- package/lib-esm/services/labels/types.js +0 -2
- package/lib-esm/services/menu/helpers.d.ts +0 -6
- package/lib-esm/services/menu/helpers.js +0 -2
- package/lib-esm/services/search/DeepSearchStore.d.ts +0 -19
- package/lib-esm/services/search/DeepSearchStore.js +0 -2
- package/lib-esm/services/search/RemoteSearch.d.ts +0 -17
- package/lib-esm/services/search/RemoteSearch.js +0 -2
- package/lib-esm/services/search/SearchStore.d.ts +0 -14
- package/lib-esm/services/search/SearchStore.js +0 -2
- package/lib-esm/services/search/SearchWorker.worker.d.ts +0 -17
- package/lib-esm/services/search/SearchWorker.worker.js +0 -2
- package/lib-esm/services/search/index.d.ts +0 -4
- package/lib-esm/services/search/index.js +0 -2
- package/lib-esm/services/search/types.d.ts +0 -15
- package/lib-esm/services/search/types.js +0 -2
- package/lib-esm/services/search/useSearch.d.ts +0 -13
- package/lib-esm/services/search/useSearch.js +0 -2
- package/lib-esm/types/server.d.ts +0 -7
- package/lib-esm/types/server.js +0 -2
- package/lib-esm/utils/media-css.d.ts +0 -8
- package/lib-esm/utils/media-css.js +0 -2
- package/lib-esm/utils/typeGuards.d.ts +0 -5
- package/lib-esm/utils/typeGuards.js +0 -2
- /package/lib/components/{ApiInfo → PropertyDetails}/types.js +0 -0
- /package/lib/components/{Endpoint → Request}/types.js +0 -0
- /package/lib/components/{Fields → ServerList}/types.js +0 -0
- /package/lib/components/{Search → common/Select}/types.js +0 -0
- /package/lib/services/{Options → config-options}/index.d.ts +0 -0
- /package/lib/services/{Options → config-options}/index.js +0 -0
- /package/lib/services/{Options → config-options}/normalizeOptions.d.ts +0 -0
- /package/lib/{components/SecurityRequirement → services/config-options}/types.js +0 -0
- /package/lib-esm/components/{ApiInfo → PropertyDetails}/types.js +0 -0
- /package/lib-esm/components/{Endpoint → Request}/types.js +0 -0
- /package/lib-esm/components/{Fields → ServerList}/types.js +0 -0
- /package/lib-esm/components/{Search → common/Select}/types.js +0 -0
- /package/lib-esm/services/{Options → config-options}/index.d.ts +0 -0
- /package/lib-esm/services/{Options → config-options}/index.js +0 -0
- /package/lib-esm/services/{Options → config-options}/normalizeOptions.d.ts +0 -0
- /package/lib-esm/{components/SecurityRequirement → services/config-options}/types.js +0 -0
package/lib/models/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Node } from '@markdoc/markdoc';
|
|
2
|
-
import type { OpenAPISecurityScheme, OpenAPIEncoding, OpenAPIMediaType, OpenAPIParameterLocation, OpenAPIParameterStyle, OpenAPIExternalDocumentation,
|
|
2
|
+
import type { OpenAPISecurityScheme, OpenAPIEncoding, OpenAPIMediaType, OpenAPIParameterLocation, OpenAPIParameterStyle, OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, OpenAPIXBadges, OpenAPISchema, Referenced, OpenAPIInfo } from '../types';
|
|
3
3
|
import type { OpenAPIParser } from '../services/OpenAPIParser';
|
|
4
|
-
import type { Options } from '../services/
|
|
4
|
+
import type { Options } from '../services/config-options';
|
|
5
5
|
import type { ExtendedOpenAPIOperation, MenuItemGroupType, MenuItemType, MergedOpenAPISchema, Unstable_ExternalCodeSample } from '../services/types';
|
|
6
6
|
export type ContentItemModel = GroupModel | OperationMenuItem;
|
|
7
7
|
export interface ExtendedOpenAPISecurityScheme extends OpenAPISecurityScheme {
|
|
@@ -40,7 +40,7 @@ export type ExampleModel = {
|
|
|
40
40
|
value: any;
|
|
41
41
|
rawValue: any;
|
|
42
42
|
externalValueUrl?: string;
|
|
43
|
-
summary?: string;
|
|
43
|
+
summary?: string | GenericObject;
|
|
44
44
|
description?: string | GenericObject;
|
|
45
45
|
mime: string;
|
|
46
46
|
encoding?: {
|
|
@@ -51,6 +51,9 @@ export type MediaTypeModel = {
|
|
|
51
51
|
examples?: {
|
|
52
52
|
[name: string]: ExampleModel;
|
|
53
53
|
};
|
|
54
|
+
formExamples?: {
|
|
55
|
+
[name: string]: ExampleModel;
|
|
56
|
+
};
|
|
54
57
|
schema?: SchemaModel;
|
|
55
58
|
name: string;
|
|
56
59
|
isRequestType: boolean;
|
|
@@ -76,7 +79,6 @@ export type MediaContentModelInput = {
|
|
|
76
79
|
};
|
|
77
80
|
};
|
|
78
81
|
export type ResponseModel = {
|
|
79
|
-
expanded: boolean;
|
|
80
82
|
content?: MediaContentModel;
|
|
81
83
|
code: string;
|
|
82
84
|
summary: string | GenericObject;
|
|
@@ -119,10 +121,6 @@ export type OperationModel = {
|
|
|
119
121
|
externalDocs?: OpenAPIExternalDocumentation;
|
|
120
122
|
items: ContentItemModel[];
|
|
121
123
|
depth: number;
|
|
122
|
-
activeExampleName?: string;
|
|
123
|
-
activeServer: Server;
|
|
124
|
-
defaultExampleName?: string | false;
|
|
125
|
-
defaultMimeType?: string;
|
|
126
124
|
pointer: string;
|
|
127
125
|
operationId?: string;
|
|
128
126
|
httpVerb: string;
|
|
@@ -138,16 +136,16 @@ export type OperationModel = {
|
|
|
138
136
|
requestBody?: RequestBodyModel;
|
|
139
137
|
payload?: {
|
|
140
138
|
lang: string;
|
|
141
|
-
label
|
|
139
|
+
label?: string;
|
|
142
140
|
source: string;
|
|
143
|
-
requestBodyContent
|
|
141
|
+
requestBodyContent?: MediaContentModel;
|
|
144
142
|
};
|
|
145
143
|
definitionSamples: OpenAPIXCodeSample[] | Unstable_ExternalCodeSample[];
|
|
144
|
+
badges: OpenAPIXBadges[];
|
|
146
145
|
hasSamples: boolean;
|
|
147
146
|
parameters: FieldModel[];
|
|
148
147
|
responses: ResponseModel[];
|
|
149
148
|
callbacks: CallbackModel[];
|
|
150
|
-
hideTryItPanel: boolean;
|
|
151
149
|
};
|
|
152
150
|
export type GroupModel = {
|
|
153
151
|
id: string;
|
|
@@ -178,11 +176,10 @@ export type OperationMenuItem = {
|
|
|
178
176
|
path: string;
|
|
179
177
|
isWebhook: boolean;
|
|
180
178
|
operationId?: string;
|
|
179
|
+
badges?: OpenAPIXBadges[];
|
|
181
180
|
};
|
|
182
181
|
export type SchemaModel = {
|
|
183
|
-
|
|
184
|
-
options: Options;
|
|
185
|
-
deps: Deps;
|
|
182
|
+
operationPointer: string;
|
|
186
183
|
schemaOrRef: Referenced<OpenAPISchema>;
|
|
187
184
|
isChild: boolean;
|
|
188
185
|
refsStack: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OpenAPIRef, OpenAPIDefinition } from '../types';
|
|
2
2
|
import type { MergedOpenAPISchema } from './types';
|
|
3
|
-
import type { Options } from './
|
|
3
|
+
import type { Options } from './config-options/types';
|
|
4
4
|
/**
|
|
5
5
|
* Loads and keeps spec. Provides raw spec operations
|
|
6
6
|
*/
|
|
@@ -10,7 +10,6 @@ export declare class OpenAPIParser {
|
|
|
10
10
|
private options;
|
|
11
11
|
definitionUrl?: string;
|
|
12
12
|
definition: OpenAPIDefinition;
|
|
13
|
-
versionPath?: string;
|
|
14
13
|
private readonly allowMergeRefs;
|
|
15
14
|
constructor(definition: OpenAPIDefinition, definitionUrl?: string, options?: Options & {
|
|
16
15
|
versionId?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __rest=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OpenAPIParser=exports.concatRefStacks=exports.pushRef=void 0;const utils_1=require("../utils"),JsonPointer_1=require("../utils/JsonPointer"),normalizeOptions_1=require("./
|
|
1
|
+
"use strict";var __rest=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OpenAPIParser=exports.concatRefStacks=exports.pushRef=void 0;const theme_1=require("@redocly/theme"),utils_1=require("../utils"),JsonPointer_1=require("../utils/JsonPointer"),normalizeOptions_1=require("./config-options/normalizeOptions");function pushRef(e,t){return t&&e[e.length-1]!==t?[...e,t]:e}function concatRefStacks(e,t){return t?e.concat(t):e}exports.pushRef=pushRef,exports.concatRefStacks=concatRefStacks;class OpenAPIParser{constructor(e,t,r=(0,normalizeOptions_1.normalizeOptions)({})){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"definitionUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowMergeRefs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"byRef",{enumerable:!0,configurable:!0,writable:!0,value:e=>{let t;if(this.definition){"#"!==e.charAt(0)&&(e="#"+e),e=decodeURIComponent(e);try{t=JsonPointer_1.JsonPointer.get(this.definition,e)}catch(e){}return t||{}}}}),this.definition=Object.assign({},e),this.validate(e),this.definition=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const i=theme_1.IS_BROWSER?window.location.href:"";"string"==typeof t&&(this.definitionUrl=new URL(t,i).href)}validate(e){if(void 0===e.openapi)throw new Error("Document must be valid OpenAPI 3.0.0 definition")}isRef(e){return!!e&&(void 0!==e.$ref&&null!==e.$ref)}deref(e,t=[],r=!1){const i=null==e?void 0:e["x-refsStack"];if(t=concatRefStacks(t,i),this.isRef(e)){const i=(0,utils_1.getDefinitionName)(e.$ref);if(i&&this.options.ignoreNamedSchemas.has(i))return{resolved:{type:"object",title:i},refsStack:t};let n=this.byRef(e.$ref);if(!n)throw new Error(`Failed to resolve $ref "${e.$ref}"`);let s=t;if(t.includes(e.$ref))n=Object.assign({},n,{"x-circular-ref":!0});else if(this.isRef(n)){const e=this.deref(n,t,r);s=e.refsStack,n=e.resolved}return s=pushRef(t,e.$ref),n=this.allowMergeRefs?this.mergeRefs(e,n,r):n,{resolved:n,refsStack:s}}return{resolved:e,refsStack:concatRefStacks(t,i)}}mergeRefs(e,t,r){const{$ref:i}=e,n=__rest(e,["$ref"]),s=Object.keys(n);if(0===s.length)return t;if(r&&s.some((e=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly"].includes(e)))){const e=n,{description:r,title:i,readOnly:s,writeOnly:o}=e;return{allOf:[{description:r,title:i,readOnly:s,writeOnly:o},t,__rest(e,["description","title","readOnly","writeOnly"])]}}return Object.assign(Object.assign({},t),n)}mergeAllOf(e,t,r,i=""){var n;if(e["x-circular-ref"])return e;if(void 0===(e=this.hoistOneOfs(e)).allOf)return Object.assign({absolutePointer:i},e);let s=Object.assign(Object.assign({},e),{"x-parentRefs":[],absolutePointer:JsonPointer_1.JsonPointer.join(i,["allOf"]),allOf:void 0,title:e.title||(0,utils_1.getDefinitionName)(t)});void 0!==s.properties&&"object"==typeof s.properties&&(s.properties=Object.assign({},s.properties)),void 0!==s.items&&"object"==typeof s.items&&(s.items=Object.assign({},s.items));const o=e.allOf.map(((e,t)=>{var n;const{resolved:o,refsStack:a}=this.deref(e,r,!0),l=e.$ref,f=l||JsonPointer_1.JsonPointer.join(i,[String(t)]),c=this.mergeAllOf(o,l,a,f);if(!c["x-circular-ref"]||!c.allOf)return l&&(null===(n=s["x-parentRefs"])||void 0===n||n.push(...c["x-parentRefs"]||[],l)),{$ref:l,refsStack:pushRef(a,l),schema:c,absolutePointer:f}})).filter((e=>void 0!==e));for(const[e,{schema:r,refsStack:i,absolutePointer:a}]of o.entries()){const{type:o,enum:l,properties:f,items:c,required:p,title:d,description:O,readOnly:u,writeOnly:y,oneOf:b,anyOf:h,"x-circular-ref":m}=r,v=__rest(r,["type","enum","properties","items","required","title","description","readOnly","writeOnly","oneOf","anyOf","x-circular-ref"]);if(s.type===o||void 0===s.type||void 0===o){if(void 0!==o&&(Array.isArray(o)&&Array.isArray(s.type)?s.type=[...o,...s.type]:s.type=o),void 0!==l&&(Array.isArray(l)&&Array.isArray(s.enum)?s.enum=Array.from(new Set([...l,...s.enum])):s.enum=l),void 0!==f&&"object"==typeof f){s.properties=s.properties||{};for(const r in f){const o=concatRefStacks(i,null===(n=f[r])||void 0===n?void 0:n["x-refsStack"]);if(s.properties[r]){if(!m){const i=this.mergeAllOf({allOf:[s.properties[r],f[r]],"x-refsStack":o},t+"/properties/"+r,o,JsonPointer_1.JsonPointer.join(a,["allOf",String(e),"properties",r]));s.properties[r]=i}}else s.properties[r]=Object.assign(Object.assign({},f[r]),{absolutePointer:JsonPointer_1.JsonPointer.join(a,["properties",r]),"x-refsStack":o})}}if(void 0!==c&&!m){const e="boolean"==typeof s.items?{}:Object.assign({},s.items),n="boolean"==typeof r.items?{}:Object.assign({},r.items);s.items=this.mergeAllOf({allOf:[e,n]},t+"/items",i)}void 0!==b&&(s.oneOf=b),void 0!==h&&(s.anyOf=h),void 0!==p&&(s.required=[...s.required||[],...p]),s=Object.assign(Object.assign(Object.assign({},s),{title:s.title||d,description:s.description||O,readOnly:void 0!==s.readOnly?s.readOnly:u,writeOnly:void 0!==s.writeOnly?s.writeOnly:y,"x-circular-ref":s["x-circular-ref"]||m}),v)}}return s}findDerived(e){const t={},r=this.definition.components&&this.definition.components.schemas||{};for(const i in r){const{resolved:n}=this.deref(r[i]);void 0!==n.allOf&&n.allOf.find((t=>void 0!==t.$ref&&e.indexOf(t.$ref)>-1))&&(t["#/components/schemas/"+i]=[n["x-discriminator-value"]||i])}return t}hoistOneOfs(e){if(void 0===e.allOf)return e;const t=e.allOf;for(let e=0;e<t.length;e++){const r=t[e];if(Array.isArray(r.oneOf)){const i=t.slice(0,e),n=t.slice(e+1);return{oneOf:r.oneOf.map((e=>({allOf:[...i,e,...n]})))}}}return e}}exports.OpenAPIParser=OpenAPIParser;
|
|
2
2
|
//# sourceMappingURL=OpenAPIParser.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Languages=void 0,exports.Languages={curl:"curl",JavaScript:"JavaScript",NodeJs:"Node.js",Python:"Python",Java:"Java",CSharp:"C#",PHP:"PHP",Go:"Go",Ruby:"Ruby",R:"R",Payload:"Payload"};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { OperationModel } from '../../models';
|
|
2
2
|
import type * as HAR from './har';
|
|
3
3
|
import type { Languages } from './types';
|
|
4
|
-
import type { ServerVariables } from '../../types';
|
|
5
4
|
export type CustomHAR = HAR.Request & {
|
|
6
5
|
securityOAuth2ExtraCalls?: HAR.Request[];
|
|
7
6
|
basicAuth?: {
|
|
@@ -11,16 +10,17 @@ export type CustomHAR = HAR.Request & {
|
|
|
11
10
|
pathParameters?: {
|
|
12
11
|
[key in string]: string;
|
|
13
12
|
};
|
|
14
|
-
serverVariables?:
|
|
13
|
+
serverVariables?: Record<string, string>;
|
|
15
14
|
allResponseCodes?: string[];
|
|
16
15
|
};
|
|
17
|
-
export declare function getCodeSample({ lang, operation, exampleName, pathParams, properties, options, }: {
|
|
16
|
+
export declare function getCodeSample({ lang, operation, exampleName, pathParams, properties, options, environment, }: {
|
|
18
17
|
lang: Languages;
|
|
19
18
|
operation: OperationModel;
|
|
20
19
|
exampleName?: string;
|
|
21
20
|
pathParams?: GenericObject;
|
|
22
21
|
properties?: GenericObject;
|
|
23
22
|
options?: GenericObject;
|
|
23
|
+
environment: Record<string, string>;
|
|
24
24
|
}): string;
|
|
25
25
|
export declare function isDefined<T>(arg?: T): arg is T;
|
|
26
26
|
export declare function capitalizeFirst(str: string): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,a,r){void 0===r&&(r=a);var s=Object.getOwnPropertyDescriptor(t,a);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,r,s)}:function(e,t,a,r){void 0===r&&(r=a),e[r]=t[a]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&__createBinding(t,e,a);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.capitalizeFirst=exports.isDefined=exports.getCodeSample=void 0;const Sampler=__importStar(require("openapi-sampler")),deepmerge_1=__importDefault(require("deepmerge")),utils_1=require("../../utils"),utils_2=require("../utils"),constants_1=require("../../constants"),labels_1=require("../labels"),httpsnippet_1=require("./httpsnippet"),string_utility_1=__importDefault(require("./httpsnippet/helpers/string-utility")),mediaContent_1=require("../../models/mediaContent");function mapOperationToHAR(e,{exampleName:t="",skipOptionalParameters:a=!1,withOAuth2Call:r=!1,spec:s,generatedPayloadSamplesMaxDepth:i=8,pathParams:n={},properties:l={}},{activeServer:o,requestValues:u}){var p,c,d,m;const{securityHeaders:h,securityCookies:f,securityQueries:_,securityOAuth2ExtraCalls:v,basicAuth:y}=getSecurityData(null===(p=e.security)||void 0===p?void 0:p[0],r),g=(null===(c=null==e?void 0:e.requestBody)||void 0===c?void 0:c.content)&&(0,mediaContent_1.getActiveMediaType)(e.requestBody.content),O={skipNonRequired:a,skipReadOnly:!0,maxSampleDepth:i},T={path:null==u?void 0:u.path,cookie:null==u?void 0:u.cookie,header:null==u?void 0:u.header,query:null==u?void 0:u.query,body:null==u?void 0:u.body};let b=!1;const S=e.parameters.filter((e=>"header"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t;return{name:e.name,value:(null===(t=T.header)||void 0===t?void 0:t[e.name])||(0,utils_1.getParameterValue)("header",e.name)||(0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,O,s))}})).map((e=>((null==g?void 0:g.name)&&"content-type"===e.name.toLowerCase()&&(b=!0,e.value=g.name),e))).concat(h);!b&&(null==g?void 0:g.name)&&S.unshift({name:"Content-Type",value:null==g?void 0:g.name});const C=e.parameters.filter((e=>"cookie"===e.in)).filter((e=>!(a&&!e.required))).map((e=>utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,O,s))))).reduce(((e,t)=>{var a;for(const[r,s]of Object.entries(t))e.push({name:r,value:String((null===(a=T.cookie)||void 0===a?void 0:a[r])||s)});return e}),[]).concat(f),D=e.parameters.filter((e=>"query"===e.in)).filter((e=>!(a&&!e.required))).map((e=>utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,O,s))))).reduce(((e,t)=>{var a,r,s;for(const[i,n]of Object.entries(t))e.push({name:i,value:(0,utils_1.isArrayOfObjects)(null===(a=T.query)||void 0===a?void 0:a[i])&&JSON.stringify((0,utils_1.deleteEmptyArrayItem)(null===(r=T.query)||void 0===r?void 0:r[i]))||String((null===(s=T.query)||void 0===s?void 0:s[i])||n)});return e}),[]).concat(_),E=`${null===(d=o||e.activeServer)||void 0===d?void 0:d.url.replace(/\/$/,"")}/${e.path.replace(/^\//,"")}`,j=e.parameters.filter((e=>"path"===e.in)).reduce(((e,t)=>{var a;const{in:r,name:s}=t;return e[s]=(null===(a=T.path)||void 0===a?void 0:a[s])||n[s]||(0,utils_1.getParameterValue)(r,s),e}),{}),P=null===(m=null==g?void 0:g.examples)||void 0===m?void 0:m[t],w=(null==g?void 0:g.examples)||{},[A]=Object.values(w),q=T.body||(null==P?void 0:P.value)||(null==A?void 0:A.value)||(null==g?void 0:g.schema)&&Sampler.sample(null==g?void 0:g.schema.rawSchema,O,s),R=null==g?void 0:g.name.toLowerCase();let k="",M=[];switch((0,utils_2.normalizeMimeType)(R)){case constants_1.MediaTypes.JSON:case constants_1.MediaTypes.XML:k=JSON.stringify(getDataRequest(q,l));break;case constants_1.MediaTypes.URL_ENCODED:case constants_1.MediaTypes.MULTIPART:k=utils_1.queryString.stringify(getDataRequest(q,l)),M=objectToHarParams(getDataRequest(q,l));break;default:k=String(q||"")}const x=k?{mimeType:(null==g?void 0:g.name)||constants_1.MediaTypes.OCTET_STREAM,text:k,params:M}:void 0,N=e.responses.map((e=>e.code));return{method:e.httpVerb,url:E,httpVersion:"HTTP/1.1",cookies:C,headers:S,queryString:D,postData:x,headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:v,basicAuth:y,pathParameters:j,serverVariables:(null==o?void 0:o.variables)||e.activeServer.variables,allResponseCodes:N}}const defaultOptions={withImports:!0,withComments:!1},langToSnippetConfig={curl:{code:"shell",defaultTarget:"curl",defaultOptions:Object.assign(Object.assign({},defaultOptions),{short:!0})},JavaScript:{code:"javascript",defaultTarget:"fetch",defaultOptions:Object.assign(Object.assign({},defaultOptions),{withImports:!1})},"Node.js":{code:"node",defaultTarget:"fetch",defaultOptions:Object.assign({},defaultOptions)},Python:{code:"python",defaultTarget:"requests",defaultOptions:Object.assign({},defaultOptions)},"Java8+Apache":{code:"java8",defaultTarget:"apachehttp",defaultOptions:Object.assign({},defaultOptions)},Java:{code:"java",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#":{code:"csharp",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#+Newtonsoft":{code:"csharpNewtonsoft",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},Go:{code:"go",defaultTarget:"http.DefaultClient",defaultOptions:Object.assign({},defaultOptions)},PHP:{code:"php",defaultTarget:"curl",defaultOptions:Object.assign({},defaultOptions)},Ruby:{code:"ruby",defaultTarget:"net::http",defaultOptions:Object.assign({},defaultOptions)},R:{code:"r",defaultTarget:"httr",defaultOptions:Object.assign({},defaultOptions)}};function getCodeSample({lang:e,operation:t,exampleName:a,pathParams:r,properties:s,options:i={}}){try{const{skipOptionalParameters:n,withOAuth2Call:l,spec:o,generatedPayloadSamplesMaxDepth:u,store:p}=i,c=mapOperationToHAR(t,{exampleName:a,pathParams:r,properties:s,skipOptionalParameters:n,withOAuth2Call:l,spec:o,generatedPayloadSamplesMaxDepth:u},p),d=new httpsnippet_1.HTTPSnippet(c);return langToSnippetConfig[e]?d.convert(langToSnippetConfig[e].code,langToSnippetConfig[e].defaultTarget,Object.assign(Object.assign({},langToSnippetConfig[e].defaultOptions),i)):"Language is not supported."}catch(e){return console.error(e),"Failed to generate code sample."}}function getSecurityData(e,t){var a,r,s,i;const n={securityHeaders:[],securityCookies:[],securityQueries:[],securityOAuth2ExtraCalls:[],basicAuth:void 0};for(const l of(null==e?void 0:e.schemes)||[]){const e=(0,utils_1.getSecurityDetails)(l.id);switch(l.type){case"openIdConnect":null===(a=n.securityHeaders)||void 0===a||a.push({name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"});break;case"oauth2":{const a=e.token?`${e.token.token_type||"Bearer"} ${e.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>";l.flows.clientCredentials&&t?n.securityOAuth2ExtraCalls.push(getOAuth2ClientCredsCallHar(l.flows.clientCredentials,l.scopes,e)):l.flows.password&&t&&n.securityOAuth2ExtraCalls.push(getOAuth2PasswordCallHar(l.flows.password,l.scopes,e)),null===(r=n.securityHeaders)||void 0===r||r.push({name:"Authorization",value:a});break}case"apiKey":{const t=e.raw||"YOUR_API_KEY_HERE";"header"===l.in&&(null===(s=n.securityHeaders)||void 0===s||s.push({name:l.name,value:t})),"cookie"===l.in&&n.securityCookies.push({name:l.name,value:t}),"query"===l.in&&n.securityQueries.push({name:l.name,value:t});break}case"http":"basic"===l.scheme?n.basicAuth={username:e.username||`<${string_utility_1.default.toSnakeCase((0,labels_1.l)("tryItAuthBasicUsername"))}>`,password:e.password||`<${string_utility_1.default.toSnakeCase((0,labels_1.l)("tryItAuthBasicPassword"))}>`}:null===(i=n.securityHeaders)||void 0===i||i.push({name:"Authorization",value:`${capitalizeFirst(l.scheme||"bearer")} <YOUR_${l.bearerFormat||"TOKEN"}_HERE>`})}}return n}function getOAuth2PasswordCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"password"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},{name:"username",value:a.username||"<username>"},{name:"password",value:a.password||"<password>"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getOAuth2ClientCredsCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getDataRequest(e,t){if(e){if("object"==typeof e)return(0,deepmerge_1.default)(e,t,{arrayMerge:utils_2.arrayMergeStrategy});try{return(0,deepmerge_1.default)(JSON.parse(e),t,{arrayMerge:utils_2.arrayMergeStrategy})}catch(e){return!1}}return!1}function objectToHarParams(e,t=""){const a=[];for(const[r,s]of Object.entries(e)){const e=t?`${t}[${r}]`:r;"object"==typeof s&&null!==s?a.push(...objectToHarParams(s,e)):a.push({name:e,value:String(s)})}return a}function isDefined(e){return void 0!==e}function capitalizeFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}exports.getCodeSample=getCodeSample,exports.isDefined=isDefined,exports.capitalizeFirst=capitalizeFirst;
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,a,r){void 0===r&&(r=a);var s=Object.getOwnPropertyDescriptor(t,a);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,r,s)}:function(e,t,a,r){void 0===r&&(r=a),e[r]=t[a]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&__createBinding(t,e,a);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.capitalizeFirst=exports.isDefined=exports.getCodeSample=void 0;const Sampler=__importStar(require("openapi-sampler")),deepmerge_1=__importDefault(require("deepmerge")),utils_1=require("../../utils"),utils_2=require("../utils"),constants_1=require("../../constants"),httpsnippet_1=require("./httpsnippet"),mediaContent_1=require("../../models/mediaContent");function mapOperationToHAR(e,{exampleName:t="",skipOptionalParameters:a=!1,withOAuth2Call:r=!1,spec:s,generatedPayloadSamplesMaxDepth:i=8,pathParams:n={},properties:o={}},{environment:l,requestValues:u}){var p,c,d;const m=l.server,f=e.servers.find((e=>e.url===m))||e.servers[0],{securityHeaders:h,securityCookies:_,securityQueries:O,securityOAuth2ExtraCalls:g,basicAuth:v}=getSecurityData(null===(p=e.security)||void 0===p?void 0:p[0],r,l),y=(null===(c=null==e?void 0:e.requestBody)||void 0===c?void 0:c.content)&&(0,mediaContent_1.getActiveMediaType)(e.requestBody.content),T={skipNonRequired:a,skipReadOnly:!0,maxSampleDepth:i},S=u;let C=!1;const b=e.parameters.filter((e=>"header"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t;return{name:e.name,value:(null===(t=S.header)||void 0===t?void 0:t[e.name])||(0,utils_1.getParameterValue)("header",e.name)||(0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,T,s))}})).map((e=>((null==y?void 0:y.name)&&"content-type"===e.name.toLowerCase()&&(C=!0,e.value=y.name),e))).concat(h);!C&&(null==y?void 0:y.name)&&b.unshift({name:"Content-Type",value:null==y?void 0:y.name});const D=e.parameters.filter((e=>"cookie"===e.in)).filter((e=>!(a&&!e.required))).map((e=>utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,T,s))))).reduce(((e,t)=>{var a;for(const[r,s]of Object.entries(t))e.push({name:r,value:String((null===(a=S.cookie)||void 0===a?void 0:a[r])||s)});return e}),[]).concat(_),E=e.parameters.filter((e=>"query"===e.in)).filter((e=>!(a&&!e.required))).map((e=>utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,T,s))))).reduce(((e,t)=>{var a,r,s;for(const[i,n]of Object.entries(t))e.push({name:i,value:(0,utils_1.isArrayOfObjects)(null===(a=S.query)||void 0===a?void 0:a[i])&&JSON.stringify((0,utils_1.deleteEmptyArrayItem)(null===(r=S.query)||void 0===r?void 0:r[i]))||String((null===(s=S.query)||void 0===s?void 0:s[i])||n)});return e}),[]).concat(O),j=`${null==f?void 0:f.url.replace(/\/$/,"")}/${e.path.replace(/^\//,"")}`,P=e.parameters.filter((e=>"path"===e.in)).reduce(((e,t)=>{var a;const{in:r,name:s}=t;return e[s]=(null===(a=S.path)||void 0===a?void 0:a[s])||n[s]||(0,utils_1.getParameterValue)(r,s),e}),{}),w=null===(d=null==y?void 0:y.examples)||void 0===d?void 0:d[t],A=(null==y?void 0:y.examples)||{},[q]=Object.values(A),R=(null==S?void 0:S.body)||(null==w?void 0:w.value)||(null==q?void 0:q.value)||(null==y?void 0:y.schema)&&Sampler.sample(null==y?void 0:y.schema.rawSchema,T,s),M=null==y?void 0:y.name.toLowerCase();let k="",x=[];switch((0,utils_2.normalizeMimeType)(M)){case constants_1.MediaTypes.JSON:case constants_1.MediaTypes.XML:k=JSON.stringify(getDataRequest(R,o));break;case constants_1.MediaTypes.URL_ENCODED:case constants_1.MediaTypes.MULTIPART:k=utils_1.queryString.stringify(getDataRequest(R,o)),x=objectToHarParams(getDataRequest(R,o));break;default:k=String(R||"")}const N=k?{mimeType:(null==y?void 0:y.name)||constants_1.MediaTypes.OCTET_STREAM,text:k,params:x}:void 0,H=e.responses.map((e=>e.code));return{method:e.httpVerb,url:j,httpVersion:"HTTP/1.1",cookies:D,headers:b,queryString:E,postData:N,headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:g,basicAuth:v,pathParameters:P,serverVariables:l,allResponseCodes:H}}const defaultOptions={withImports:!0,withComments:!1},langToSnippetConfig={curl:{code:"shell",defaultTarget:"curl",defaultOptions:Object.assign(Object.assign({},defaultOptions),{short:!0})},JavaScript:{code:"javascript",defaultTarget:"fetch",defaultOptions:Object.assign(Object.assign({},defaultOptions),{withImports:!1})},"Node.js":{code:"node",defaultTarget:"fetch",defaultOptions:Object.assign({},defaultOptions)},Python:{code:"python",defaultTarget:"requests",defaultOptions:Object.assign({},defaultOptions)},"Java8+Apache":{code:"java8",defaultTarget:"apachehttp",defaultOptions:Object.assign({},defaultOptions)},Java:{code:"java",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#":{code:"csharp",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#+Newtonsoft":{code:"csharpNewtonsoft",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},Go:{code:"go",defaultTarget:"http.DefaultClient",defaultOptions:Object.assign({},defaultOptions)},PHP:{code:"php",defaultTarget:"curl",defaultOptions:Object.assign({},defaultOptions)},Ruby:{code:"ruby",defaultTarget:"net::http",defaultOptions:Object.assign({},defaultOptions)},R:{code:"r",defaultTarget:"httr",defaultOptions:Object.assign({},defaultOptions)}};function getCodeSample({lang:e,operation:t,exampleName:a,pathParams:r,properties:s,options:i={},environment:n}){try{const{skipOptionalParameters:o,withOAuth2Call:l,spec:u,generatedPayloadSamplesMaxDepth:p,store:c}=i,d=mapOperationToHAR(t,{exampleName:a,pathParams:r,properties:s,skipOptionalParameters:o,withOAuth2Call:l,spec:u,generatedPayloadSamplesMaxDepth:p},{environment:n,requestValues:c.requestValues}),m=new httpsnippet_1.HTTPSnippet(d);return langToSnippetConfig[e]?m.convert(langToSnippetConfig[e].code,langToSnippetConfig[e].defaultTarget,Object.assign(Object.assign({},langToSnippetConfig[e].defaultOptions),i)):"Language is not supported."}catch(e){return console.error(e),"Failed to generate code sample."}}function getSecurityData(e,t,a){var r,s,i,n;const o={securityHeaders:[],securityCookies:[],securityQueries:[],securityOAuth2ExtraCalls:[],basicAuth:void 0};for(const l of(null==e?void 0:e.schemes)||[]){const e=(0,utils_1.getSecurityDetails)(l.id,a);switch(l.type){case"openIdConnect":null===(r=o.securityHeaders)||void 0===r||r.push({name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"});break;case"oauth2":{const a=e.token?`${e.token.token_type||"Bearer"} ${e.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>";l.flows.clientCredentials&&t?o.securityOAuth2ExtraCalls.push(getOAuth2ClientCredsCallHar(l.flows.clientCredentials,l.scopes,e)):l.flows.password&&t&&o.securityOAuth2ExtraCalls.push(getOAuth2PasswordCallHar(l.flows.password,l.scopes,e)),null===(s=o.securityHeaders)||void 0===s||s.push({name:"Authorization",value:a});break}case"apiKey":{const t=e.raw||"YOUR_API_KEY_HERE";"header"===l.in&&(null===(i=o.securityHeaders)||void 0===i||i.push({name:l.name,value:t})),"cookie"===l.in&&o.securityCookies.push({name:l.name,value:t}),"query"===l.in&&o.securityQueries.push({name:l.name,value:t});break}case"http":"basic"===l.scheme?o.basicAuth={username:String(e.username),password:String(e.password)}:null===(n=o.securityHeaders)||void 0===n||n.push({name:"Authorization",value:`${capitalizeFirst(l.scheme||"bearer")} <YOUR_${l.bearerFormat||"TOKEN"}_HERE>`})}}return o}function getOAuth2PasswordCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"password"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},{name:"username",value:a.username||"<username>"},{name:"password",value:a.password||"<password>"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getOAuth2ClientCredsCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getDataRequest(e,t){if(e){if("object"==typeof e)return(0,deepmerge_1.default)(e,t,{arrayMerge:utils_2.arrayMergeStrategy});try{return(0,deepmerge_1.default)(JSON.parse(e),t,{arrayMerge:utils_2.arrayMergeStrategy})}catch(e){return!1}}return!1}function objectToHarParams(e,t=""){const a=[];for(const[r,s]of Object.entries(e)){const e=t?`${t}[${r}]`:r;"object"==typeof s&&null!==s?a.push(...objectToHarParams(s,e)):a.push({name:e,value:String(s)})}return a}function isDefined(e){return void 0!==e}function capitalizeFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}exports.getCodeSample=getCodeSample,exports.isDefined=isDefined,exports.capitalizeFirst=capitalizeFirst;
|
|
2
2
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OpenAPIServerVariable } from '../../../../types';
|
|
1
2
|
import { VariableType } from './constants';
|
|
2
3
|
/**
|
|
3
4
|
* Helper object to format and aggragate lines of code.
|
|
@@ -15,7 +16,7 @@ export declare class CodeBuilder {
|
|
|
15
16
|
private lang;
|
|
16
17
|
langOptions: {
|
|
17
18
|
stringLiteral: (t: string) => string;
|
|
18
|
-
variableWrapperFn: (variableName: string, variableValue?: string) => string;
|
|
19
|
+
variableWrapperFn: (variableName: string, variableValue?: OpenAPIServerVariable | string) => string;
|
|
19
20
|
variableDeclaration: (v: string) => string;
|
|
20
21
|
joinSymbol: string;
|
|
21
22
|
urlFieldName: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.printUrlVariablesDeclarations=exports.buildUrlExpression=exports.parseUrlIntoOperands=exports.addIndentation=exports.getPreserveTransformer=void 0;const constants_1=require("./constants");function getPreserveTransformer({body:e,authorizationHeader:r}){return function(n,t,a){return e&&"body"===t&&"string"==typeof n.body?n.body:r&&"Authorization"===t&&"string"==typeof n.Authorization?n.Authorization:a}}function addIndentation(e,{level:r=0,indent:n=" ",firstLine:t=!0}={}){const a=n.repeat(r),s=e.replace(/(\r\n|\n|\r)/gm,`\n${a}`);return t?a.concat(s):s}function parseUrlIntoOperands(e,r){const n=Object.keys(r).map((r=>({name:r,idx:e.indexOf(`{${r}}`)}))).filter((({idx:e})=>e>-1)).sort(((e,r)=>e.idx-r.idx)),t=[];let a=0;for(const{name:r,idx:s}of n)s>a&&t.push({type:"string",value:e.substring(a,s)}),t.push({type:"variable",name:r}),a=s+r.length+2;return a<e.length&&t.push({type:"string",value:e.substring(a)}),t}function buildUrlExpression(e,r){const{joinSymbol:n,variableWrapperFn:t,stringLiteral:a,urlFieldName:s,rawName:i}=r.langOptions,{pathParameters:o={},serverVariables:l={}}=e,p=Object.assign(Object.assign({},o),l);return parseUrlIntoOperands(e[s]||"",p).map((e=>{if("variable"===e.type){const n=p[e.name],a=i?e.name:r.var(e.name,constants_1.VariableType.PATH);return t(a,n)}return a(e.value)})).join(n)}function printUrlVariablesDeclarations({pathParameters:e={},serverVariables:r={}},n,t){Object.entries(Object.assign(Object.assign({},e),r)).forEach((([e,r])=>{const a=r||`YOUR_${e}_PARAMETER`,s=n.var(e,constants_1.VariableType.PATH);void 0!==t?n.push(t,n.langOptions.variableDeclaration(s),a):n.push(n.langOptions.variableDeclaration(s),a)}))}exports.getPreserveTransformer=getPreserveTransformer,exports.addIndentation=addIndentation,exports.parseUrlIntoOperands=parseUrlIntoOperands,exports.buildUrlExpression=buildUrlExpression,exports.printUrlVariablesDeclarations=printUrlVariablesDeclarations;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.printUrlVariablesDeclarations=exports.buildUrlExpression=exports.parseUrlIntoOperands=exports.addIndentation=exports.getPreserveTransformer=void 0;const constants_1=require("./constants");function getPreserveTransformer({body:e,authorizationHeader:r}){return function(n,t,a){return e&&"body"===t&&"string"==typeof n.body?n.body:r&&"Authorization"===t&&"string"==typeof n.Authorization?n.Authorization:a}}function addIndentation(e,{level:r=0,indent:n=" ",firstLine:t=!0}={}){const a=n.repeat(r),s=e.replace(/(\r\n|\n|\r)/gm,`\n${a}`);return t?a.concat(s):s}function parseUrlIntoOperands(e,r){const n=Object.keys(r).map((r=>({name:r,idx:e.indexOf(`{${r}}`)}))).filter((({idx:e})=>e>-1)).sort(((e,r)=>e.idx-r.idx)),t=[];let a=0;for(const{name:r,idx:s}of n)s>a&&t.push({type:"string",value:e.substring(a,s)}),t.push({type:"variable",name:r}),a=s+r.length+2;return a<e.length&&t.push({type:"string",value:e.substring(a)}),t}function buildUrlExpression(e,r){const{joinSymbol:n,variableWrapperFn:t,stringLiteral:a,urlFieldName:s,rawName:i}=r.langOptions,{pathParameters:o={},serverVariables:l={}}=e,p=Object.assign(Object.assign({},o),l);return parseUrlIntoOperands(e[s]||"",p).map((e=>{if("variable"===e.type){const n=p[e.name],a=i?e.name:r.var(e.name,constants_1.VariableType.PATH);return t(a,n)}return a(e.value)})).join(n)}function printUrlVariablesDeclarations({pathParameters:e={},serverVariables:r={}},n,t){Object.entries(Object.assign(Object.assign({},e),r)).forEach((([e,r])=>{if("server"===e)return;const a=r||`YOUR_${e}_PARAMETER`,s=n.var(e,constants_1.VariableType.PATH);void 0!==t?n.push(t,n.langOptions.variableDeclaration(s),a):n.push(n.langOptions.variableDeclaration(s),a)}))}exports.getPreserveTransformer=getPreserveTransformer,exports.addIndentation=addIndentation,exports.parseUrlIntoOperands=parseUrlIntoOperands,exports.buildUrlExpression=buildUrlExpression,exports.printUrlVariablesDeclarations=printUrlVariablesDeclarations;
|
|
2
2
|
//# sourceMappingURL=code-helpers.js.map
|
|
@@ -19,7 +19,7 @@ export interface SnippetRequest extends CustomHAR {
|
|
|
19
19
|
};
|
|
20
20
|
uriObj?: any;
|
|
21
21
|
pathParameters: KeyValueAreStrings;
|
|
22
|
-
serverVariables:
|
|
22
|
+
serverVariables: Record<string, string>;
|
|
23
23
|
fullUrl?: string;
|
|
24
24
|
}
|
|
25
25
|
export declare class HTTPSnippet {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.serverVariablesOptions=exports.source=exports.originalOptions=void 0;const spec={openapi:"3.0.0",servers:[{url:"//petstore.swagger.io/v2",description:"Default server"},{url:"//petstore.swagger.io/sandbox",description:"Sandbox server"}],info:{description:"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n# Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n# OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Subheader 1\n\nConsectetur adipiscing elit. Etiam fringilla tincidunt magna non dignissim. Vestibulum vestibulum ipsum augue, sed rhoncus diam consequat sodales. Sed facilisis maximus enim, ut scelerisque lorem ullamcorper eget. Suspendisse venenatis non lectus sed bibendum.\n*Duis neque ante, ultrices at ornare aliquam, vulputate ac dolor.*\n\n## Subheader 2\n\nLorem ipsum dolor sit amet. Ut tempor sem vitae dui varius, consequat varius ligula fringilla. Nulla accumsan pellentesque lorem eu pharetra. Duis vel est metus. Nulla id quam eget ante egestas fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vulputate pulvinar turpis, ac convallis quam.\n\n# Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n# Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n\n<SecurityDefinitions />\n",version:"1.0.0",title:"Swagger Petstore",termsOfService:"http://swagger.io/terms/",contact:{name:"API Support",email:"apiteam@swagger.io",url:"https://github.com/Redocly/redoc"},"x-logo":{url:"https://redocly.github.io/redoc/petstore-logo.png",altText:"Petstore logo"},license:{name:"Apache 2.0",url:"http://www.apache.org/licenses/LICENSE-2.0.html"}},externalDocs:{description:"Find out how to create Github repo for your OpenAPI spec.",url:"https://github.com/Rebilly/generator-openapi-repo"},tags:[{name:"pet",description:"Lorem ipsum dolor sit amet.\n\n**Consectetur** adipiscing elit. Etiam fringilla tincidunt magna non dignissim. Vestibulum vestibulum ipsum augue, sed rhoncus diam consequat sodales. Sed facilisis maximus enim, ut scelerisque lorem ullamcorper eget. Suspendisse venenatis non lectus sed bibendum.\n*Duis neque ante, ultrices at ornare aliquam, vulputate ac dolor.*\n\nPellentesque nulla lorem:\n- dapibus lacinia magna vitae, \n- eleifend bibendum nisi\n\nNullam pretium erat ut augue mollis, id varius orci pretium. \n> Ut efficitur eget dui eget molestie.\n\nUt tempor sem vitae dui varius, consequat varius ligula fringilla. Nulla accumsan pellentesque lorem eu pharetra. Duis vel est metus. Nulla id quam eget ante egestas fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vulputate pulvinar turpis, ac convallis quam.\n[More info](http://swagger.io)\n"},{name:"store"},{name:"user",description:"Operations about user\n\n## Custom section 1\nNullam pretium erat ut augue mollis, id varius orci pretium. \n\n\n## Custom section 2\nNulla accumsan pellentesque lorem eu pharetra. Duis vel est metus. Nulla id quam eget ante egestas fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\nSome Item\n"},{name:"pet_model","x-displayName":"The Pet Model",description:'<SchemaDefinition schemaRef="#/components/schemas/Pet" />\n'},{name:"store_model","x-displayName":"The Order Model",description:'<SchemaDefinition schemaRef="#/components/schemas/Order" exampleRef="#/components/examples/Order" showReadOnly={true} showWriteOnly={true} />\n'}],"x-tagGroups":[{name:"General",tags:["pet","store"]},{name:"User Management",tags:["user"]},{name:"Models",tags:["pet_model","store_model"]}],paths:{"/pet":{parameters:[{name:"Accept-Language",in:"header",description:"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US",example:"en-US",required:!1,schema:{type:"string",default:"en-AU"}},{name:"cookieParam",in:"cookie",description:"Some cookie",required:!0,schema:{type:"integer",format:"int64"}}],post:{tags:["pet"],summary:"Add a new pet to the store",description:"Add new pet to the store inventory.",operationId:"addPet",responses:{405:{description:"Invalid input"}},security:[{petstore_auth:["write:pets","read:pets"]}],"x-codeSamples":[{lang:"C#",source:'PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey("your api key");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = "Rex";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n'},{lang:"PHP",source:'$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType("Dog");\n$form->setName("Rex");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n'}],requestBody:{$ref:"#/components/requestBodies/Pet"}},put:{tags:["pet"],summary:"Update an existing pet",description:"",operationId:"updatePet",responses:{400:{description:"Invalid ID supplied"},404:{description:"Pet not found"},405:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}],"x-codeSamples":[{lang:"PHP",source:'$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType("Dog");\n$form->setName("Rex");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n'}],requestBody:{$ref:"#/components/requestBodies/Pet"}}},"/pet/{petId}":{get:{tags:["pet"],summary:"Find pet by ID",description:"Returns a single pet",operationId:"getPetById",parameters:[{name:"petId",in:"path",description:"ID of pet to return",required:!0,deprecated:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"}},security:[{api_key:[]}]},post:{tags:["pet"],summary:"Updates a pet in the store with form data",description:"",operationId:"updatePetWithForm",parameters:[{name:"petId",in:"path",description:"ID of pet that needs to be updated",required:!0,schema:{type:"integer",format:"int64"}}],responses:{405:{description:"Invalid input"}},security:[{petstore_auth:["write:pets","read:pets"]}],requestBody:{content:{"application/x-www-form-urlencoded":{schema:{type:"object",properties:{name:{description:"Updated name of the pet",type:"string"},status:{description:"Updated status of the pet",type:"string"}}}}}}},delete:{tags:["pet"],summary:"Deletes a pet",description:"",operationId:"deletePet",parameters:[{name:"api_key",in:"header",required:!1,schema:{type:"string"},example:"Bearer <TOKEN>"},{name:"petId",in:"path",description:"Pet id to delete",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid pet value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}/uploadImage":{post:{tags:["pet"],summary:"uploads an image",description:"",operationId:"uploadFile",parameters:[{name:"petId",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/ApiResponse"}}}}},security:[{petstore_auth:["write:pets","read:pets"]}],requestBody:{content:{"application/octet-stream":{schema:{type:"string",format:"binary"}}}}}},"/pet/{petId}/uploadImage/{data}":{post:{tags:["pet"],summary:"uploads an image",description:"",operationId:"uploadFile",parameters:[{name:"petId",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}},{name:"data",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/ApiResponse"}}}}},security:[{petstore_auth:["write:pets","read:pets"]}],requestBody:{content:{"application/octet-stream":{schema:{type:"string",format:"binary"}}}}}},"/pet/findByStatus":{get:{tags:["pet"],summary:"Finds Pets by status",description:"Multiple status values can be provided with comma separated strings",operationId:"findPetsByStatus",parameters:[{name:"status",in:"query",description:"Status values that need to be considered for filter",required:!0,style:"form",schema:{type:"array",minItems:1,maxItems:3,items:{type:"string",enum:["available","pending","sold"],default:"available"}}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid status value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByTags":{get:{tags:["pet"],summary:"Finds Pets by tags",description:"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",operationId:"findPetsByTags",deprecated:!0,parameters:[{name:"tags",in:"query",description:"Tags to filter by",required:!0,style:"form",schema:{type:"array",items:{type:"string"}}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid tag value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/store/inventory":{get:{tags:["store"],summary:"Returns pet inventories by status",description:"Returns a map of status codes to quantities",operationId:"getInventory",responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"object",additionalProperties:{type:"integer",format:"int32"}}}}}},security:[{api_key:[]}]}},"/store/order":{post:{tags:["store"],summary:"Place an order for a pet",description:"",operationId:"placeOrder",responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid Order",content:{"application/json":{example:{status:400,message:"Invalid Order"}}}}},requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}}},description:"order placed for purchasing the pet",required:!0}}},"/store/order/{orderId}":{get:{tags:["store"],summary:"Find purchase order by ID",description:"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",operationId:"getOrderById",parameters:[{name:"orderId",in:"path",description:"ID of pet that needs to be fetched",required:!0,schema:{type:"integer",format:"int64",minimum:1,maximum:5}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}},delete:{tags:["store"],summary:"Delete purchase order by ID",description:"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",operationId:"deleteOrder",parameters:[{name:"orderId",in:"path",description:"ID of the order that needs to be deleted",required:!0,schema:{type:"string",minimum:1}}],responses:{400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}}},"/store/subscribe":{post:{tags:["store"],summary:"Subscribe to the Store events",description:"Add subscription for a store events",requestBody:{content:{"application/json":{schema:{type:"object",properties:{callbackUrl:{type:"string",format:"uri",description:"This URL will be called by the server when the desired event will occur",example:"https://myserver.com/send/callback/here"},eventName:{type:"string",description:"Event name for the subscription",enum:["orderInProgress","orderShipped","orderDelivered"],example:"orderInProgress"}},required:["callbackUrl","eventName"]}}}},responses:{201:{description:"Subscription added",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",example:"AAA-123-BBB-456"}}}}}}},callbacks:{orderInProgress:{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{servers:[{url:"//callback-url.path-level/v1",description:"Path level server 1"},{url:"//callback-url.path-level/v2",description:"Path level server 2"}],post:{summary:"Order in Progress (Summary)",description:'A callback triggered every time an Order is updated status to "inProgress" (Description)',externalDocs:{description:"Find out more",url:"https://more-details.com/demo"},requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"},status:{type:"string",example:"inProgress"}}}},"application/xml":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"}}},example:'<?xml version="1.0" encoding="UTF-8"?>\n<root>\n <orderId>123</orderId>\n <status>inProgress</status>\n <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n'}}},responses:{200:{description:"Callback successfully processed and no retries will be performed",content:{"application/json":{schema:{type:"object",properties:{someProp:{type:"string",example:"123"}}}}}},299:{description:"Response for cancelling subscription"},500:{description:"Callback processing failed and retries will be performed"}},"x-codeSamples":[{lang:"C#",source:'PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey("your api key");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = "Rex";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n'},{lang:"PHP",source:'$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType("Dog");\n$form->setName("Rex");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n'}]},put:{description:"Order in Progress (Only Description)",servers:[{url:"//callback-url.operation-level/v1",description:"Operation level server 1 (Operation override)"},{url:"//callback-url.operation-level/v2",description:"Operation level server 2 (Operation override)"}],requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"},status:{type:"string",example:"inProgress"}}}},"application/xml":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"}}},example:'<?xml version="1.0" encoding="UTF-8"?>\n<root>\n <orderId>123</orderId>\n <status>inProgress</status>\n <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n'}}},responses:{200:{description:"Callback successfully processed and no retries will be performed",content:{"application/json":{schema:{type:"object",properties:{someProp:{type:"string",example:"123"}}}}}}}}}},orderShipped:{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{post:{description:"Very long description\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n",requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"},estimatedDeliveryDate:{type:"string",format:"date-time",example:"2018-11-11T16:00:00Z"}}}}}},responses:{200:{description:"Callback successfully processed and no retries will be performed"}}}}},orderDelivered:{"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}":{post:{deprecated:!0,summary:"Order delivered",description:"A callback triggered every time an Order is delivered to the recipient",requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"}}}}}},responses:{200:{description:"Callback successfully processed and no retries will be performed"}}}}}}}},"/user":{post:{tags:["user"],summary:"Create user",description:"This can only be done by the logged in user.",operationId:"createUser",responses:{default:{description:"successful operation"}},requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/User"}}},description:"Created user object",required:!0}}},"/user/{username}":{get:{tags:["user"],summary:"Get user by user name",description:"",operationId:"getUserByName",parameters:[{name:"username",in:"path",description:"The name that needs to be fetched. Use user1 for testing. ",required:!0,schema:{type:"string"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},400:{description:"Invalid username supplied"},404:{description:"User not found"}}},put:{tags:["user"],summary:"Updated user",description:"This can only be done by the logged in user.",operationId:"updateUser",parameters:[{name:"username",in:"path",description:"name that need to be deleted",required:!0,schema:{type:"string"}}],responses:{400:{description:"Invalid user supplied"},404:{description:"User not found"}},requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/User"}}},description:"Updated user object",required:!0}},delete:{tags:["user"],summary:"Delete user",description:"This can only be done by the logged in user.",operationId:"deleteUser",parameters:[{name:"username",in:"path",description:"The name that needs to be deleted",required:!0,schema:{type:"string"}}],responses:{400:{description:"Invalid username supplied"},404:{description:"User not found"}}}},"/user/createWithArray":{post:{tags:["user"],summary:"Creates list of users with given input array",description:"",operationId:"createUsersWithArrayInput",responses:{default:{description:"successful operation"}},requestBody:{$ref:"#/components/requestBodies/UserArray"}}},"/user/createWithList":{post:{tags:["user"],summary:"Creates list of users with given input array",description:"",operationId:"createUsersWithListInput",responses:{default:{description:"successful operation"}},requestBody:{$ref:"#/components/requestBodies/UserArray"}}},"/user/login":{get:{tags:["user"],summary:"Logs user into the system",description:"",operationId:"loginUser",parameters:[{name:"username",in:"query",description:"The user name for login",required:!0,schema:{type:"string"}},{name:"password",in:"query",description:"The password for login in clear text",required:!0,schema:{type:"string"}}],responses:{200:{description:"successful operation",headers:{"X-Rate-Limit":{description:"calls per hour allowed by the user",schema:{type:"integer",format:"int32"}},"X-Expires-After":{description:"date in UTC when token expires",schema:{type:"string",format:"date-time"}}},content:{"application/json":{schema:{type:"string"},examples:{response:{value:"OK"}}},"application/xml":{schema:{type:"string"},examples:{response:{value:"<Message> OK </Message>"}}},"text/plain":{examples:{response:{value:"OK"}}}}},400:{description:"Invalid username/password supplied"}}}},"/user/logout":{get:{tags:["user"],summary:"Logs out current logged in user session",description:"",operationId:"logoutUser",responses:{default:{description:"successful operation"}}}}},components:{schemas:{ApiResponse:{type:"object",properties:{code:{type:"integer",format:"int32"},type:{type:"string"},message:{type:"string"}}},Cat:{description:"A representation of a cat",allOf:[{$ref:"#/components/schemas/Pet"},{type:"object",properties:{huntingSkill:{type:"string",description:"The measured skill for hunting",default:"lazy",example:"adventurous",enum:["clueless","lazy","adventurous","aggressive"]}},required:["huntingSkill"]}]},Category:{type:"object",properties:{id:{description:"Category ID",allOf:[{$ref:"#/components/schemas/Id"}]},name:{description:"Category name",type:"string",minLength:1},sub:{description:"Test Sub Category",type:"object",properties:{prop1:{type:"string",description:"Dumb Property"}}}},xml:{name:"Category"}},Dog:{description:"A representation of a dog",allOf:[{$ref:"#/components/schemas/Pet"},{type:"object",properties:{packSize:{type:"integer",format:"int32",description:"The size of the pack the dog is from",default:1,minimum:1}},required:["packSize"]}]},HoneyBee:{description:"A representation of a honey bee",allOf:[{$ref:"#/components/schemas/Pet"},{type:"object",properties:{honeyPerDay:{type:"number",description:"Average amount of honey produced per day in ounces",example:3.14,multipleOf:.01}},required:["honeyPerDay"]}]},Id:{type:"integer",format:"int64",readOnly:!0},Order:{type:"object",properties:{id:{description:"Order ID",allOf:[{$ref:"#/components/schemas/Id"}]},petId:{description:"Pet ID",allOf:[{$ref:"#/components/schemas/Id"}]},quantity:{type:"integer",format:"int32",minimum:1,default:1},shipDate:{description:"Estimated ship date",type:"string",format:"date-time"},status:{type:"string",description:"Order Status",enum:["placed","approved","delivered"]},complete:{description:"Indicates whenever order was completed or not",type:"boolean",default:!1,readOnly:!0},requestId:{description:"Unique Request Id",type:"string",writeOnly:!0}},xml:{name:"Order"}},Pet:{type:"object",required:["name","photoUrls"],discriminator:{propertyName:"petType",mapping:{cat:"#/components/schemas/Cat",dog:"#/components/schemas/Dog",bee:"#/components/schemas/HoneyBee"}},properties:{id:{externalDocs:{description:"Find more info here",url:"https://example.com"},description:"Pet ID",allOf:[{$ref:"#/components/schemas/Id"}]},category:{description:"Categories this pet belongs to",allOf:[{$ref:"#/components/schemas/Category"}]},name:{description:"The name given to a pet",type:"string",example:"Guru"},photoUrls:{description:"The list of URL to a cute photos featuring pet",type:"array",maxItems:20,xml:{name:"photoUrl",wrapped:!0},items:{type:"string",format:"url"}},friend:{allOf:[{$ref:"#/components/schemas/Pet"}]},tags:{description:"Tags attached to the pet",type:"array",minItems:1,xml:{name:"tag",wrapped:!0},items:{$ref:"#/components/schemas/Tag"}},status:{type:"string",description:"Pet status in the store",enum:["available","pending","sold"]},petType:{description:"Type of a pet",type:"string"}},xml:{name:"Pet"}},Tag:{type:"object",properties:{id:{description:"Tag ID",allOf:[{$ref:"#/components/schemas/Id"}]},name:{description:"Tag name",type:"string",minLength:1}},xml:{name:"Tag"}},User:{type:"object",properties:{id:{$ref:"#/components/schemas/Id"},pet:{oneOf:[{$ref:"#/components/schemas/Pet"},{$ref:"#/components/schemas/Tag"}]},username:{description:"User supplied username",type:"string",minLength:4,example:"John78"},firstName:{description:"User first name",type:"string",minLength:1,example:"John"},lastName:{description:"User last name",type:"string",minLength:1,example:"Smith"},email:{description:"User email address",type:"string",format:"email",example:"john.smith@example.com"},password:{type:"string",description:"User password, MUST contain a mix of upper and lower case letters, as well as digits",format:"password",minLength:8,pattern:"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/",example:"drowssaP123"},phone:{description:"User phone number in international format",type:"string",pattern:"/^\\+(?:[0-9]-?){6,14}[0-9]$/",example:"+1-202-555-0192"},userStatus:{description:"User status",type:"integer",format:"int32"}},xml:{name:"User"}}},requestBodies:{Pet:{content:{"application/json":{schema:{allOf:[{description:"My Pet",title:"Pettie"},{$ref:"#/components/schemas/Pet"}]}},"application/xml":{schema:{type:"object",properties:{name:{type:"string",description:"hooray"}}}}},description:"Pet object that needs to be added to the store",required:!0},UserArray:{content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}},description:"List of user object",required:!0}},securitySchemes:{petstore_auth:{description:"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n",type:"oauth2",flows:{clientCredentials:{tokenUrl:"http://petstore.swagger.io/api/oauth/dialog",scopes:{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},api_key:{description:"For this sample, you can use the api key `special-key` to test the authorization filters.\n",type:"apiKey",name:"api_key",in:"header"}},examples:{Order:{value:{quantity:1,shipDate:"2018-10-19T16:46:45Z",status:"placed",complete:!1}}}},"x-webhooks":{newPet:{post:{summary:"New pet",description:"Information about a new pet in the systems",operationId:"newPet",tags:["pet"],requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}}}},responses:{200:{description:"Return a 200 status to indicate that the data was received successfully"}}}}}};exports.originalOptions={withImports:!0,withComments:!1,skipOptionalParameters:!1,withOAuth2Call:!0,spec:spec},exports.source={"POST http://petstore.swagger.io/v2/pet":{method:"post",url:"http://petstore.swagger.io/v2/pet",httpVersion:"HTTP/1.1",cookies:[{name:"cookieParam",value:"0"}],headers:[{name:"Content-Type",value:"application/json"},{name:"Accept-Language",value:"en-AU"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],postData:{mimeType:"application/json",text:'{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":"cat","huntingSkill":"adventurous"}',params:[],jsonObj:{category:{name:"string",sub:{prop1:"string"}},name:"Guru",photoUrls:["string"],friend:{},tags:[{name:"string"}],status:"available",petType:"cat",huntingSkill:"adventurous"}},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{cookieParam:"0"},allHeaders:{cookie:"cookieParam=0","Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet",path:"/v2/pet",href:"http://petstore.swagger.io/v2/pet"},fullUrl:"http://petstore.swagger.io/v2/pet"},"POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}":{method:"post",url:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}",httpVersion:"HTTP/1.1",cookies:[],headers:[{name:"Content-Type",value:"application/octet-stream"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{petId:"",data:""},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{},allHeaders:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet/{petId}/uploadImage/{data}",path:"/v2/pet/{petId}/uploadImage/{data}",href:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}"},fullUrl:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}"},"PUT http://petstore.swagger.io/v2/pet":{method:"put",url:"http://petstore.swagger.io/v2/pet",httpVersion:"HTTP/1.1",cookies:[{name:"cookieParam",value:"0"}],headers:[{name:"Content-Type",value:"application/json"},{name:"Accept-Language",value:"en-AU"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],postData:{mimeType:"application/json",text:'{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":"cat","huntingSkill":"adventurous"}',params:[],jsonObj:{category:{name:"string",sub:{prop1:"string"}},name:"Guru",photoUrls:["string"],friend:{},tags:[{name:"string"}],status:"available",petType:"cat",huntingSkill:"adventurous"}},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{cookieParam:"0"},allHeaders:{cookie:"cookieParam=0","Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet",path:"/v2/pet",href:"http://petstore.swagger.io/v2/pet"},fullUrl:"http://petstore.swagger.io/v2/pet"},"POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage":{method:"post",url:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage",httpVersion:"HTTP/1.1",cookies:[],headers:[{name:"Content-Type",value:"application/octet-stream"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{petId:""},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{},allHeaders:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet/{petId}/uploadImage",path:"/v2/pet/{petId}/uploadImage",href:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage"},fullUrl:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage"},"GET http://petstore.swagger.io/v2/pet/findByStatus/{id}":{method:"get",url:"http://petstore.swagger.io/v2/pet/findByStatus/{id}",httpVersion:"HTTP/1.1",cookies:[],headers:[{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[{name:"status",value:"available"}],headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{id:""},serverVariables:{},queryObj:{status:"available"},headersObj:{Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{},allHeaders:{Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"status=available",query:{status:"available"},pathname:"/v2/pet/findByStatus/{id}",path:"/v2/pet/findByStatus/{id}?status=available",href:"http://petstore.swagger.io/v2/pet/findByStatus/%7Bid%7D"},fullUrl:"http://petstore.swagger.io/v2/pet/findByStatus/{id}?status=available"},"POST https://{customerId}.saas-app.com:{port}/v2":{method:"post",url:"https://{customerId}.saas-app.com:{port}/v2/pet",httpVersion:"HTTP/1.1",cookies:[{name:"cookieParam",value:"0"}],headers:[{name:"Content-Type",value:"application/json"},{name:"Accept-Language",value:"en-AU"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],postData:{mimeType:"application/json",text:"text",params:[],jsonObj:{category:{name:"string",sub:{prop1:"string"}},name:"Guru",photoUrls:["string"],friend:{},tags:[{name:"string"}],cvv_check:"string",status:"available",petType:"cat",huntingSkill:"adventurous"}},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[],pathParameters:{},serverVariables:{customerId:"demo",port:"443"},queryObj:{},headersObj:{"Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{cookieParam:"0"},allHeaders:{cookie:"cookieParam=0","Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"https:",slashes:!0,auth:null,host:"",port:null,hostname:"",hash:null,search:"",query:{},pathname:"{customerId}.saas-app.com:{port}/v2/pet",path:"{customerId}.saas-app.com:{port}/v2/pet",href:"https:///%7BcustomerId%7D.saas-app.com:%7Bport%7D/v2/pet"},fullUrl:"https://{customerId}.saas-app.com:{port}/v2/pet"},"POST http://petstore.swagger.io/login":{method:"post",url:"http://petstore.swagger.io/login",httpVersion:"HTTP/1.1",headers:[],queryString:[],postData:{mimeType:"application/json",text:"text",params:[],jsonObj:{}},basicAuth:{username:"usernamestring",password:"passwordstring"},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[],pathParameters:{},queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},serverVariables:{},cookies:[{name:"cookieParam",value:"0"}],uriObj:{protocol:"https:",slashes:!0,auth:null,host:"",port:null,hostname:"",hash:null,search:"",query:{},pathname:"petstore.swagger.io/login",path:"petstore.swagger.io/login",href:"https://petstore.swagger.io/login"},fullUrl:"https://petstore.swagger.io/login"}},exports.serverVariablesOptions={withImports:!0,withComments:!1,skipOptionalParameters:!1,withOAuth2Call:!0,spec:Object.assign(Object.assign({},spec),{servers:[{url:"https://{customerId}.saas-app.com:{port}/v2",variables:{customerId:{default:"demo",description:"Customer ID assigned by the service provider"},port:{enum:["443","8443"],default:"443"}}}]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.serverVariablesOptions=exports.source=exports.originalOptions=void 0;const spec={openapi:"3.0.0",servers:[{url:"//petstore.swagger.io/v2",description:"Default server"},{url:"//petstore.swagger.io/sandbox",description:"Sandbox server"}],info:{description:"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n# Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n# OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Subheader 1\n\nConsectetur adipiscing elit. Etiam fringilla tincidunt magna non dignissim. Vestibulum vestibulum ipsum augue, sed rhoncus diam consequat sodales. Sed facilisis maximus enim, ut scelerisque lorem ullamcorper eget. Suspendisse venenatis non lectus sed bibendum.\n*Duis neque ante, ultrices at ornare aliquam, vulputate ac dolor.*\n\n## Subheader 2\n\nLorem ipsum dolor sit amet. Ut tempor sem vitae dui varius, consequat varius ligula fringilla. Nulla accumsan pellentesque lorem eu pharetra. Duis vel est metus. Nulla id quam eget ante egestas fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vulputate pulvinar turpis, ac convallis quam.\n\n# Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n# Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n",version:"1.0.0",title:"Swagger Petstore",termsOfService:"http://swagger.io/terms/",contact:{name:"API Support",email:"apiteam@swagger.io",url:"https://github.com/Redocly/redoc"},"x-logo":{url:"https://redocly.github.io/redoc/petstore-logo.png",altText:"Petstore logo"},license:{name:"Apache 2.0",url:"http://www.apache.org/licenses/LICENSE-2.0.html"}},externalDocs:{description:"Find out how to create Github repo for your OpenAPI spec.",url:"https://github.com/Rebilly/generator-openapi-repo"},tags:[{name:"pet",description:"Lorem ipsum dolor sit amet.\n\n**Consectetur** adipiscing elit. Etiam fringilla tincidunt magna non dignissim. Vestibulum vestibulum ipsum augue, sed rhoncus diam consequat sodales. Sed facilisis maximus enim, ut scelerisque lorem ullamcorper eget. Suspendisse venenatis non lectus sed bibendum.\n*Duis neque ante, ultrices at ornare aliquam, vulputate ac dolor.*\n\nPellentesque nulla lorem:\n- dapibus lacinia magna vitae, \n- eleifend bibendum nisi\n\nNullam pretium erat ut augue mollis, id varius orci pretium. \n> Ut efficitur eget dui eget molestie.\n\nUt tempor sem vitae dui varius, consequat varius ligula fringilla. Nulla accumsan pellentesque lorem eu pharetra. Duis vel est metus. Nulla id quam eget ante egestas fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vulputate pulvinar turpis, ac convallis quam.\n[More info](http://swagger.io)\n"},{name:"store"},{name:"user",description:"Operations about user\n\n## Custom section 1\nNullam pretium erat ut augue mollis, id varius orci pretium. \n\n\n## Custom section 2\nNulla accumsan pellentesque lorem eu pharetra. Duis vel est metus. Nulla id quam eget ante egestas fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\nSome Item\n"},{name:"pet_model","x-displayName":"The Pet Model",description:'<SchemaDefinition schemaRef="#/components/schemas/Pet" />\n'},{name:"store_model","x-displayName":"The Order Model",description:'<SchemaDefinition schemaRef="#/components/schemas/Order" exampleRef="#/components/examples/Order" showReadOnly={true} showWriteOnly={true} />\n'}],"x-tagGroups":[{name:"General",tags:["pet","store"]},{name:"User Management",tags:["user"]},{name:"Models",tags:["pet_model","store_model"]}],paths:{"/pet":{parameters:[{name:"Accept-Language",in:"header",description:"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US",example:"en-US",required:!1,schema:{type:"string",default:"en-AU"}},{name:"cookieParam",in:"cookie",description:"Some cookie",required:!0,schema:{type:"integer",format:"int64"}}],post:{tags:["pet"],summary:"Add a new pet to the store",description:"Add new pet to the store inventory.",operationId:"addPet",responses:{405:{description:"Invalid input"}},security:[{petstore_auth:["write:pets","read:pets"]}],"x-codeSamples":[{lang:"C#",source:'PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey("your api key");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = "Rex";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n'},{lang:"PHP",source:'$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType("Dog");\n$form->setName("Rex");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n'}],requestBody:{$ref:"#/components/requestBodies/Pet"}},put:{tags:["pet"],summary:"Update an existing pet",description:"",operationId:"updatePet",responses:{400:{description:"Invalid ID supplied"},404:{description:"Pet not found"},405:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}],"x-codeSamples":[{lang:"PHP",source:'$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType("Dog");\n$form->setName("Rex");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n'}],requestBody:{$ref:"#/components/requestBodies/Pet"}}},"/pet/{petId}":{get:{tags:["pet"],summary:"Find pet by ID",description:"Returns a single pet",operationId:"getPetById",parameters:[{name:"petId",in:"path",description:"ID of pet to return",required:!0,deprecated:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"}},security:[{api_key:[]}]},post:{tags:["pet"],summary:"Updates a pet in the store with form data",description:"",operationId:"updatePetWithForm",parameters:[{name:"petId",in:"path",description:"ID of pet that needs to be updated",required:!0,schema:{type:"integer",format:"int64"}}],responses:{405:{description:"Invalid input"}},security:[{petstore_auth:["write:pets","read:pets"]}],requestBody:{content:{"application/x-www-form-urlencoded":{schema:{type:"object",properties:{name:{description:"Updated name of the pet",type:"string"},status:{description:"Updated status of the pet",type:"string"}}}}}}},delete:{tags:["pet"],summary:"Deletes a pet",description:"",operationId:"deletePet",parameters:[{name:"api_key",in:"header",required:!1,schema:{type:"string"},example:"Bearer <TOKEN>"},{name:"petId",in:"path",description:"Pet id to delete",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid pet value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}/uploadImage":{post:{tags:["pet"],summary:"uploads an image",description:"",operationId:"uploadFile",parameters:[{name:"petId",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/ApiResponse"}}}}},security:[{petstore_auth:["write:pets","read:pets"]}],requestBody:{content:{"application/octet-stream":{schema:{type:"string",format:"binary"}}}}}},"/pet/{petId}/uploadImage/{data}":{post:{tags:["pet"],summary:"uploads an image",description:"",operationId:"uploadFile",parameters:[{name:"petId",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}},{name:"data",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/ApiResponse"}}}}},security:[{petstore_auth:["write:pets","read:pets"]}],requestBody:{content:{"application/octet-stream":{schema:{type:"string",format:"binary"}}}}}},"/pet/findByStatus":{get:{tags:["pet"],summary:"Finds Pets by status",description:"Multiple status values can be provided with comma separated strings",operationId:"findPetsByStatus",parameters:[{name:"status",in:"query",description:"Status values that need to be considered for filter",required:!0,style:"form",schema:{type:"array",minItems:1,maxItems:3,items:{type:"string",enum:["available","pending","sold"],default:"available"}}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid status value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByTags":{get:{tags:["pet"],summary:"Finds Pets by tags",description:"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",operationId:"findPetsByTags",deprecated:!0,parameters:[{name:"tags",in:"query",description:"Tags to filter by",required:!0,style:"form",schema:{type:"array",items:{type:"string"}}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid tag value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/store/inventory":{get:{tags:["store"],summary:"Returns pet inventories by status",description:"Returns a map of status codes to quantities",operationId:"getInventory",responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"object",additionalProperties:{type:"integer",format:"int32"}}}}}},security:[{api_key:[]}]}},"/store/order":{post:{tags:["store"],summary:"Place an order for a pet",description:"",operationId:"placeOrder",responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid Order",content:{"application/json":{example:{status:400,message:"Invalid Order"}}}}},requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}}},description:"order placed for purchasing the pet",required:!0}}},"/store/order/{orderId}":{get:{tags:["store"],summary:"Find purchase order by ID",description:"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",operationId:"getOrderById",parameters:[{name:"orderId",in:"path",description:"ID of pet that needs to be fetched",required:!0,schema:{type:"integer",format:"int64",minimum:1,maximum:5}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}},delete:{tags:["store"],summary:"Delete purchase order by ID",description:"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",operationId:"deleteOrder",parameters:[{name:"orderId",in:"path",description:"ID of the order that needs to be deleted",required:!0,schema:{type:"string",minimum:1}}],responses:{400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}}},"/store/subscribe":{post:{tags:["store"],summary:"Subscribe to the Store events",description:"Add subscription for a store events",requestBody:{content:{"application/json":{schema:{type:"object",properties:{callbackUrl:{type:"string",format:"uri",description:"This URL will be called by the server when the desired event will occur",example:"https://myserver.com/send/callback/here"},eventName:{type:"string",description:"Event name for the subscription",enum:["orderInProgress","orderShipped","orderDelivered"],example:"orderInProgress"}},required:["callbackUrl","eventName"]}}}},responses:{201:{description:"Subscription added",content:{"application/json":{schema:{type:"object",properties:{subscriptionId:{type:"string",example:"AAA-123-BBB-456"}}}}}}},callbacks:{orderInProgress:{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{servers:[{url:"//callback-url.path-level/v1",description:"Path level server 1"},{url:"//callback-url.path-level/v2",description:"Path level server 2"}],post:{summary:"Order in Progress (Summary)",description:'A callback triggered every time an Order is updated status to "inProgress" (Description)',externalDocs:{description:"Find out more",url:"https://more-details.com/demo"},requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"},status:{type:"string",example:"inProgress"}}}},"application/xml":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"}}},example:'<?xml version="1.0" encoding="UTF-8"?>\n<root>\n <orderId>123</orderId>\n <status>inProgress</status>\n <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n'}}},responses:{200:{description:"Callback successfully processed and no retries will be performed",content:{"application/json":{schema:{type:"object",properties:{someProp:{type:"string",example:"123"}}}}}},299:{description:"Response for cancelling subscription"},500:{description:"Callback processing failed and retries will be performed"}},"x-codeSamples":[{lang:"C#",source:'PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey("your api key");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = "Rex";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n'},{lang:"PHP",source:'$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType("Dog");\n$form->setName("Rex");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n'}]},put:{description:"Order in Progress (Only Description)",servers:[{url:"//callback-url.operation-level/v1",description:"Operation level server 1 (Operation override)"},{url:"//callback-url.operation-level/v2",description:"Operation level server 2 (Operation override)"}],requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"},status:{type:"string",example:"inProgress"}}}},"application/xml":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"}}},example:'<?xml version="1.0" encoding="UTF-8"?>\n<root>\n <orderId>123</orderId>\n <status>inProgress</status>\n <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n'}}},responses:{200:{description:"Callback successfully processed and no retries will be performed",content:{"application/json":{schema:{type:"object",properties:{someProp:{type:"string",example:"123"}}}}}}}}}},orderShipped:{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{post:{description:"Very long description\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n",requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"},estimatedDeliveryDate:{type:"string",format:"date-time",example:"2018-11-11T16:00:00Z"}}}}}},responses:{200:{description:"Callback successfully processed and no retries will be performed"}}}}},orderDelivered:{"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}":{post:{deprecated:!0,summary:"Order delivered",description:"A callback triggered every time an Order is delivered to the recipient",requestBody:{content:{"application/json":{schema:{type:"object",properties:{orderId:{type:"string",example:"123"},timestamp:{type:"string",format:"date-time",example:"2018-10-19T16:46:45Z"}}}}}},responses:{200:{description:"Callback successfully processed and no retries will be performed"}}}}}}}},"/user":{post:{tags:["user"],summary:"Create user",description:"This can only be done by the logged in user.",operationId:"createUser",responses:{default:{description:"successful operation"}},requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/User"}}},description:"Created user object",required:!0}}},"/user/{username}":{get:{tags:["user"],summary:"Get user by user name",description:"",operationId:"getUserByName",parameters:[{name:"username",in:"path",description:"The name that needs to be fetched. Use user1 for testing. ",required:!0,schema:{type:"string"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},400:{description:"Invalid username supplied"},404:{description:"User not found"}}},put:{tags:["user"],summary:"Updated user",description:"This can only be done by the logged in user.",operationId:"updateUser",parameters:[{name:"username",in:"path",description:"name that need to be deleted",required:!0,schema:{type:"string"}}],responses:{400:{description:"Invalid user supplied"},404:{description:"User not found"}},requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/User"}}},description:"Updated user object",required:!0}},delete:{tags:["user"],summary:"Delete user",description:"This can only be done by the logged in user.",operationId:"deleteUser",parameters:[{name:"username",in:"path",description:"The name that needs to be deleted",required:!0,schema:{type:"string"}}],responses:{400:{description:"Invalid username supplied"},404:{description:"User not found"}}}},"/user/createWithArray":{post:{tags:["user"],summary:"Creates list of users with given input array",description:"",operationId:"createUsersWithArrayInput",responses:{default:{description:"successful operation"}},requestBody:{$ref:"#/components/requestBodies/UserArray"}}},"/user/createWithList":{post:{tags:["user"],summary:"Creates list of users with given input array",description:"",operationId:"createUsersWithListInput",responses:{default:{description:"successful operation"}},requestBody:{$ref:"#/components/requestBodies/UserArray"}}},"/user/login":{get:{tags:["user"],summary:"Logs user into the system",description:"",operationId:"loginUser",parameters:[{name:"username",in:"query",description:"The user name for login",required:!0,schema:{type:"string"}},{name:"password",in:"query",description:"The password for login in clear text",required:!0,schema:{type:"string"}}],responses:{200:{description:"successful operation",headers:{"X-Rate-Limit":{description:"calls per hour allowed by the user",schema:{type:"integer",format:"int32"}},"X-Expires-After":{description:"date in UTC when token expires",schema:{type:"string",format:"date-time"}}},content:{"application/json":{schema:{type:"string"},examples:{response:{value:"OK"}}},"application/xml":{schema:{type:"string"},examples:{response:{value:"<Message> OK </Message>"}}},"text/plain":{examples:{response:{value:"OK"}}}}},400:{description:"Invalid username/password supplied"}}}},"/user/logout":{get:{tags:["user"],summary:"Logs out current logged in user session",description:"",operationId:"logoutUser",responses:{default:{description:"successful operation"}}}}},components:{schemas:{ApiResponse:{type:"object",properties:{code:{type:"integer",format:"int32"},type:{type:"string"},message:{type:"string"}}},Cat:{description:"A representation of a cat",allOf:[{$ref:"#/components/schemas/Pet"},{type:"object",properties:{huntingSkill:{type:"string",description:"The measured skill for hunting",default:"lazy",example:"adventurous",enum:["clueless","lazy","adventurous","aggressive"]}},required:["huntingSkill"]}]},Category:{type:"object",properties:{id:{description:"Category ID",allOf:[{$ref:"#/components/schemas/Id"}]},name:{description:"Category name",type:"string",minLength:1},sub:{description:"Test Sub Category",type:"object",properties:{prop1:{type:"string",description:"Dumb Property"}}}},xml:{name:"Category"}},Dog:{description:"A representation of a dog",allOf:[{$ref:"#/components/schemas/Pet"},{type:"object",properties:{packSize:{type:"integer",format:"int32",description:"The size of the pack the dog is from",default:1,minimum:1}},required:["packSize"]}]},HoneyBee:{description:"A representation of a honey bee",allOf:[{$ref:"#/components/schemas/Pet"},{type:"object",properties:{honeyPerDay:{type:"number",description:"Average amount of honey produced per day in ounces",example:3.14,multipleOf:.01}},required:["honeyPerDay"]}]},Id:{type:"integer",format:"int64",readOnly:!0},Order:{type:"object",properties:{id:{description:"Order ID",allOf:[{$ref:"#/components/schemas/Id"}]},petId:{description:"Pet ID",allOf:[{$ref:"#/components/schemas/Id"}]},quantity:{type:"integer",format:"int32",minimum:1,default:1},shipDate:{description:"Estimated ship date",type:"string",format:"date-time"},status:{type:"string",description:"Order Status",enum:["placed","approved","delivered"]},complete:{description:"Indicates whenever order was completed or not",type:"boolean",default:!1,readOnly:!0},requestId:{description:"Unique Request Id",type:"string",writeOnly:!0}},xml:{name:"Order"}},Pet:{type:"object",required:["name","photoUrls"],discriminator:{propertyName:"petType",mapping:{cat:"#/components/schemas/Cat",dog:"#/components/schemas/Dog",bee:"#/components/schemas/HoneyBee"}},properties:{id:{externalDocs:{description:"Find more info here",url:"https://example.com"},description:"Pet ID",allOf:[{$ref:"#/components/schemas/Id"}]},category:{description:"Categories this pet belongs to",allOf:[{$ref:"#/components/schemas/Category"}]},name:{description:"The name given to a pet",type:"string",example:"Guru"},photoUrls:{description:"The list of URL to a cute photos featuring pet",type:"array",maxItems:20,xml:{name:"photoUrl",wrapped:!0},items:{type:"string",format:"url"}},friend:{allOf:[{$ref:"#/components/schemas/Pet"}]},tags:{description:"Tags attached to the pet",type:"array",minItems:1,xml:{name:"tag",wrapped:!0},items:{$ref:"#/components/schemas/Tag"}},status:{type:"string",description:"Pet status in the store",enum:["available","pending","sold"]},petType:{description:"Type of a pet",type:"string"}},xml:{name:"Pet"}},Tag:{type:"object",properties:{id:{description:"Tag ID",allOf:[{$ref:"#/components/schemas/Id"}]},name:{description:"Tag name",type:"string",minLength:1}},xml:{name:"Tag"}},User:{type:"object",properties:{id:{$ref:"#/components/schemas/Id"},pet:{oneOf:[{$ref:"#/components/schemas/Pet"},{$ref:"#/components/schemas/Tag"}]},username:{description:"User supplied username",type:"string",minLength:4,example:"John78"},firstName:{description:"User first name",type:"string",minLength:1,example:"John"},lastName:{description:"User last name",type:"string",minLength:1,example:"Smith"},email:{description:"User email address",type:"string",format:"email",example:"john.smith@example.com"},password:{type:"string",description:"User password, MUST contain a mix of upper and lower case letters, as well as digits",format:"password",minLength:8,pattern:"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/",example:"drowssaP123"},phone:{description:"User phone number in international format",type:"string",pattern:"/^\\+(?:[0-9]-?){6,14}[0-9]$/",example:"+1-202-555-0192"},userStatus:{description:"User status",type:"integer",format:"int32"}},xml:{name:"User"}}},requestBodies:{Pet:{content:{"application/json":{schema:{allOf:[{description:"My Pet",title:"Pettie"},{$ref:"#/components/schemas/Pet"}]}},"application/xml":{schema:{type:"object",properties:{name:{type:"string",description:"hooray"}}}}},description:"Pet object that needs to be added to the store",required:!0},UserArray:{content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}},description:"List of user object",required:!0}},securitySchemes:{petstore_auth:{description:"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n",type:"oauth2",flows:{clientCredentials:{tokenUrl:"http://petstore.swagger.io/api/oauth/dialog",scopes:{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},api_key:{description:"For this sample, you can use the api key `special-key` to test the authorization filters.\n",type:"apiKey",name:"api_key",in:"header"}},examples:{Order:{value:{quantity:1,shipDate:"2018-10-19T16:46:45Z",status:"placed",complete:!1}}}},"x-webhooks":{newPet:{post:{summary:"New pet",description:"Information about a new pet in the systems",operationId:"newPet",tags:["pet"],requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}}}},responses:{200:{description:"Return a 200 status to indicate that the data was received successfully"}}}}}};exports.originalOptions={withImports:!0,withComments:!1,skipOptionalParameters:!1,withOAuth2Call:!0,spec:spec},exports.source={"POST http://petstore.swagger.io/v2/pet":{method:"post",url:"http://petstore.swagger.io/v2/pet",httpVersion:"HTTP/1.1",cookies:[{name:"cookieParam",value:"0"}],headers:[{name:"Content-Type",value:"application/json"},{name:"Accept-Language",value:"en-AU"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],postData:{mimeType:"application/json",text:'{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":"cat","huntingSkill":"adventurous"}',params:[],jsonObj:{category:{name:"string",sub:{prop1:"string"}},name:"Guru",photoUrls:["string"],friend:{},tags:[{name:"string"}],status:"available",petType:"cat",huntingSkill:"adventurous"}},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{cookieParam:"0"},allHeaders:{cookie:"cookieParam=0","Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet",path:"/v2/pet",href:"http://petstore.swagger.io/v2/pet"},fullUrl:"http://petstore.swagger.io/v2/pet"},"POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}":{method:"post",url:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}",httpVersion:"HTTP/1.1",cookies:[],headers:[{name:"Content-Type",value:"application/octet-stream"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{petId:"",data:""},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{},allHeaders:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet/{petId}/uploadImage/{data}",path:"/v2/pet/{petId}/uploadImage/{data}",href:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}"},fullUrl:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}"},"PUT http://petstore.swagger.io/v2/pet":{method:"put",url:"http://petstore.swagger.io/v2/pet",httpVersion:"HTTP/1.1",cookies:[{name:"cookieParam",value:"0"}],headers:[{name:"Content-Type",value:"application/json"},{name:"Accept-Language",value:"en-AU"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],postData:{mimeType:"application/json",text:'{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":"cat","huntingSkill":"adventurous"}',params:[],jsonObj:{category:{name:"string",sub:{prop1:"string"}},name:"Guru",photoUrls:["string"],friend:{},tags:[{name:"string"}],status:"available",petType:"cat",huntingSkill:"adventurous"}},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{cookieParam:"0"},allHeaders:{cookie:"cookieParam=0","Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet",path:"/v2/pet",href:"http://petstore.swagger.io/v2/pet"},fullUrl:"http://petstore.swagger.io/v2/pet"},"POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage":{method:"post",url:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage",httpVersion:"HTTP/1.1",cookies:[],headers:[{name:"Content-Type",value:"application/octet-stream"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{petId:""},serverVariables:{},queryObj:{},headersObj:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{},allHeaders:{"Content-Type":"application/octet-stream",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"",query:{},pathname:"/v2/pet/{petId}/uploadImage",path:"/v2/pet/{petId}/uploadImage",href:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage"},fullUrl:"http://petstore.swagger.io/v2/pet/{petId}/uploadImage"},"GET http://petstore.swagger.io/v2/pet/findByStatus/{id}":{method:"get",url:"http://petstore.swagger.io/v2/pet/findByStatus/{id}",httpVersion:"HTTP/1.1",cookies:[],headers:[{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[{name:"status",value:"available"}],headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[{method:"POST",url:"http://petstore.swagger.io/api/oauth/dialog",httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:"application/x-www-form-urlencoded"},{name:"Accept",value:"application/json"}],queryString:[],postData:{mimeType:"application/x-www-form-urlencoded",text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:"YOUR_CLIENT_ID"},{name:"client_secret",value:"YOUR_CLIENT_SECRET"},{name:"scope",value:"write:pets read:pets"}]},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}],pathParameters:{id:""},serverVariables:{},queryObj:{status:"available"},headersObj:{Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{},allHeaders:{Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"http:",slashes:!0,auth:null,host:"petstore.swagger.io",port:null,hostname:"petstore.swagger.io",hash:null,search:"status=available",query:{status:"available"},pathname:"/v2/pet/findByStatus/{id}",path:"/v2/pet/findByStatus/{id}?status=available",href:"http://petstore.swagger.io/v2/pet/findByStatus/%7Bid%7D"},fullUrl:"http://petstore.swagger.io/v2/pet/findByStatus/{id}?status=available"},"POST https://{customerId}.saas-app.com:{port}/v2":{method:"post",url:"https://{customerId}.saas-app.com:{port}/v2/pet",httpVersion:"HTTP/1.1",cookies:[{name:"cookieParam",value:"0"}],headers:[{name:"Content-Type",value:"application/json"},{name:"Accept-Language",value:"en-AU"},{name:"Authorization",value:"Bearer <YOUR_TOKEN_HERE>"}],queryString:[],postData:{mimeType:"application/json",text:"text",params:[],jsonObj:{category:{name:"string",sub:{prop1:"string"}},name:"Guru",photoUrls:["string"],friend:{},tags:[{name:"string"}],cvv_check:"string",status:"available",petType:"cat",huntingSkill:"adventurous"}},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[],pathParameters:{},serverVariables:{customerId:"demo",port:"443"},queryObj:{},headersObj:{"Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},cookiesObj:{cookieParam:"0"},allHeaders:{cookie:"cookieParam=0","Content-Type":"application/json","Accept-Language":"en-AU",Authorization:"Bearer <YOUR_TOKEN_HERE>"},uriObj:{protocol:"https:",slashes:!0,auth:null,host:"",port:null,hostname:"",hash:null,search:"",query:{},pathname:"{customerId}.saas-app.com:{port}/v2/pet",path:"{customerId}.saas-app.com:{port}/v2/pet",href:"https:///%7BcustomerId%7D.saas-app.com:%7Bport%7D/v2/pet"},fullUrl:"https://{customerId}.saas-app.com:{port}/v2/pet"},"POST http://petstore.swagger.io/login":{method:"post",url:"http://petstore.swagger.io/login",httpVersion:"HTTP/1.1",headers:[],queryString:[],postData:{mimeType:"application/json",text:"text",params:[],jsonObj:{}},basicAuth:{username:"usernamestring",password:"passwordstring"},headersSize:0,bodySize:0,securityOAuth2ExtraCalls:[],pathParameters:{},queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},serverVariables:{},cookies:[{name:"cookieParam",value:"0"}],uriObj:{protocol:"https:",slashes:!0,auth:null,host:"",port:null,hostname:"",hash:null,search:"",query:{},pathname:"petstore.swagger.io/login",path:"petstore.swagger.io/login",href:"https://petstore.swagger.io/login"},fullUrl:"https://petstore.swagger.io/login"}},exports.serverVariablesOptions={withImports:!0,withComments:!1,skipOptionalParameters:!1,withOAuth2Call:!0,spec:Object.assign(Object.assign({},spec),{servers:[{url:"https://{customerId}.saas-app.com:{port}/v2",variables:{customerId:{default:"demo",description:"Customer ID assigned by the service provider"},port:{enum:["443","8443"],default:"443"}}}]})};
|
|
2
2
|
//# sourceMappingURL=mock.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const code_builder_1=require("../../helpers/code-builder"),__1=require("../.."),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),generator_1=require("../../../generator"),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),utils_2=require("../../../../../utils"),handler=function(t,e,{target:s,client:a}){var n,i,r,o;const p=Object.assign({indent:" ",withWrapper:!0},e),u=new code_builder_1.CodeBuilder({indentation:p.indent,variablesPrefix:p.variablesPrefix,capitalize:!0,lang:constants_1.Lang.CSHARP}),l=formatHttpMethod(t.method);if(p.withComments&&addComments(u),p.withWrapper&&(u.push("using System;"),u.push("using System.Net.Http;"),u.push("using System.Threading.Tasks;"),(h(constants_2.MediaTypes.JSON)||h(constants_2.MediaTypes.XML)||t.basicAuth)&&u.push("using System.Text;"),(h(constants_2.MediaTypes.URL_ENCODED)||(null===(n=t.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length))&&u.push("using System.Collections.Generic;"),(h(constants_2.MediaTypes.JSON)||(null===(i=t.securityOAuth2ExtraCalls)||void 0===i?void 0:i.length))&&u.push("using System.Text.Json;"),d()&&u.push("using System.IO;"),(d()||t.basicAuth)&&u.push("using System.Net.Http.Headers;"),u.blank(),u.push("public class Program"),u.push("{"),u.push(1,"public static async Task Main()"),u.push(1,"{")),null===(r=t.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const e=new __1.HTTPSnippet(null===(o=t.securityOAuth2ExtraCalls)||void 0===o?void 0:o[0]).convert(s,a,Object.assign(Object.assign({},p),{withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"}));u.push(e),u.push(2,"var oauth2Response = await oauth2Request.Content.ReadAsStringAsync();"),u.push(2,"JObject inputJObject = JObject.Parse(oauth2Response);"),u.push(2,'var accessToken = inputJObject["access_token"].ToString();'),u.blank()}const c=Object.keys(t.allHeaders).filter((t=>{switch(t.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}}));if(c.length?(u.push(2,"System.Net.Http.HttpClient client = new()"),u.push(2,"{"),u.push(3,"DefaultRequestHeaders ="),u.push(3,"{"),c.forEach((e=>{var s;u.push(4,'{"%s", %s},',e,(null===(s=t.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length)?'"Bearer " + accessToken':`"${t.allHeaders[e]}"`)})),u.push(3,"}"),u.push(2,"};")):u.push(2,"System.Net.Http.HttpClient client = new();"),u.blank(),t.basicAuth){const{username:e,password:s}=t.basicAuth;u.push(2,`string base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes("${e}:${s}"));`),u.push(2,'client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@"Basic", base64String);'),u.blank()}if(t.postData)switch((0,utils_1.normalizeMimeType)(t.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:t.postData.params&&(u.blank(),u.push(2,"List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new KeyValuePair<string, string>("%s", "%s"));',t.name,t.value)})),u.blank());break;case constants_2.MediaTypes.MULTIPART:t.postData.params&&(u.blank(),u.push(2,"MultipartFormDataContent postData = new MultipartFormDataContent();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new StringContent("%s"), "%s");',t.value,t.name)})));break;case constants_2.MediaTypes.JSON:t.postData.jsonObj&&(u.push(2,"string json = JsonSerializer.Serialize(new"),u.push(2,"{"),y(t.postData.jsonObj,3),u.push(2,"});"),u.blank(),u.push(2,'using StringContent postData = new(json, Encoding.UTF8, "%s");',t.postData.mimeType));break;case constants_2.MediaTypes.XML:t.postData.text&&(t.postData.text.trim().split("\n").forEach(((t,e)=>{const s=(0===e?'string xml = @"':"")+t.replace(/"/g,'""');u.push(0===e?2:3,s)})),u.push(2,'";'),u.push(2,'using StringContent postData = new StringContent(xml, Encoding.UTF8, "%s");',t.postData.mimeType))}else d()&&(u.push(2,"var ms = new MemoryStream();"),u.push(2,"var postData = new StreamContent(ms);"),u.push(2,'postData.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");'));return(0,code_helpers_1.printUrlVariablesDeclarations)(t,u,3),u.push(2,"using HttpResponseMessage %s = await client.%sAsync(%s%s);",u.var("request"),l,(0,code_helpers_1.buildUrlExpression)(t,u),p.withImports?isDataMethod(t.method)?(0,utils_1.normalizeMimeType)(t.postData&&t.postData.mimeType)===constants_2.MediaTypes.URL_ENCODED?", new FormUrlEncodedContent(postData)":"delete"===t.method?"":t.postData&&t.postData.params||d()?", postData":", null":"":", new FormUrlEncodedContent(postData)"),p.withWrapper&&(u.push(2,"string response = await request.Content.ReadAsStringAsync();"),u.blank(),u.push(2,"Console.WriteLine(response);"),u.push(1,"}"),u.push("}")),u.join();function h(e){return t.postData&&(0,utils_1.normalizeMimeType)(t.postData.mimeType)===e}function d(){return t.headersObj&&t.headersObj["Content-Type"]===constants_2.MediaTypes.OCTET_STREAM}function m(t,e){t.forEach(((s,a)=>{const n=!(0,utils_2.isLastInArray)(t,a);Array.isArray(s)?m(s,e+1):(0,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const theme_1=require("@redocly/theme"),code_builder_1=require("../../helpers/code-builder"),__1=require("../.."),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),generator_1=require("../../../generator"),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),utils_2=require("../../../../../utils"),handler=function(t,e,{target:s,client:a}){var n,i,r,o;const p=Object.assign({indent:" ",withWrapper:!0},e),u=new code_builder_1.CodeBuilder({indentation:p.indent,variablesPrefix:p.variablesPrefix,capitalize:!0,lang:constants_1.Lang.CSHARP}),l=formatHttpMethod(t.method);if(p.withComments&&addComments(u),p.withWrapper&&(u.push("using System;"),u.push("using System.Net.Http;"),u.push("using System.Threading.Tasks;"),(h(constants_2.MediaTypes.JSON)||h(constants_2.MediaTypes.XML)||t.basicAuth)&&u.push("using System.Text;"),(h(constants_2.MediaTypes.URL_ENCODED)||(null===(n=t.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length))&&u.push("using System.Collections.Generic;"),(h(constants_2.MediaTypes.JSON)||(null===(i=t.securityOAuth2ExtraCalls)||void 0===i?void 0:i.length))&&u.push("using System.Text.Json;"),d()&&u.push("using System.IO;"),(d()||t.basicAuth)&&u.push("using System.Net.Http.Headers;"),u.blank(),u.push("public class Program"),u.push("{"),u.push(1,"public static async Task Main()"),u.push(1,"{")),null===(r=t.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const e=new __1.HTTPSnippet(null===(o=t.securityOAuth2ExtraCalls)||void 0===o?void 0:o[0]).convert(s,a,Object.assign(Object.assign({},p),{withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"}));u.push(e),u.push(2,"var oauth2Response = await oauth2Request.Content.ReadAsStringAsync();"),u.push(2,"JObject inputJObject = JObject.Parse(oauth2Response);"),u.push(2,'var accessToken = inputJObject["access_token"].ToString();'),u.blank()}const c=Object.keys(t.allHeaders).filter((t=>{switch(t.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}}));if(c.length?(u.push(2,"System.Net.Http.HttpClient client = new()"),u.push(2,"{"),u.push(3,"DefaultRequestHeaders ="),u.push(3,"{"),c.forEach((e=>{var s;u.push(4,'{"%s", %s},',e,(null===(s=t.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length)?'"Bearer " + accessToken':`"${t.allHeaders[e]}"`)})),u.push(3,"}"),u.push(2,"};")):u.push(2,"System.Net.Http.HttpClient client = new();"),u.blank(),t.basicAuth){const{username:e,password:s}=t.basicAuth;u.push(2,`string base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes("${e}:${s}"));`),u.push(2,'client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@"Basic", base64String);'),u.blank()}if(t.postData)switch((0,utils_1.normalizeMimeType)(t.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:t.postData.params&&(u.blank(),u.push(2,"List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new KeyValuePair<string, string>("%s", "%s"));',t.name,t.value)})),u.blank());break;case constants_2.MediaTypes.MULTIPART:t.postData.params&&(u.blank(),u.push(2,"MultipartFormDataContent postData = new MultipartFormDataContent();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new StringContent("%s"), "%s");',t.value,t.name)})));break;case constants_2.MediaTypes.JSON:t.postData.jsonObj&&(u.push(2,"string json = JsonSerializer.Serialize(new"),u.push(2,"{"),y(t.postData.jsonObj,3),u.push(2,"});"),u.blank(),u.push(2,'using StringContent postData = new(json, Encoding.UTF8, "%s");',t.postData.mimeType));break;case constants_2.MediaTypes.XML:t.postData.text&&(t.postData.text.trim().split("\n").forEach(((t,e)=>{const s=(0===e?'string xml = @"':"")+t.replace(/"/g,'""');u.push(0===e?2:3,s)})),u.push(2,'";'),u.push(2,'using StringContent postData = new StringContent(xml, Encoding.UTF8, "%s");',t.postData.mimeType))}else d()&&(u.push(2,"var ms = new MemoryStream();"),u.push(2,"var postData = new StreamContent(ms);"),u.push(2,'postData.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");'));return(0,code_helpers_1.printUrlVariablesDeclarations)(t,u,3),u.push(2,"using HttpResponseMessage %s = await client.%sAsync(%s%s);",u.var("request"),l,(0,code_helpers_1.buildUrlExpression)(t,u),p.withImports?isDataMethod(t.method)?(0,utils_1.normalizeMimeType)(t.postData&&t.postData.mimeType)===constants_2.MediaTypes.URL_ENCODED?", new FormUrlEncodedContent(postData)":"delete"===t.method?"":t.postData&&t.postData.params||d()?", postData":", null":"":", new FormUrlEncodedContent(postData)"),p.withWrapper&&(u.push(2,"string response = await request.Content.ReadAsStringAsync();"),u.blank(),u.push(2,"Console.WriteLine(response);"),u.push(1,"}"),u.push("}")),u.join();function h(e){return t.postData&&(0,utils_1.normalizeMimeType)(t.postData.mimeType)===e}function d(){return t.headersObj&&t.headersObj["Content-Type"]===constants_2.MediaTypes.OCTET_STREAM}function m(t,e){t.forEach(((s,a)=>{const n=!(0,utils_2.isLastInArray)(t,a);Array.isArray(s)?m(s,e+1):(0,theme_1.isObject)(s)?(u.push(e+1,"new {"),y(s,e+2),u.push(e+1,"}%s",n?",":"")):u.push(e+1,'"%s"%s',s,n?",":"")})),u.push(e,"},")}function y(t,e){for(const[s,a]of Object.entries(t)){const n=!(0,utils_2.isLastProperty)(t,s);if(Array.isArray(a))u.push(e,"%s = new[] {",s),m(a,e);else if((0,theme_1.isObject)(a)){const t=(0,utils_1.isEmptyObject)(a);u.push(e,"%s = new %s",s,t?"{},":"{"),t||(y(a,e+1),u.push(e,"}%s",n?",":""))}else u.push(e,'%s = "%s"%s',s,a,n?",":"")}}};function addComments(t){t.push("// Requires >= .NET 5"),t.blank()}function formatHttpMethod(t){return(0,generator_1.capitalizeFirst)(t.toLowerCase())}function isDataMethod(t){return t&&["POST","PUT","DELETE","PATCH"].includes(t.toUpperCase())}exports.info={key:"httpclient",title:"HttpClient",link:"https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient",description:".NET Standard HTTP Client"},exports.default=handler;
|
|
2
2
|
//# sourceMappingURL=httpclient.js.map
|
|
@@ -7,7 +7,7 @@ declare const targets: {
|
|
|
7
7
|
default: string;
|
|
8
8
|
};
|
|
9
9
|
fetch: import("..").LanguageHandler<(import("../..").BasicLanguageOptions & {
|
|
10
|
-
credentials?: "
|
|
10
|
+
credentials?: "same-origin" | "omit" | "include" | undefined;
|
|
11
11
|
}) | undefined>;
|
|
12
12
|
};
|
|
13
13
|
node: {
|
|
@@ -6,7 +6,7 @@ declare const _default: {
|
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
fetch: import("../..").LanguageHandler<(import("../../..").BasicLanguageOptions & {
|
|
9
|
-
credentials?: "
|
|
9
|
+
credentials?: "same-origin" | "omit" | "include" | undefined;
|
|
10
10
|
}) | undefined>;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const util_1=require("util"),code_builder_1=require("../../helpers/code-builder"),utils_1=require("../../../../utils"),code_helpers_1=require("../../helpers/code-helpers"),__1=require("../.."),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),handler=function(e,t,{target:s,client:a}){var r,o,n,i;const l=Object.assign({indent:" "},t),{level:u=0}=l,p=new code_builder_1.CodeBuilder({indentation:l.indent,variablesPrefix:l.variablesPrefix,lang:constants_1.Lang.PYTHON});l.withComments&&addComments(p),l.withImports&&p.push("import requests").blank();let d,h,c=!1,_=e.allHeaders;if(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const t=new __1.HTTPSnippet(null===(o=e.securityOAuth2ExtraCalls)||void 0===o?void 0:o[0]).convert(s,a,Object.assign(Object.assign({},l),{withImports:!1,withComments:!1,variablesPrefix:"oauth2_"}));p.push(t),p.blank(),_=_||{},_.Authorization='"Bearer " + oauth2_data["access_token"]',c=!0}if((0,code_helpers_1.printUrlVariablesDeclarations)(e,p),p.push(`${p.var("url").toLowerCase()} = %s`,(0,code_helpers_1.buildUrlExpression)(e,p)).blank(),Object.keys(e.queryObj||{}).length){d="query = "+jsObjectToPythonDict(e.queryObj,l.indent),p.push(d).blank()}const b=(0,utils_1.normalizeMimeType)(null===(n=e.postData)||void 0===n?void 0:n.mimeType);if(e.postData)switch(b){case constants_2.MediaTypes.URL_ENCODED:h=e.postData.paramsObj?`${(0,code_helpers_1.addIndentation)(jsObjectToPythonDict(e.postData.paramsObj,l.indent),{level:0,firstLine:!1})}`:e.postData.text;break;case constants_2.MediaTypes.JSON:e.postData.jsonObj&&(h=(0,code_helpers_1.addIndentation)(jsObjectToPythonDict(e.postData.jsonObj,l.indent),{level:0,firstLine:!1}));break;case constants_2.MediaTypes.MULTIPART:p.unshift("# multipart/form-data is not supported yet\n");break;default:e.postData.text&&(h=`'''\n${(0,code_helpers_1.addIndentation)(e.postData.text.trim(),{level:1,indent:l.indent,firstLine:!0})}\n'''`)}let v;h&&p.push(`${p.var("payload").toLowerCase()} = %s`,h).blank();const C=Object.keys(_).length,$=(e,t)=>"Authorization"===e&&c?t:`"${t}"`;if(1===C)for(v in _)p.push(`${p.var("headers").toLowerCase()} = {"${v}": ${$(v,_[v])}}`).blank();else if(C>1){let e=1;for(v in p.push(`${p.var("headers").toLowerCase()} = {`),_)e++!==C?p.push(1,`"${v}": ${$(v,_[v])},`):p.push(1,`"${v}": ${$(v,_[v])}`);p.push(0,"}").blank()}const f=e.method.toLowerCase();let O=(0,util_1.format)(`${p.var("response").toLowerCase()} = requests.${f}(${p.var("url").toLowerCase()}`);if(h){O+=`, ${b===constants_2.MediaTypes.JSON?"json":"data"}=${p.var("payload").toLowerCase()}`}return C>0&&(O+=`, headers=${p.var("headers").toLowerCase()}`),d&&(O+=`, params=${p.var("query").toLowerCase()}`),e.basicAuth&&(O+=`, auth=('${e.basicAuth.username}','${e.basicAuth.password}')`),O+=")",p.push(O).blank(),(null===(i=e.allResponseCodes)||void 0===i?void 0:i.includes("204"))?p.push("if
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const util_1=require("util"),code_builder_1=require("../../helpers/code-builder"),utils_1=require("../../../../utils"),code_helpers_1=require("../../helpers/code-helpers"),__1=require("../.."),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),handler=function(e,t,{target:s,client:a}){var r,o,n,i;const l=Object.assign({indent:" "},t),{level:u=0}=l,p=new code_builder_1.CodeBuilder({indentation:l.indent,variablesPrefix:l.variablesPrefix,lang:constants_1.Lang.PYTHON});l.withComments&&addComments(p),l.withImports&&p.push("import requests").blank();let d,h,c=!1,_=e.allHeaders;if(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const t=new __1.HTTPSnippet(null===(o=e.securityOAuth2ExtraCalls)||void 0===o?void 0:o[0]).convert(s,a,Object.assign(Object.assign({},l),{withImports:!1,withComments:!1,variablesPrefix:"oauth2_"}));p.push(t),p.blank(),_=_||{},_.Authorization='"Bearer " + oauth2_data["access_token"]',c=!0}if((0,code_helpers_1.printUrlVariablesDeclarations)(e,p),p.push(`${p.var("url").toLowerCase()} = %s`,(0,code_helpers_1.buildUrlExpression)(e,p)).blank(),Object.keys(e.queryObj||{}).length){d="query = "+jsObjectToPythonDict(e.queryObj,l.indent),p.push(d).blank()}const b=(0,utils_1.normalizeMimeType)(null===(n=e.postData)||void 0===n?void 0:n.mimeType);if(e.postData)switch(b){case constants_2.MediaTypes.URL_ENCODED:h=e.postData.paramsObj?`${(0,code_helpers_1.addIndentation)(jsObjectToPythonDict(e.postData.paramsObj,l.indent),{level:0,firstLine:!1})}`:e.postData.text;break;case constants_2.MediaTypes.JSON:e.postData.jsonObj&&(h=(0,code_helpers_1.addIndentation)(jsObjectToPythonDict(e.postData.jsonObj,l.indent),{level:0,firstLine:!1}));break;case constants_2.MediaTypes.MULTIPART:p.unshift("# multipart/form-data is not supported yet\n");break;default:e.postData.text&&(h=`'''\n${(0,code_helpers_1.addIndentation)(e.postData.text.trim(),{level:1,indent:l.indent,firstLine:!0})}\n'''`)}let v;h&&p.push(`${p.var("payload").toLowerCase()} = %s`,h).blank();const C=Object.keys(_).length,$=(e,t)=>"Authorization"===e&&c?t:`"${t}"`;if(1===C)for(v in _)p.push(`${p.var("headers").toLowerCase()} = {"${v}": ${$(v,_[v])}}`).blank();else if(C>1){let e=1;for(v in p.push(`${p.var("headers").toLowerCase()} = {`),_)e++!==C?p.push(1,`"${v}": ${$(v,_[v])},`):p.push(1,`"${v}": ${$(v,_[v])}`);p.push(0,"}").blank()}const f=e.method.toLowerCase();let O=(0,util_1.format)(`${p.var("response").toLowerCase()} = requests.${f}(${p.var("url").toLowerCase()}`);if(h){O+=`, ${b===constants_2.MediaTypes.JSON?"json":"data"}=${p.var("payload").toLowerCase()}`}return C>0&&(O+=`, headers=${p.var("headers").toLowerCase()}`),d&&(O+=`, params=${p.var("query").toLowerCase()}`),e.basicAuth&&(O+=`, auth=('${e.basicAuth.username}','${e.basicAuth.password}')`),O+=")",p.push(O).blank(),(null===(i=e.allResponseCodes)||void 0===i?void 0:i.includes("204"))?p.push("if response.status_code == 204:").push(u+1,'print("success")').push("else:").push(u+1,`${p.var("data").toLowerCase()} = ${p.var("response").toLowerCase()}.json()`).push(u+1,`print(${p.var("data").toLowerCase()})`):p.push(`${p.var("data").toLowerCase()} = ${p.var("response").toLowerCase()}.json()`).push(`print(${p.var("data").toLowerCase()})`),p.join()};function addComments(e){e.push('"""'),e.push("Requires python >= 3"),e.blank(),e.push('Requires module "requests" >= 2.25.1'),e.push("See here for installation details:"),e.push(" https://requests.readthedocs.io/"),e.push('"""'),e.blank()}function jsObjectToPythonDict(e,t){return JSON.stringify(e,(function(e,t){return e&&"boolean"==typeof t?t?"__REDOCLY_<True>__":"__REDOCLY_<False>__":null===t?"__REDOCLY_<None>__":t}),t).replace(/"__REDOCLY_<(\w+)>__"/g,"$1")}exports.default=handler;
|
|
2
2
|
//# sourceMappingURL=requests.js.map
|