@redocly/openapi-docs 3.12.0-rc.7 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/redocly-openapi-docs.min.js +2153 -1963
- package/lib/components/ApiInfo/ApiInfo.js +29 -1
- package/lib/components/ApiInfo/Metadata.js +29 -1
- package/lib/components/ApiInfo/index.js +2 -1
- package/lib/components/ApiInfo/styled.js +17 -8
- package/lib/components/CallbackSamples/CallbackSamples.js +25 -4
- package/lib/components/CallbackSamples/index.js +2 -1
- package/lib/components/Callbacks/CallbackDetails.js +17 -3
- package/lib/components/Callbacks/CallbackOperation.js +24 -3
- package/lib/components/Callbacks/CallbackSummary.js +19 -3
- package/lib/components/Callbacks/CallbacksList.js +16 -1
- package/lib/components/Callbacks/index.js +4 -1
- package/lib/components/Callbacks/styled.js +6 -3
- package/lib/components/Content/Content.js +10 -1
- package/lib/components/Content/index.js +2 -1
- package/lib/components/Content/useAutoScroll.js +50 -1
- package/lib/components/ContentItem/ContentItem.js +31 -1
- package/lib/components/ContentItem/index.js +2 -1
- package/lib/components/ContentItem/useIsExpanded.js +33 -1
- package/lib/components/ContentItems/ContentItems.js +19 -1
- package/lib/components/ContentItems/Items.js +13 -1
- package/lib/components/ContentItems/VirtualList.js +35 -1
- package/lib/components/ContentItems/helpers.js +49 -1
- package/lib/components/ContentItems/index.js +2 -1
- package/lib/components/ContentItems/useScrollOnRender.js +26 -1
- package/lib/components/Discriminator/Discriminator.js +27 -2
- package/lib/components/Discriminator/index.js +2 -1
- package/lib/components/Download/DownloadSpecification.js +46 -4
- package/lib/components/Download/index.js +2 -1
- package/lib/components/Download/types.js +2 -0
- package/lib/components/Download/useDownloadInfo.js +42 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js +22 -2
- package/lib/components/ErrorBoundary/index.js +2 -1
- package/lib/components/ExpandAllButton/ExpandAllButton.js +31 -2
- package/lib/components/ExpandAllButton/index.js +2 -1
- package/lib/components/ExternalDocumentation/ExternalDocumentation.js +18 -4
- package/lib/components/ExternalDocumentation/index.js +2 -1
- package/lib/components/Language/LanguageDropdown.js +21 -1
- package/lib/components/Language/LanguageItem.js +33 -1
- package/lib/components/Language/LanguageList.js +93 -1
- package/lib/components/Language/_tests_/LanguageDropdown.test.js +23 -1
- package/lib/components/Language/constants.js +3 -1
- package/lib/components/Language/index.js +4 -1
- package/lib/components/Language/styled.js +29 -15
- package/lib/components/Markdown/Markdown.js +64 -1
- package/lib/components/Markdown/index.js +3 -1
- package/lib/components/Markdown/types.js +2 -0
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +51 -1
- package/lib/components/MediaTypeSwitch/index.js +2 -1
- package/lib/components/OperationItem/Description.d.ts +1 -4
- package/lib/components/OperationItem/Description.js +9 -1
- package/lib/components/OperationItem/OperationItem.js +70 -5
- package/lib/components/OperationItem/_tests_/OperationItem.test.js +70 -1
- package/lib/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +40 -1
- package/lib/components/OperationItem/index.js +2 -1
- package/lib/components/OperationItem/types.js +2 -0
- package/lib/components/Overlay.js +48 -3
- package/lib/components/Overview/Overview.js +20 -1
- package/lib/components/Overview/index.js +2 -1
- package/lib/components/PageFooter/PageFooter.js +19 -1
- package/lib/components/PageFooter/index.js +2 -1
- package/lib/components/Panel/ResponsePanel.js +12 -6
- package/lib/components/Panel/Trigger.js +4 -2
- package/lib/components/Panel/index.js +3 -1
- package/lib/components/PanelItem/PanelItem.js +6 -1
- package/lib/components/PanelItem/index.js +3 -1
- package/lib/components/PanelItem/styled.js +20 -10
- package/lib/components/PayloadSamples/Example.js +6 -1
- package/lib/components/PayloadSamples/ExampleValue.js +30 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.js +36 -2
- package/lib/components/PayloadSamples/PayloadSamples.js +26 -1
- package/lib/components/PayloadSamples/index.js +7 -1
- package/lib/components/PayloadSamples/styled.js +9 -4
- package/lib/components/PayloadSamples/types.js +2 -0
- package/lib/components/PropertyDetails/DescriptionEnums.js +19 -3
- package/lib/components/PropertyDetails/EnumValues.js +37 -1
- package/lib/components/PropertyDetails/Examples.js +26 -1
- package/lib/components/PropertyDetails/Extensions.js +17 -2
- package/lib/components/PropertyDetails/FieldDetail.js +15 -2
- package/lib/components/PropertyDetails/FieldDetails.js +51 -6
- package/lib/components/PropertyDetails/Pattern.js +21 -1
- package/lib/components/PropertyDetails/PlusCircleIcon.js +10 -4
- package/lib/components/PropertyDetails/PropertyDetails.js +22 -5
- package/lib/components/PropertyDetails/SchemaTypeInfo.js +10 -2
- package/lib/components/PropertyDetails/SimpleEnums.js +13 -2
- package/lib/components/PropertyDetails/cycleColorsByLevel.js +18 -1
- package/lib/components/PropertyDetails/index.js +4 -1
- package/lib/components/PropertyDetails/styled.js +15 -7
- package/lib/components/PropertyDetails/types.js +2 -0
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +114 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +57 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +86 -1
- package/lib/components/RedoclyOpenAPIDocs/index.js +5 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.js +4 -2
- package/lib/components/RedoclyOpenAPIDocs/types.js +2 -0
- package/lib/components/RedoclyOpenAPIDocs/utils.js +33 -1
- package/lib/components/RenderHook/RenderHook.js +17 -1
- package/lib/components/RenderHook/index.js +2 -1
- package/lib/components/Replay/EmbeddedReplay.js +41 -3
- package/lib/components/Replay/Replay.js +99 -1
- package/lib/components/Replay/index.js +3 -1
- package/lib/components/Replay/utils.js +208 -1
- package/lib/components/Request/RequestDetails.js +33 -2
- package/lib/components/Request/types.js +2 -0
- package/lib/components/RequestParameters/Body.js +8 -1
- package/lib/components/RequestParameters/ParametersGroup.js +19 -4
- package/lib/components/RequestParameters/RequestParameters.js +40 -1
- package/lib/components/RequestParameters/index.js +4 -1
- package/lib/components/RequestSamples/CodeSample.js +55 -2
- package/lib/components/RequestSamples/Example.js +37 -1
- package/lib/components/RequestSamples/RequestSamples.js +89 -5
- package/lib/components/RequestSamples/index.js +3 -1
- package/lib/components/RequestSamples/useCodeSamples.js +92 -1
- package/lib/components/ResponseSamples/ResponseSamples.js +47 -1
- package/lib/components/ResponseSamples/Summary.js +9 -1
- package/lib/components/ResponseSamples/index.js +2 -1
- package/lib/components/Responses/OperationResponseList.js +42 -2
- package/lib/components/Responses/ResponseDetails.js +18 -1
- package/lib/components/Responses/ResponseHeaders.js +15 -1
- package/lib/components/Responses/index.js +6 -1
- package/lib/components/Responses/styled.js +14 -6
- package/lib/components/Responses/types.js +2 -0
- package/lib/components/RightPanel/RightPanel.js +21 -1
- package/lib/components/RightPanel/index.js +2 -1
- package/lib/components/Samples/ExampleSwitch.js +33 -1
- package/lib/components/Samples/index.js +3 -1
- package/lib/components/Samples/use-example-key.js +12 -1
- package/lib/components/Schema/ArraySchema.js +45 -1
- package/lib/components/Schema/ObjectSchema.js +29 -1
- package/lib/components/Schema/OneOfSchema.js +47 -3
- package/lib/components/Schema/RecursiveSchema.js +10 -1
- package/lib/components/Schema/Schema.js +63 -2
- package/lib/components/Schema/SubSchema.js +20 -1
- package/lib/components/Schema/helpers.js +16 -1
- package/lib/components/Schema/index.js +5 -1
- package/lib/components/Schema/types.js +2 -0
- package/lib/components/Schema/useOneOfLocationIdx.js +11 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.js +65 -2
- package/lib/components/SchemaDefinition/index.js +2 -1
- package/lib/components/SectionContent/SectionContent.js +49 -6
- package/lib/components/SectionContent/index.js +2 -1
- package/lib/components/SectionItem/SectionItem.js +14 -1
- package/lib/components/SectionItem/index.js +2 -1
- package/lib/components/Security/Divider.js +9 -2
- package/lib/components/Security/OAuthFlow.js +11 -1
- package/lib/components/Security/OAuthScopes.js +59 -9
- package/lib/components/Security/Security.js +15 -1
- package/lib/components/Security/SecurityButton.js +31 -7
- package/lib/components/Security/SecurityFlow.js +28 -4
- package/lib/components/Security/SecurityModal.js +34 -5
- package/lib/components/Security/SecuritySchemeItem.js +15 -4
- package/lib/components/Security/helper.js +16 -1
- package/lib/components/Security/index.js +11 -1
- package/lib/components/Security/styled.js +6 -3
- package/lib/components/SelectOrLabel/SelectOrLabel.js +12 -2
- package/lib/components/SelectOrLabel/index.js +2 -1
- package/lib/components/ServerList/ServerList.js +36 -10
- package/lib/components/ServerList/index.js +2 -1
- package/lib/components/ServerList/types.js +2 -0
- package/lib/components/ServerListDropdown/ServerListDropdown.js +54 -1
- package/lib/components/ServerListDropdown/index.js +2 -1
- package/lib/components/ServerListDropdown/styled.js +15 -6
- package/lib/components/SideMenu/SideMenu.js +13 -2
- package/lib/components/SideMenu/hooks/useMenuItems.js +110 -1
- package/lib/components/SideMenu/index.js +2 -1
- package/lib/components/SideMenu/types.js +2 -0
- package/lib/components/StickySidebar/SidebarActions.js +14 -2
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +37 -7
- package/lib/components/StickySidebar/index.js +2 -1
- package/lib/components/Tabs/Tabs.js +16 -5
- package/lib/components/Tabs/index.js +3 -1
- package/lib/components/Tabs/useTabsState.js +22 -1
- package/lib/components/TagItem/OperationNavigationItems.js +18 -4
- package/lib/components/TagItem/OperationsNavigation.js +46 -2
- package/lib/components/TagItem/TagItem.js +41 -8
- package/lib/components/TagItem/index.js +2 -1
- package/lib/components/TagItem/styled.js +5 -2
- package/lib/components/TagItem/types.js +2 -0
- package/lib/components/ViewNested/ViewNested.js +42 -9
- package/lib/components/ViewNested/index.js +2 -1
- package/lib/components/common/Badges.js +21 -5
- package/lib/components/common/BodyContent/BodyContent.js +31 -4
- package/lib/components/common/BodyContent/index.js +2 -1
- package/lib/components/common/ClearButton/ClearButton.js +5 -1
- package/lib/components/common/ClearButton/index.js +3 -1
- package/lib/components/common/ClearButton/styled.js +5 -2
- package/lib/components/common/ClearButton/types.js +2 -0
- package/lib/components/common/CodeBlockPanel.js +7 -3
- package/lib/components/common/ConstraintsView.js +14 -2
- package/lib/components/common/Dropdown/Dropdown.js +22 -4
- package/lib/components/common/Dropdown/index.js +2 -1
- package/lib/components/common/ExpandableExample/ExpandableExample.js +24 -3
- package/lib/components/common/ExpandableExample/index.js +2 -1
- package/lib/components/common/Extensions.js +17 -2
- package/lib/components/common/Fields/fields-layout.js +76 -51
- package/lib/components/common/Fields/fields.js +39 -17
- package/lib/components/common/Fields/index.js +3 -1
- package/lib/components/common/LinkToField.js +33 -6
- package/lib/components/common/OperationItemTitle.d.ts +1 -0
- package/lib/components/common/OperationItemTitle.js +16 -5
- package/lib/components/common/SchemaSelection/SchemaSelection.js +51 -1
- package/lib/components/common/SchemaSelection/index.js +2 -1
- package/lib/components/common/Select/Select.js +21 -1
- package/lib/components/common/Select/index.js +3 -1
- package/lib/components/common/Select/styled.js +17 -9
- package/lib/components/common/Select/types.js +2 -0
- package/lib/components/common/Skeleton/LanguageListSkeleton.js +16 -6
- package/lib/components/common/Skeleton/Skeleton.js +15 -5
- package/lib/components/common/Skeleton/index.js +3 -1
- package/lib/components/common/headers.js +4 -2
- package/lib/components/common/index.js +14 -1
- package/lib/components/common/linkify.js +28 -4
- package/lib/components/common/mixins.js +4 -2
- package/lib/components/common/panels.js +58 -33
- package/lib/components/common/schema.js +16 -8
- package/lib/components/common/styled.js +15 -7
- package/lib/components/index.js +25 -1
- package/lib/components/pluggable/RedocExample.js +20 -1
- package/lib/components/pluggable/RedocSchema.js +22 -1
- package/lib/components/pluggable/index.js +3 -1
- package/lib/components/pluggable/styled.components.js +9 -4
- package/lib/constants.js +30 -1
- package/lib/empty.js +7 -1
- package/lib/events/codeSampleCopy.js +19 -1
- package/lib/events/creator.js +5 -1
- package/lib/events/index.js +8 -1
- package/lib/events/languageSwitch.js +18 -1
- package/lib/events/panelToggle.js +16 -1
- package/lib/events/serverSwitch.js +13 -1
- package/lib/events/tryItOpen.js +12 -1
- package/lib/events/tryItSent.js +12 -1
- package/lib/events/types.js +11 -1
- package/lib/hoc/types.js +2 -0
- package/lib/hoc/utils.js +4 -1
- package/lib/hoc/withRouter.js +17 -1
- package/lib/hoc/withStore.js +28 -1
- package/lib/hooks/index.js +9 -1
- package/lib/hooks/useActivateExample.js +35 -1
- package/lib/hooks/useActiveWithFallback.js +12 -1
- package/lib/hooks/useContentItems.js +10 -1
- package/lib/hooks/useLicense.js +17 -1
- package/lib/hooks/usePerformanceMetrics.js +26 -1
- package/lib/hooks/useRouter.js +17 -1
- package/lib/hooks/useTelemetry.js +5 -1
- package/lib/hooks/useTranslate.js +6 -1
- package/lib/hooks/useUppercase2LowercaseRedirect.js +12 -1
- package/lib/icons/CSharpIcon/CSharpIcon.js +7 -1
- package/lib/icons/CSharpIcon/index.js +2 -1
- package/lib/icons/CurlIcon/CurlIcon.js +8 -2
- package/lib/icons/CurlIcon/index.js +2 -1
- package/lib/icons/GOIcon/GOIcon.js +7 -1
- package/lib/icons/GOIcon/index.js +2 -1
- package/lib/icons/JavaIcon/JavaIcon.js +7 -1
- package/lib/icons/JavaIcon/index.js +2 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +7 -1
- package/lib/icons/JavaScriptIcon/index.js +2 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +7 -1
- package/lib/icons/NodeJSIcon/index.js +2 -1
- package/lib/icons/PHPIcon/PHPIcon.js +7 -1
- package/lib/icons/PHPIcon/index.js +2 -1
- package/lib/icons/PayloadIcon/PayloadIcon.js +7 -1
- package/lib/icons/PayloadIcon/index.js +2 -1
- package/lib/icons/PythonIcon/PythonIcon.js +7 -1
- package/lib/icons/PythonIcon/index.js +2 -1
- package/lib/icons/RIcon/RIcon.js +7 -1
- package/lib/icons/RIcon/index.js +2 -1
- package/lib/icons/RubyIcon/RubyIcon.js +7 -1
- package/lib/icons/RubyIcon/index.js +2 -1
- package/lib/index.js +49 -1
- package/lib/jotai/app.js +113 -1
- package/lib/jotai/operation.js +28 -1
- package/lib/jotai/replay.js +5 -1
- package/lib/jotai/store.js +8 -1
- package/lib/jotai/use-write-atom.js +9 -1
- package/lib/models/callback.js +28 -1
- package/lib/models/code-sample-options.js +2 -0
- package/lib/models/example.js +17 -1
- package/lib/models/field.js +109 -1
- package/lib/models/group.js +38 -1
- package/lib/models/index.js +14 -1
- package/lib/models/mediaContent.js +26 -1
- package/lib/models/mediaType.js +153 -1
- package/lib/models/operation.js +166 -1
- package/lib/models/request.js +25 -1
- package/lib/models/response.js +46 -1
- package/lib/models/schema.js +474 -2
- package/lib/models/security.js +84 -1
- package/lib/models/tab.js +2 -0
- package/lib/models/types.js +2 -0
- package/lib/services/OpenAPIParser.js +321 -1
- package/lib/services/check.js +104 -1
- package/lib/services/code-samples/constants.js +16 -1
- package/lib/services/code-samples/generator.js +540 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +5 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +252 -3
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +90 -2
- package/lib/services/code-samples/httpsnippet/helpers/constants.js +28 -1
- package/lib/services/code-samples/httpsnippet/helpers/lodash-int.js +173 -1
- package/lib/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +76 -37
- package/lib/services/code-samples/httpsnippet/helpers/reducer.js +16 -1
- package/lib/services/code-samples/httpsnippet/helpers/shell.js +20 -1
- package/lib/services/code-samples/httpsnippet/helpers/string-utility.js +19 -1
- package/lib/services/code-samples/httpsnippet/index.js +166 -1
- package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.js +2340 -146
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +227 -2
- package/lib/services/code-samples/httpsnippet/targets/csharp/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +185 -2
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/go/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/go/native.js +222 -3
- package/lib/services/code-samples/httpsnippet/targets/index.js +28 -1
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +184 -3
- package/lib/services/code-samples/httpsnippet/targets/java/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +223 -2
- package/lib/services/code-samples/httpsnippet/targets/java8/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +147 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +199 -1
- package/lib/services/code-samples/httpsnippet/targets/node/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/php/curl.js +203 -5
- package/lib/services/code-samples/httpsnippet/targets/php/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/php/types.js +2 -0
- package/lib/services/code-samples/httpsnippet/targets/php/utils.js +106 -5
- package/lib/services/code-samples/httpsnippet/targets/python/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/python/requests.js +185 -6
- package/lib/services/code-samples/httpsnippet/targets/r/httr.js +111 -1
- package/lib/services/code-samples/httpsnippet/targets/r/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/r/utils.js +18 -6
- package/lib/services/code-samples/httpsnippet/targets/ruby/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +169 -1
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +94 -6
- package/lib/services/code-samples/httpsnippet/targets/shell/index.js +11 -1
- package/lib/services/code-samples/index.js +3 -1
- package/lib/services/code-samples/types.js +2 -0
- package/lib/services/config-options/helpers.js +49 -1
- package/lib/services/config-options/index.js +3 -1
- package/lib/services/config-options/normalizeOptions.js +83 -1
- package/lib/services/config-options/types.js +2 -0
- package/lib/services/history/helpers.js +63 -1
- package/lib/services/history/index.js +2 -1
- package/lib/services/index.js +9 -1
- package/lib/services/menu/builder.js +47 -1
- package/lib/services/menu/index.js +2 -1
- package/lib/services/menu/markdown.js +93 -1
- package/lib/services/menu/operation.js +50 -1
- package/lib/services/menu/tags.js +166 -1
- package/lib/services/types.d.ts +0 -3
- package/lib/services/types.js +2 -0
- package/lib/services/utils.js +83 -1
- package/lib/standalone.js +68 -1
- package/lib/styled-components.js +6 -1
- package/lib/types/app.js +2 -0
- package/lib/types/index.js +4 -1
- package/lib/types/open-api.d.ts +1 -0
- package/lib/types/open-api.js +2 -0
- package/lib/types/security.js +2 -0
- package/lib/utils/JsonPointer.js +84 -1
- package/lib/utils/areArraysEqual.js +4 -1
- package/lib/utils/argValuesHelpers.js +35 -1
- package/lib/utils/compose.js +2 -1
- package/lib/utils/configure-helpers.js +223 -1
- package/lib/utils/convertSwagger2OpenAPI.js +14 -1
- package/lib/utils/cookies.js +73 -1
- package/lib/utils/debounce.js +22 -1
- package/lib/utils/debug.js +11 -1
- package/lib/utils/dom.js +65 -1
- package/lib/utils/environments.js +13 -1
- package/lib/utils/helpers.js +222 -12
- package/lib/utils/index.js +25 -1
- package/lib/utils/isMobile.js +13 -1
- package/lib/utils/loadAndBundleSpec.js +32 -1
- package/lib/utils/local-storage.js +12 -1
- package/lib/utils/object.js +31 -1
- package/lib/utils/openapi.js +592 -1
- package/lib/utils/parameters.js +13 -1
- package/lib/utils/path.js +22 -1
- package/lib/utils/queryString.js +60 -1
- package/lib/utils/replaceVariables.js +14 -1
- package/lib/utils/saveTextBeforeHeading.js +35 -1
- package/lib/utils/security-details.js +49 -1
- package/lib/utils/session-storage.js +12 -1
- package/lib/utils/simplifyAstStructure.js +22 -1
- package/lib/utils/sort.js +21 -1
- package/lib/utils/string.js +65 -1
- package/lib/utils/telemetry.js +7 -1
- package/lib/utils/test-utils.js +26 -1
- package/lib/utils/theme-helpers.js +24 -3
- package/lib/utils/url.js +38 -1
- package/package.json +5 -5
|
@@ -1,146 +1,2340 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
This API is documented in **OpenAPI format** and is based on
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
$
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
`,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"}}}}}},t={withImports:!0,withComments:!1,skipOptionalParameters:!1,withOAuth2Call:!0,spec:e},s={"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"},"POST http://petstore.swagger.io/v2/uploadImage":{httpVersion:"HTTP/1.1",queryString:[],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",method:"POST",url:"http://petstore.swagger.io/v2/uploadImage",headers:[],postData:{mimeType:"multipart/form-data",params:[{name:"file",value:"pet_image.png"},{name:"description",value:"Pet photo"}]}}},r={withImports:!0,withComments:!1,skipOptionalParameters:!1,withOAuth2Call:!0,spec:{...e,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"}}}]}};export{t as originalOptions,r as serverVariablesOptions,s as source};
|
|
1
|
+
const spec = {
|
|
2
|
+
openapi: '3.0.0',
|
|
3
|
+
servers: [
|
|
4
|
+
{
|
|
5
|
+
url: '//petstore.swagger.io/v2',
|
|
6
|
+
description: 'Default server',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
url: '//petstore.swagger.io/sandbox',
|
|
10
|
+
description: 'Sandbox server',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
info: {
|
|
14
|
+
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',
|
|
15
|
+
version: '1.0.0',
|
|
16
|
+
title: 'Swagger Petstore',
|
|
17
|
+
termsOfService: 'http://swagger.io/terms/',
|
|
18
|
+
contact: {
|
|
19
|
+
name: 'API Support',
|
|
20
|
+
email: 'apiteam@swagger.io',
|
|
21
|
+
url: 'https://github.com/Redocly/redoc',
|
|
22
|
+
},
|
|
23
|
+
'x-logo': {
|
|
24
|
+
url: 'https://redocly.github.io/redoc/petstore-logo.png',
|
|
25
|
+
altText: 'Petstore logo',
|
|
26
|
+
},
|
|
27
|
+
license: {
|
|
28
|
+
name: 'Apache 2.0',
|
|
29
|
+
url: 'http://www.apache.org/licenses/LICENSE-2.0.html',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
externalDocs: {
|
|
33
|
+
description: 'Find out how to create Github repo for your OpenAPI spec.',
|
|
34
|
+
url: 'https://github.com/Rebilly/generator-openapi-repo',
|
|
35
|
+
},
|
|
36
|
+
tags: [
|
|
37
|
+
{
|
|
38
|
+
name: 'pet',
|
|
39
|
+
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',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'store',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'user',
|
|
46
|
+
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',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'pet_model',
|
|
50
|
+
'x-displayName': 'The Pet Model',
|
|
51
|
+
description: '<SchemaDefinition schemaRef="#/components/schemas/Pet" />\n',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'store_model',
|
|
55
|
+
'x-displayName': 'The Order Model',
|
|
56
|
+
description: '<SchemaDefinition schemaRef="#/components/schemas/Order" exampleRef="#/components/examples/Order" showReadOnly={true} showWriteOnly={true} />\n',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
'x-tagGroups': [
|
|
60
|
+
{
|
|
61
|
+
name: 'General',
|
|
62
|
+
tags: ['pet', 'store'],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'User Management',
|
|
66
|
+
tags: ['user'],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Models',
|
|
70
|
+
tags: ['pet_model', 'store_model'],
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
paths: {
|
|
74
|
+
'/pet': {
|
|
75
|
+
parameters: [
|
|
76
|
+
{
|
|
77
|
+
name: 'Accept-Language',
|
|
78
|
+
in: 'header',
|
|
79
|
+
description: 'The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US',
|
|
80
|
+
example: 'en-US',
|
|
81
|
+
required: false,
|
|
82
|
+
schema: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
default: 'en-AU',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'cookieParam',
|
|
89
|
+
in: 'cookie',
|
|
90
|
+
description: 'Some cookie',
|
|
91
|
+
required: true,
|
|
92
|
+
schema: {
|
|
93
|
+
type: 'integer',
|
|
94
|
+
format: 'int64',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
post: {
|
|
99
|
+
tags: ['pet'],
|
|
100
|
+
summary: 'Add a new pet to the store',
|
|
101
|
+
description: 'Add new pet to the store inventory.',
|
|
102
|
+
operationId: 'addPet',
|
|
103
|
+
responses: {
|
|
104
|
+
'405': {
|
|
105
|
+
description: 'Invalid input',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
security: [
|
|
109
|
+
{
|
|
110
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
'x-codeSamples': [
|
|
114
|
+
{
|
|
115
|
+
lang: 'C#',
|
|
116
|
+
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',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
lang: 'PHP',
|
|
120
|
+
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',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
requestBody: {
|
|
124
|
+
$ref: '#/components/requestBodies/Pet',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
put: {
|
|
128
|
+
tags: ['pet'],
|
|
129
|
+
summary: 'Update an existing pet',
|
|
130
|
+
description: '',
|
|
131
|
+
operationId: 'updatePet',
|
|
132
|
+
responses: {
|
|
133
|
+
'400': {
|
|
134
|
+
description: 'Invalid ID supplied',
|
|
135
|
+
},
|
|
136
|
+
'404': {
|
|
137
|
+
description: 'Pet not found',
|
|
138
|
+
},
|
|
139
|
+
'405': {
|
|
140
|
+
description: 'Validation exception',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
security: [
|
|
144
|
+
{
|
|
145
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
'x-codeSamples': [
|
|
149
|
+
{
|
|
150
|
+
lang: 'PHP',
|
|
151
|
+
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',
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
requestBody: {
|
|
155
|
+
$ref: '#/components/requestBodies/Pet',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
'/pet/{petId}': {
|
|
160
|
+
get: {
|
|
161
|
+
tags: ['pet'],
|
|
162
|
+
summary: 'Find pet by ID',
|
|
163
|
+
description: 'Returns a single pet',
|
|
164
|
+
operationId: 'getPetById',
|
|
165
|
+
parameters: [
|
|
166
|
+
{
|
|
167
|
+
name: 'petId',
|
|
168
|
+
in: 'path',
|
|
169
|
+
description: 'ID of pet to return',
|
|
170
|
+
required: true,
|
|
171
|
+
deprecated: true,
|
|
172
|
+
schema: {
|
|
173
|
+
type: 'integer',
|
|
174
|
+
format: 'int64',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
responses: {
|
|
179
|
+
'200': {
|
|
180
|
+
description: 'successful operation',
|
|
181
|
+
content: {
|
|
182
|
+
'application/json': {
|
|
183
|
+
schema: {
|
|
184
|
+
$ref: '#/components/schemas/Pet',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
'application/xml': {
|
|
188
|
+
schema: {
|
|
189
|
+
$ref: '#/components/schemas/Pet',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
'400': {
|
|
195
|
+
description: 'Invalid ID supplied',
|
|
196
|
+
},
|
|
197
|
+
'404': {
|
|
198
|
+
description: 'Pet not found',
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
security: [
|
|
202
|
+
{
|
|
203
|
+
api_key: [],
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
post: {
|
|
208
|
+
tags: ['pet'],
|
|
209
|
+
summary: 'Updates a pet in the store with form data',
|
|
210
|
+
description: '',
|
|
211
|
+
operationId: 'updatePetWithForm',
|
|
212
|
+
parameters: [
|
|
213
|
+
{
|
|
214
|
+
name: 'petId',
|
|
215
|
+
in: 'path',
|
|
216
|
+
description: 'ID of pet that needs to be updated',
|
|
217
|
+
required: true,
|
|
218
|
+
schema: {
|
|
219
|
+
type: 'integer',
|
|
220
|
+
format: 'int64',
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
responses: {
|
|
225
|
+
'405': {
|
|
226
|
+
description: 'Invalid input',
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
security: [
|
|
230
|
+
{
|
|
231
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
requestBody: {
|
|
235
|
+
content: {
|
|
236
|
+
'application/x-www-form-urlencoded': {
|
|
237
|
+
schema: {
|
|
238
|
+
type: 'object',
|
|
239
|
+
properties: {
|
|
240
|
+
name: {
|
|
241
|
+
description: 'Updated name of the pet',
|
|
242
|
+
type: 'string',
|
|
243
|
+
},
|
|
244
|
+
status: {
|
|
245
|
+
description: 'Updated status of the pet',
|
|
246
|
+
type: 'string',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
delete: {
|
|
255
|
+
tags: ['pet'],
|
|
256
|
+
summary: 'Deletes a pet',
|
|
257
|
+
description: '',
|
|
258
|
+
operationId: 'deletePet',
|
|
259
|
+
parameters: [
|
|
260
|
+
{
|
|
261
|
+
name: 'api_key',
|
|
262
|
+
in: 'header',
|
|
263
|
+
required: false,
|
|
264
|
+
schema: {
|
|
265
|
+
type: 'string',
|
|
266
|
+
},
|
|
267
|
+
example: 'Bearer <TOKEN>',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'petId',
|
|
271
|
+
in: 'path',
|
|
272
|
+
description: 'Pet id to delete',
|
|
273
|
+
required: true,
|
|
274
|
+
schema: {
|
|
275
|
+
type: 'integer',
|
|
276
|
+
format: 'int64',
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
responses: {
|
|
281
|
+
'400': {
|
|
282
|
+
description: 'Invalid pet value',
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
security: [
|
|
286
|
+
{
|
|
287
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
'/pet/{petId}/uploadImage': {
|
|
293
|
+
post: {
|
|
294
|
+
tags: ['pet'],
|
|
295
|
+
summary: 'uploads an image',
|
|
296
|
+
description: '',
|
|
297
|
+
operationId: 'uploadFile',
|
|
298
|
+
parameters: [
|
|
299
|
+
{
|
|
300
|
+
name: 'petId',
|
|
301
|
+
in: 'path',
|
|
302
|
+
description: 'ID of pet to update',
|
|
303
|
+
required: true,
|
|
304
|
+
schema: {
|
|
305
|
+
type: 'integer',
|
|
306
|
+
format: 'int64',
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
responses: {
|
|
311
|
+
'200': {
|
|
312
|
+
description: 'successful operation',
|
|
313
|
+
content: {
|
|
314
|
+
'application/json': {
|
|
315
|
+
schema: {
|
|
316
|
+
$ref: '#/components/schemas/ApiResponse',
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
security: [
|
|
323
|
+
{
|
|
324
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
requestBody: {
|
|
328
|
+
content: {
|
|
329
|
+
'application/octet-stream': {
|
|
330
|
+
schema: {
|
|
331
|
+
type: 'string',
|
|
332
|
+
format: 'binary',
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
'/pet/{petId}/uploadImage/{data}': {
|
|
340
|
+
post: {
|
|
341
|
+
tags: ['pet'],
|
|
342
|
+
summary: 'uploads an image',
|
|
343
|
+
description: '',
|
|
344
|
+
operationId: 'uploadFile',
|
|
345
|
+
parameters: [
|
|
346
|
+
{
|
|
347
|
+
name: 'petId',
|
|
348
|
+
in: 'path',
|
|
349
|
+
description: 'ID of pet to update',
|
|
350
|
+
required: true,
|
|
351
|
+
schema: {
|
|
352
|
+
type: 'integer',
|
|
353
|
+
format: 'int64',
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
name: 'data',
|
|
358
|
+
in: 'path',
|
|
359
|
+
description: 'ID of pet to update',
|
|
360
|
+
required: true,
|
|
361
|
+
schema: {
|
|
362
|
+
type: 'integer',
|
|
363
|
+
format: 'int64',
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
responses: {
|
|
368
|
+
'200': {
|
|
369
|
+
description: 'successful operation',
|
|
370
|
+
content: {
|
|
371
|
+
'application/json': {
|
|
372
|
+
schema: {
|
|
373
|
+
$ref: '#/components/schemas/ApiResponse',
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
security: [
|
|
380
|
+
{
|
|
381
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
requestBody: {
|
|
385
|
+
content: {
|
|
386
|
+
'application/octet-stream': {
|
|
387
|
+
schema: {
|
|
388
|
+
type: 'string',
|
|
389
|
+
format: 'binary',
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
'/pet/findByStatus': {
|
|
397
|
+
get: {
|
|
398
|
+
tags: ['pet'],
|
|
399
|
+
summary: 'Finds Pets by status',
|
|
400
|
+
description: 'Multiple status values can be provided with comma separated strings',
|
|
401
|
+
operationId: 'findPetsByStatus',
|
|
402
|
+
parameters: [
|
|
403
|
+
{
|
|
404
|
+
name: 'status',
|
|
405
|
+
in: 'query',
|
|
406
|
+
description: 'Status values that need to be considered for filter',
|
|
407
|
+
required: true,
|
|
408
|
+
style: 'form',
|
|
409
|
+
schema: {
|
|
410
|
+
type: 'array',
|
|
411
|
+
minItems: 1,
|
|
412
|
+
maxItems: 3,
|
|
413
|
+
items: {
|
|
414
|
+
type: 'string',
|
|
415
|
+
enum: ['available', 'pending', 'sold'],
|
|
416
|
+
default: 'available',
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
responses: {
|
|
422
|
+
'200': {
|
|
423
|
+
description: 'successful operation',
|
|
424
|
+
content: {
|
|
425
|
+
'application/json': {
|
|
426
|
+
schema: {
|
|
427
|
+
type: 'array',
|
|
428
|
+
items: {
|
|
429
|
+
$ref: '#/components/schemas/Pet',
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
'application/xml': {
|
|
434
|
+
schema: {
|
|
435
|
+
type: 'array',
|
|
436
|
+
items: {
|
|
437
|
+
$ref: '#/components/schemas/Pet',
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
'400': {
|
|
444
|
+
description: 'Invalid status value',
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
security: [
|
|
448
|
+
{
|
|
449
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
'/pet/findByTags': {
|
|
455
|
+
get: {
|
|
456
|
+
tags: ['pet'],
|
|
457
|
+
summary: 'Finds Pets by tags',
|
|
458
|
+
description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.',
|
|
459
|
+
operationId: 'findPetsByTags',
|
|
460
|
+
deprecated: true,
|
|
461
|
+
parameters: [
|
|
462
|
+
{
|
|
463
|
+
name: 'tags',
|
|
464
|
+
in: 'query',
|
|
465
|
+
description: 'Tags to filter by',
|
|
466
|
+
required: true,
|
|
467
|
+
style: 'form',
|
|
468
|
+
schema: {
|
|
469
|
+
type: 'array',
|
|
470
|
+
items: {
|
|
471
|
+
type: 'string',
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
responses: {
|
|
477
|
+
'200': {
|
|
478
|
+
description: 'successful operation',
|
|
479
|
+
content: {
|
|
480
|
+
'application/json': {
|
|
481
|
+
schema: {
|
|
482
|
+
type: 'array',
|
|
483
|
+
items: {
|
|
484
|
+
$ref: '#/components/schemas/Pet',
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
'application/xml': {
|
|
489
|
+
schema: {
|
|
490
|
+
type: 'array',
|
|
491
|
+
items: {
|
|
492
|
+
$ref: '#/components/schemas/Pet',
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
'400': {
|
|
499
|
+
description: 'Invalid tag value',
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
security: [
|
|
503
|
+
{
|
|
504
|
+
petstore_auth: ['write:pets', 'read:pets'],
|
|
505
|
+
},
|
|
506
|
+
],
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
'/store/inventory': {
|
|
510
|
+
get: {
|
|
511
|
+
tags: ['store'],
|
|
512
|
+
summary: 'Returns pet inventories by status',
|
|
513
|
+
description: 'Returns a map of status codes to quantities',
|
|
514
|
+
operationId: 'getInventory',
|
|
515
|
+
responses: {
|
|
516
|
+
'200': {
|
|
517
|
+
description: 'successful operation',
|
|
518
|
+
content: {
|
|
519
|
+
'application/json': {
|
|
520
|
+
schema: {
|
|
521
|
+
type: 'object',
|
|
522
|
+
additionalProperties: {
|
|
523
|
+
type: 'integer',
|
|
524
|
+
format: 'int32',
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
security: [
|
|
532
|
+
{
|
|
533
|
+
api_key: [],
|
|
534
|
+
},
|
|
535
|
+
],
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
'/store/order': {
|
|
539
|
+
post: {
|
|
540
|
+
tags: ['store'],
|
|
541
|
+
summary: 'Place an order for a pet',
|
|
542
|
+
description: '',
|
|
543
|
+
operationId: 'placeOrder',
|
|
544
|
+
responses: {
|
|
545
|
+
'200': {
|
|
546
|
+
description: 'successful operation',
|
|
547
|
+
content: {
|
|
548
|
+
'application/json': {
|
|
549
|
+
schema: {
|
|
550
|
+
$ref: '#/components/schemas/Order',
|
|
551
|
+
},
|
|
552
|
+
},
|
|
553
|
+
'application/xml': {
|
|
554
|
+
schema: {
|
|
555
|
+
$ref: '#/components/schemas/Order',
|
|
556
|
+
},
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
'400': {
|
|
561
|
+
description: 'Invalid Order',
|
|
562
|
+
content: {
|
|
563
|
+
'application/json': {
|
|
564
|
+
example: {
|
|
565
|
+
status: 400,
|
|
566
|
+
message: 'Invalid Order',
|
|
567
|
+
},
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
requestBody: {
|
|
573
|
+
content: {
|
|
574
|
+
'application/json': {
|
|
575
|
+
schema: {
|
|
576
|
+
$ref: '#/components/schemas/Order',
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
description: 'order placed for purchasing the pet',
|
|
581
|
+
required: true,
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
'/store/order/{orderId}': {
|
|
586
|
+
get: {
|
|
587
|
+
tags: ['store'],
|
|
588
|
+
summary: 'Find purchase order by ID',
|
|
589
|
+
description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions',
|
|
590
|
+
operationId: 'getOrderById',
|
|
591
|
+
parameters: [
|
|
592
|
+
{
|
|
593
|
+
name: 'orderId',
|
|
594
|
+
in: 'path',
|
|
595
|
+
description: 'ID of pet that needs to be fetched',
|
|
596
|
+
required: true,
|
|
597
|
+
schema: {
|
|
598
|
+
type: 'integer',
|
|
599
|
+
format: 'int64',
|
|
600
|
+
minimum: 1,
|
|
601
|
+
maximum: 5,
|
|
602
|
+
},
|
|
603
|
+
},
|
|
604
|
+
],
|
|
605
|
+
responses: {
|
|
606
|
+
'200': {
|
|
607
|
+
description: 'successful operation',
|
|
608
|
+
content: {
|
|
609
|
+
'application/json': {
|
|
610
|
+
schema: {
|
|
611
|
+
$ref: '#/components/schemas/Order',
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
'application/xml': {
|
|
615
|
+
schema: {
|
|
616
|
+
$ref: '#/components/schemas/Order',
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
'400': {
|
|
622
|
+
description: 'Invalid ID supplied',
|
|
623
|
+
},
|
|
624
|
+
'404': {
|
|
625
|
+
description: 'Order not found',
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
delete: {
|
|
630
|
+
tags: ['store'],
|
|
631
|
+
summary: 'Delete purchase order by ID',
|
|
632
|
+
description: 'For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors',
|
|
633
|
+
operationId: 'deleteOrder',
|
|
634
|
+
parameters: [
|
|
635
|
+
{
|
|
636
|
+
name: 'orderId',
|
|
637
|
+
in: 'path',
|
|
638
|
+
description: 'ID of the order that needs to be deleted',
|
|
639
|
+
required: true,
|
|
640
|
+
schema: {
|
|
641
|
+
type: 'string',
|
|
642
|
+
minimum: 1,
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
],
|
|
646
|
+
responses: {
|
|
647
|
+
'400': {
|
|
648
|
+
description: 'Invalid ID supplied',
|
|
649
|
+
},
|
|
650
|
+
'404': {
|
|
651
|
+
description: 'Order not found',
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
'/store/subscribe': {
|
|
657
|
+
post: {
|
|
658
|
+
tags: ['store'],
|
|
659
|
+
summary: 'Subscribe to the Store events',
|
|
660
|
+
description: 'Add subscription for a store events',
|
|
661
|
+
requestBody: {
|
|
662
|
+
content: {
|
|
663
|
+
'application/json': {
|
|
664
|
+
schema: {
|
|
665
|
+
type: 'object',
|
|
666
|
+
properties: {
|
|
667
|
+
callbackUrl: {
|
|
668
|
+
type: 'string',
|
|
669
|
+
format: 'uri',
|
|
670
|
+
description: 'This URL will be called by the server when the desired event will occur',
|
|
671
|
+
example: 'https://myserver.com/send/callback/here',
|
|
672
|
+
},
|
|
673
|
+
eventName: {
|
|
674
|
+
type: 'string',
|
|
675
|
+
description: 'Event name for the subscription',
|
|
676
|
+
enum: ['orderInProgress', 'orderShipped', 'orderDelivered'],
|
|
677
|
+
example: 'orderInProgress',
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
required: ['callbackUrl', 'eventName'],
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
},
|
|
684
|
+
},
|
|
685
|
+
responses: {
|
|
686
|
+
'201': {
|
|
687
|
+
description: 'Subscription added',
|
|
688
|
+
content: {
|
|
689
|
+
'application/json': {
|
|
690
|
+
schema: {
|
|
691
|
+
type: 'object',
|
|
692
|
+
properties: {
|
|
693
|
+
subscriptionId: {
|
|
694
|
+
type: 'string',
|
|
695
|
+
example: 'AAA-123-BBB-456',
|
|
696
|
+
},
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
},
|
|
703
|
+
callbacks: {
|
|
704
|
+
orderInProgress: {
|
|
705
|
+
'{$request.body#/callbackUrl}?event={$request.body#/eventName}': {
|
|
706
|
+
servers: [
|
|
707
|
+
{
|
|
708
|
+
url: '//callback-url.path-level/v1',
|
|
709
|
+
description: 'Path level server 1',
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
url: '//callback-url.path-level/v2',
|
|
713
|
+
description: 'Path level server 2',
|
|
714
|
+
},
|
|
715
|
+
],
|
|
716
|
+
post: {
|
|
717
|
+
summary: 'Order in Progress (Summary)',
|
|
718
|
+
description: 'A callback triggered every time an Order is updated status to "inProgress" (Description)',
|
|
719
|
+
externalDocs: {
|
|
720
|
+
description: 'Find out more',
|
|
721
|
+
url: 'https://more-details.com/demo',
|
|
722
|
+
},
|
|
723
|
+
requestBody: {
|
|
724
|
+
content: {
|
|
725
|
+
'application/json': {
|
|
726
|
+
schema: {
|
|
727
|
+
type: 'object',
|
|
728
|
+
properties: {
|
|
729
|
+
orderId: {
|
|
730
|
+
type: 'string',
|
|
731
|
+
example: '123',
|
|
732
|
+
},
|
|
733
|
+
timestamp: {
|
|
734
|
+
type: 'string',
|
|
735
|
+
format: 'date-time',
|
|
736
|
+
example: '2018-10-19T16:46:45Z',
|
|
737
|
+
},
|
|
738
|
+
status: {
|
|
739
|
+
type: 'string',
|
|
740
|
+
example: 'inProgress',
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
'application/xml': {
|
|
746
|
+
schema: {
|
|
747
|
+
type: 'object',
|
|
748
|
+
properties: {
|
|
749
|
+
orderId: {
|
|
750
|
+
type: 'string',
|
|
751
|
+
example: '123',
|
|
752
|
+
},
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
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',
|
|
756
|
+
},
|
|
757
|
+
},
|
|
758
|
+
},
|
|
759
|
+
responses: {
|
|
760
|
+
'200': {
|
|
761
|
+
description: 'Callback successfully processed and no retries will be performed',
|
|
762
|
+
content: {
|
|
763
|
+
'application/json': {
|
|
764
|
+
schema: {
|
|
765
|
+
type: 'object',
|
|
766
|
+
properties: {
|
|
767
|
+
someProp: {
|
|
768
|
+
type: 'string',
|
|
769
|
+
example: '123',
|
|
770
|
+
},
|
|
771
|
+
},
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
},
|
|
775
|
+
},
|
|
776
|
+
'299': {
|
|
777
|
+
description: 'Response for cancelling subscription',
|
|
778
|
+
},
|
|
779
|
+
'500': {
|
|
780
|
+
description: 'Callback processing failed and retries will be performed',
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
'x-codeSamples': [
|
|
784
|
+
{
|
|
785
|
+
lang: 'C#',
|
|
786
|
+
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',
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
lang: 'PHP',
|
|
790
|
+
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',
|
|
791
|
+
},
|
|
792
|
+
],
|
|
793
|
+
},
|
|
794
|
+
put: {
|
|
795
|
+
description: 'Order in Progress (Only Description)',
|
|
796
|
+
servers: [
|
|
797
|
+
{
|
|
798
|
+
url: '//callback-url.operation-level/v1',
|
|
799
|
+
description: 'Operation level server 1 (Operation override)',
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
url: '//callback-url.operation-level/v2',
|
|
803
|
+
description: 'Operation level server 2 (Operation override)',
|
|
804
|
+
},
|
|
805
|
+
],
|
|
806
|
+
requestBody: {
|
|
807
|
+
content: {
|
|
808
|
+
'application/json': {
|
|
809
|
+
schema: {
|
|
810
|
+
type: 'object',
|
|
811
|
+
properties: {
|
|
812
|
+
orderId: {
|
|
813
|
+
type: 'string',
|
|
814
|
+
example: '123',
|
|
815
|
+
},
|
|
816
|
+
timestamp: {
|
|
817
|
+
type: 'string',
|
|
818
|
+
format: 'date-time',
|
|
819
|
+
example: '2018-10-19T16:46:45Z',
|
|
820
|
+
},
|
|
821
|
+
status: {
|
|
822
|
+
type: 'string',
|
|
823
|
+
example: 'inProgress',
|
|
824
|
+
},
|
|
825
|
+
},
|
|
826
|
+
},
|
|
827
|
+
},
|
|
828
|
+
'application/xml': {
|
|
829
|
+
schema: {
|
|
830
|
+
type: 'object',
|
|
831
|
+
properties: {
|
|
832
|
+
orderId: {
|
|
833
|
+
type: 'string',
|
|
834
|
+
example: '123',
|
|
835
|
+
},
|
|
836
|
+
},
|
|
837
|
+
},
|
|
838
|
+
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',
|
|
839
|
+
},
|
|
840
|
+
},
|
|
841
|
+
},
|
|
842
|
+
responses: {
|
|
843
|
+
'200': {
|
|
844
|
+
description: 'Callback successfully processed and no retries will be performed',
|
|
845
|
+
content: {
|
|
846
|
+
'application/json': {
|
|
847
|
+
schema: {
|
|
848
|
+
type: 'object',
|
|
849
|
+
properties: {
|
|
850
|
+
someProp: {
|
|
851
|
+
type: 'string',
|
|
852
|
+
example: '123',
|
|
853
|
+
},
|
|
854
|
+
},
|
|
855
|
+
},
|
|
856
|
+
},
|
|
857
|
+
},
|
|
858
|
+
},
|
|
859
|
+
},
|
|
860
|
+
},
|
|
861
|
+
},
|
|
862
|
+
},
|
|
863
|
+
orderShipped: {
|
|
864
|
+
'{$request.body#/callbackUrl}?event={$request.body#/eventName}': {
|
|
865
|
+
post: {
|
|
866
|
+
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',
|
|
867
|
+
requestBody: {
|
|
868
|
+
content: {
|
|
869
|
+
'application/json': {
|
|
870
|
+
schema: {
|
|
871
|
+
type: 'object',
|
|
872
|
+
properties: {
|
|
873
|
+
orderId: {
|
|
874
|
+
type: 'string',
|
|
875
|
+
example: '123',
|
|
876
|
+
},
|
|
877
|
+
timestamp: {
|
|
878
|
+
type: 'string',
|
|
879
|
+
format: 'date-time',
|
|
880
|
+
example: '2018-10-19T16:46:45Z',
|
|
881
|
+
},
|
|
882
|
+
estimatedDeliveryDate: {
|
|
883
|
+
type: 'string',
|
|
884
|
+
format: 'date-time',
|
|
885
|
+
example: '2018-11-11T16:00:00Z',
|
|
886
|
+
},
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
},
|
|
890
|
+
},
|
|
891
|
+
},
|
|
892
|
+
responses: {
|
|
893
|
+
'200': {
|
|
894
|
+
description: 'Callback successfully processed and no retries will be performed',
|
|
895
|
+
},
|
|
896
|
+
},
|
|
897
|
+
},
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
orderDelivered: {
|
|
901
|
+
'http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}': {
|
|
902
|
+
post: {
|
|
903
|
+
deprecated: true,
|
|
904
|
+
summary: 'Order delivered',
|
|
905
|
+
description: 'A callback triggered every time an Order is delivered to the recipient',
|
|
906
|
+
requestBody: {
|
|
907
|
+
content: {
|
|
908
|
+
'application/json': {
|
|
909
|
+
schema: {
|
|
910
|
+
type: 'object',
|
|
911
|
+
properties: {
|
|
912
|
+
orderId: {
|
|
913
|
+
type: 'string',
|
|
914
|
+
example: '123',
|
|
915
|
+
},
|
|
916
|
+
timestamp: {
|
|
917
|
+
type: 'string',
|
|
918
|
+
format: 'date-time',
|
|
919
|
+
example: '2018-10-19T16:46:45Z',
|
|
920
|
+
},
|
|
921
|
+
},
|
|
922
|
+
},
|
|
923
|
+
},
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
responses: {
|
|
927
|
+
'200': {
|
|
928
|
+
description: 'Callback successfully processed and no retries will be performed',
|
|
929
|
+
},
|
|
930
|
+
},
|
|
931
|
+
},
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
},
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
'/user': {
|
|
938
|
+
post: {
|
|
939
|
+
tags: ['user'],
|
|
940
|
+
summary: 'Create user',
|
|
941
|
+
description: 'This can only be done by the logged in user.',
|
|
942
|
+
operationId: 'createUser',
|
|
943
|
+
responses: {
|
|
944
|
+
default: {
|
|
945
|
+
description: 'successful operation',
|
|
946
|
+
},
|
|
947
|
+
},
|
|
948
|
+
requestBody: {
|
|
949
|
+
content: {
|
|
950
|
+
'application/json': {
|
|
951
|
+
schema: {
|
|
952
|
+
$ref: '#/components/schemas/User',
|
|
953
|
+
},
|
|
954
|
+
},
|
|
955
|
+
},
|
|
956
|
+
description: 'Created user object',
|
|
957
|
+
required: true,
|
|
958
|
+
},
|
|
959
|
+
},
|
|
960
|
+
},
|
|
961
|
+
'/user/{username}': {
|
|
962
|
+
get: {
|
|
963
|
+
tags: ['user'],
|
|
964
|
+
summary: 'Get user by user name',
|
|
965
|
+
description: '',
|
|
966
|
+
operationId: 'getUserByName',
|
|
967
|
+
parameters: [
|
|
968
|
+
{
|
|
969
|
+
name: 'username',
|
|
970
|
+
in: 'path',
|
|
971
|
+
description: 'The name that needs to be fetched. Use user1 for testing. ',
|
|
972
|
+
required: true,
|
|
973
|
+
schema: {
|
|
974
|
+
type: 'string',
|
|
975
|
+
},
|
|
976
|
+
},
|
|
977
|
+
],
|
|
978
|
+
responses: {
|
|
979
|
+
'200': {
|
|
980
|
+
description: 'successful operation',
|
|
981
|
+
content: {
|
|
982
|
+
'application/json': {
|
|
983
|
+
schema: {
|
|
984
|
+
$ref: '#/components/schemas/User',
|
|
985
|
+
},
|
|
986
|
+
},
|
|
987
|
+
'application/xml': {
|
|
988
|
+
schema: {
|
|
989
|
+
$ref: '#/components/schemas/User',
|
|
990
|
+
},
|
|
991
|
+
},
|
|
992
|
+
},
|
|
993
|
+
},
|
|
994
|
+
'400': {
|
|
995
|
+
description: 'Invalid username supplied',
|
|
996
|
+
},
|
|
997
|
+
'404': {
|
|
998
|
+
description: 'User not found',
|
|
999
|
+
},
|
|
1000
|
+
},
|
|
1001
|
+
},
|
|
1002
|
+
put: {
|
|
1003
|
+
tags: ['user'],
|
|
1004
|
+
summary: 'Updated user',
|
|
1005
|
+
description: 'This can only be done by the logged in user.',
|
|
1006
|
+
operationId: 'updateUser',
|
|
1007
|
+
parameters: [
|
|
1008
|
+
{
|
|
1009
|
+
name: 'username',
|
|
1010
|
+
in: 'path',
|
|
1011
|
+
description: 'name that need to be deleted',
|
|
1012
|
+
required: true,
|
|
1013
|
+
schema: {
|
|
1014
|
+
type: 'string',
|
|
1015
|
+
},
|
|
1016
|
+
},
|
|
1017
|
+
],
|
|
1018
|
+
responses: {
|
|
1019
|
+
'400': {
|
|
1020
|
+
description: 'Invalid user supplied',
|
|
1021
|
+
},
|
|
1022
|
+
'404': {
|
|
1023
|
+
description: 'User not found',
|
|
1024
|
+
},
|
|
1025
|
+
},
|
|
1026
|
+
requestBody: {
|
|
1027
|
+
content: {
|
|
1028
|
+
'application/json': {
|
|
1029
|
+
schema: {
|
|
1030
|
+
$ref: '#/components/schemas/User',
|
|
1031
|
+
},
|
|
1032
|
+
},
|
|
1033
|
+
},
|
|
1034
|
+
description: 'Updated user object',
|
|
1035
|
+
required: true,
|
|
1036
|
+
},
|
|
1037
|
+
},
|
|
1038
|
+
delete: {
|
|
1039
|
+
tags: ['user'],
|
|
1040
|
+
summary: 'Delete user',
|
|
1041
|
+
description: 'This can only be done by the logged in user.',
|
|
1042
|
+
operationId: 'deleteUser',
|
|
1043
|
+
parameters: [
|
|
1044
|
+
{
|
|
1045
|
+
name: 'username',
|
|
1046
|
+
in: 'path',
|
|
1047
|
+
description: 'The name that needs to be deleted',
|
|
1048
|
+
required: true,
|
|
1049
|
+
schema: {
|
|
1050
|
+
type: 'string',
|
|
1051
|
+
},
|
|
1052
|
+
},
|
|
1053
|
+
],
|
|
1054
|
+
responses: {
|
|
1055
|
+
'400': {
|
|
1056
|
+
description: 'Invalid username supplied',
|
|
1057
|
+
},
|
|
1058
|
+
'404': {
|
|
1059
|
+
description: 'User not found',
|
|
1060
|
+
},
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
},
|
|
1064
|
+
'/user/createWithArray': {
|
|
1065
|
+
post: {
|
|
1066
|
+
tags: ['user'],
|
|
1067
|
+
summary: 'Creates list of users with given input array',
|
|
1068
|
+
description: '',
|
|
1069
|
+
operationId: 'createUsersWithArrayInput',
|
|
1070
|
+
responses: {
|
|
1071
|
+
default: {
|
|
1072
|
+
description: 'successful operation',
|
|
1073
|
+
},
|
|
1074
|
+
},
|
|
1075
|
+
requestBody: {
|
|
1076
|
+
$ref: '#/components/requestBodies/UserArray',
|
|
1077
|
+
},
|
|
1078
|
+
},
|
|
1079
|
+
},
|
|
1080
|
+
'/user/createWithList': {
|
|
1081
|
+
post: {
|
|
1082
|
+
tags: ['user'],
|
|
1083
|
+
summary: 'Creates list of users with given input array',
|
|
1084
|
+
description: '',
|
|
1085
|
+
operationId: 'createUsersWithListInput',
|
|
1086
|
+
responses: {
|
|
1087
|
+
default: {
|
|
1088
|
+
description: 'successful operation',
|
|
1089
|
+
},
|
|
1090
|
+
},
|
|
1091
|
+
requestBody: {
|
|
1092
|
+
$ref: '#/components/requestBodies/UserArray',
|
|
1093
|
+
},
|
|
1094
|
+
},
|
|
1095
|
+
},
|
|
1096
|
+
'/user/login': {
|
|
1097
|
+
get: {
|
|
1098
|
+
tags: ['user'],
|
|
1099
|
+
summary: 'Logs user into the system',
|
|
1100
|
+
description: '',
|
|
1101
|
+
operationId: 'loginUser',
|
|
1102
|
+
parameters: [
|
|
1103
|
+
{
|
|
1104
|
+
name: 'username',
|
|
1105
|
+
in: 'query',
|
|
1106
|
+
description: 'The user name for login',
|
|
1107
|
+
required: true,
|
|
1108
|
+
schema: {
|
|
1109
|
+
type: 'string',
|
|
1110
|
+
},
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
name: 'password',
|
|
1114
|
+
in: 'query',
|
|
1115
|
+
description: 'The password for login in clear text',
|
|
1116
|
+
required: true,
|
|
1117
|
+
schema: {
|
|
1118
|
+
type: 'string',
|
|
1119
|
+
},
|
|
1120
|
+
},
|
|
1121
|
+
],
|
|
1122
|
+
responses: {
|
|
1123
|
+
'200': {
|
|
1124
|
+
description: 'successful operation',
|
|
1125
|
+
headers: {
|
|
1126
|
+
'X-Rate-Limit': {
|
|
1127
|
+
description: 'calls per hour allowed by the user',
|
|
1128
|
+
schema: {
|
|
1129
|
+
type: 'integer',
|
|
1130
|
+
format: 'int32',
|
|
1131
|
+
},
|
|
1132
|
+
},
|
|
1133
|
+
'X-Expires-After': {
|
|
1134
|
+
description: 'date in UTC when token expires',
|
|
1135
|
+
schema: {
|
|
1136
|
+
type: 'string',
|
|
1137
|
+
format: 'date-time',
|
|
1138
|
+
},
|
|
1139
|
+
},
|
|
1140
|
+
},
|
|
1141
|
+
content: {
|
|
1142
|
+
'application/json': {
|
|
1143
|
+
schema: {
|
|
1144
|
+
type: 'string',
|
|
1145
|
+
},
|
|
1146
|
+
examples: {
|
|
1147
|
+
response: {
|
|
1148
|
+
value: 'OK',
|
|
1149
|
+
},
|
|
1150
|
+
},
|
|
1151
|
+
},
|
|
1152
|
+
'application/xml': {
|
|
1153
|
+
schema: {
|
|
1154
|
+
type: 'string',
|
|
1155
|
+
},
|
|
1156
|
+
examples: {
|
|
1157
|
+
response: {
|
|
1158
|
+
value: '<Message> OK </Message>',
|
|
1159
|
+
},
|
|
1160
|
+
},
|
|
1161
|
+
},
|
|
1162
|
+
'text/plain': {
|
|
1163
|
+
examples: {
|
|
1164
|
+
response: {
|
|
1165
|
+
value: 'OK',
|
|
1166
|
+
},
|
|
1167
|
+
},
|
|
1168
|
+
},
|
|
1169
|
+
},
|
|
1170
|
+
},
|
|
1171
|
+
'400': {
|
|
1172
|
+
description: 'Invalid username/password supplied',
|
|
1173
|
+
},
|
|
1174
|
+
},
|
|
1175
|
+
},
|
|
1176
|
+
},
|
|
1177
|
+
'/user/logout': {
|
|
1178
|
+
get: {
|
|
1179
|
+
tags: ['user'],
|
|
1180
|
+
summary: 'Logs out current logged in user session',
|
|
1181
|
+
description: '',
|
|
1182
|
+
operationId: 'logoutUser',
|
|
1183
|
+
responses: {
|
|
1184
|
+
default: {
|
|
1185
|
+
description: 'successful operation',
|
|
1186
|
+
},
|
|
1187
|
+
},
|
|
1188
|
+
},
|
|
1189
|
+
},
|
|
1190
|
+
},
|
|
1191
|
+
components: {
|
|
1192
|
+
schemas: {
|
|
1193
|
+
ApiResponse: {
|
|
1194
|
+
type: 'object',
|
|
1195
|
+
properties: {
|
|
1196
|
+
code: {
|
|
1197
|
+
type: 'integer',
|
|
1198
|
+
format: 'int32',
|
|
1199
|
+
},
|
|
1200
|
+
type: {
|
|
1201
|
+
type: 'string',
|
|
1202
|
+
},
|
|
1203
|
+
message: {
|
|
1204
|
+
type: 'string',
|
|
1205
|
+
},
|
|
1206
|
+
},
|
|
1207
|
+
},
|
|
1208
|
+
Cat: {
|
|
1209
|
+
description: 'A representation of a cat',
|
|
1210
|
+
allOf: [
|
|
1211
|
+
{
|
|
1212
|
+
$ref: '#/components/schemas/Pet',
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
type: 'object',
|
|
1216
|
+
properties: {
|
|
1217
|
+
huntingSkill: {
|
|
1218
|
+
type: 'string',
|
|
1219
|
+
description: 'The measured skill for hunting',
|
|
1220
|
+
default: 'lazy',
|
|
1221
|
+
example: 'adventurous',
|
|
1222
|
+
enum: ['clueless', 'lazy', 'adventurous', 'aggressive'],
|
|
1223
|
+
},
|
|
1224
|
+
},
|
|
1225
|
+
required: ['huntingSkill'],
|
|
1226
|
+
},
|
|
1227
|
+
],
|
|
1228
|
+
},
|
|
1229
|
+
Category: {
|
|
1230
|
+
type: 'object',
|
|
1231
|
+
properties: {
|
|
1232
|
+
id: {
|
|
1233
|
+
description: 'Category ID',
|
|
1234
|
+
allOf: [
|
|
1235
|
+
{
|
|
1236
|
+
$ref: '#/components/schemas/Id',
|
|
1237
|
+
},
|
|
1238
|
+
],
|
|
1239
|
+
},
|
|
1240
|
+
name: {
|
|
1241
|
+
description: 'Category name',
|
|
1242
|
+
type: 'string',
|
|
1243
|
+
minLength: 1,
|
|
1244
|
+
},
|
|
1245
|
+
sub: {
|
|
1246
|
+
description: 'Test Sub Category',
|
|
1247
|
+
type: 'object',
|
|
1248
|
+
properties: {
|
|
1249
|
+
prop1: {
|
|
1250
|
+
type: 'string',
|
|
1251
|
+
description: 'Dumb Property',
|
|
1252
|
+
},
|
|
1253
|
+
},
|
|
1254
|
+
},
|
|
1255
|
+
},
|
|
1256
|
+
xml: {
|
|
1257
|
+
name: 'Category',
|
|
1258
|
+
},
|
|
1259
|
+
},
|
|
1260
|
+
Dog: {
|
|
1261
|
+
description: 'A representation of a dog',
|
|
1262
|
+
allOf: [
|
|
1263
|
+
{
|
|
1264
|
+
$ref: '#/components/schemas/Pet',
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
type: 'object',
|
|
1268
|
+
properties: {
|
|
1269
|
+
packSize: {
|
|
1270
|
+
type: 'integer',
|
|
1271
|
+
format: 'int32',
|
|
1272
|
+
description: 'The size of the pack the dog is from',
|
|
1273
|
+
default: 1,
|
|
1274
|
+
minimum: 1,
|
|
1275
|
+
},
|
|
1276
|
+
},
|
|
1277
|
+
required: ['packSize'],
|
|
1278
|
+
},
|
|
1279
|
+
],
|
|
1280
|
+
},
|
|
1281
|
+
HoneyBee: {
|
|
1282
|
+
description: 'A representation of a honey bee',
|
|
1283
|
+
allOf: [
|
|
1284
|
+
{
|
|
1285
|
+
$ref: '#/components/schemas/Pet',
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
type: 'object',
|
|
1289
|
+
properties: {
|
|
1290
|
+
honeyPerDay: {
|
|
1291
|
+
type: 'number',
|
|
1292
|
+
description: 'Average amount of honey produced per day in ounces',
|
|
1293
|
+
example: 3.14,
|
|
1294
|
+
multipleOf: 0.01,
|
|
1295
|
+
},
|
|
1296
|
+
},
|
|
1297
|
+
required: ['honeyPerDay'],
|
|
1298
|
+
},
|
|
1299
|
+
],
|
|
1300
|
+
},
|
|
1301
|
+
Id: {
|
|
1302
|
+
type: 'integer',
|
|
1303
|
+
format: 'int64',
|
|
1304
|
+
readOnly: true,
|
|
1305
|
+
},
|
|
1306
|
+
Order: {
|
|
1307
|
+
type: 'object',
|
|
1308
|
+
properties: {
|
|
1309
|
+
id: {
|
|
1310
|
+
description: 'Order ID',
|
|
1311
|
+
allOf: [
|
|
1312
|
+
{
|
|
1313
|
+
$ref: '#/components/schemas/Id',
|
|
1314
|
+
},
|
|
1315
|
+
],
|
|
1316
|
+
},
|
|
1317
|
+
petId: {
|
|
1318
|
+
description: 'Pet ID',
|
|
1319
|
+
allOf: [
|
|
1320
|
+
{
|
|
1321
|
+
$ref: '#/components/schemas/Id',
|
|
1322
|
+
},
|
|
1323
|
+
],
|
|
1324
|
+
},
|
|
1325
|
+
quantity: {
|
|
1326
|
+
type: 'integer',
|
|
1327
|
+
format: 'int32',
|
|
1328
|
+
minimum: 1,
|
|
1329
|
+
default: 1,
|
|
1330
|
+
},
|
|
1331
|
+
shipDate: {
|
|
1332
|
+
description: 'Estimated ship date',
|
|
1333
|
+
type: 'string',
|
|
1334
|
+
format: 'date-time',
|
|
1335
|
+
},
|
|
1336
|
+
status: {
|
|
1337
|
+
type: 'string',
|
|
1338
|
+
description: 'Order Status',
|
|
1339
|
+
enum: ['placed', 'approved', 'delivered'],
|
|
1340
|
+
},
|
|
1341
|
+
complete: {
|
|
1342
|
+
description: 'Indicates whenever order was completed or not',
|
|
1343
|
+
type: 'boolean',
|
|
1344
|
+
default: false,
|
|
1345
|
+
readOnly: true,
|
|
1346
|
+
},
|
|
1347
|
+
requestId: {
|
|
1348
|
+
description: 'Unique Request Id',
|
|
1349
|
+
type: 'string',
|
|
1350
|
+
writeOnly: true,
|
|
1351
|
+
},
|
|
1352
|
+
},
|
|
1353
|
+
xml: {
|
|
1354
|
+
name: 'Order',
|
|
1355
|
+
},
|
|
1356
|
+
},
|
|
1357
|
+
Pet: {
|
|
1358
|
+
type: 'object',
|
|
1359
|
+
required: ['name', 'photoUrls'],
|
|
1360
|
+
discriminator: {
|
|
1361
|
+
propertyName: 'petType',
|
|
1362
|
+
mapping: {
|
|
1363
|
+
cat: '#/components/schemas/Cat',
|
|
1364
|
+
dog: '#/components/schemas/Dog',
|
|
1365
|
+
bee: '#/components/schemas/HoneyBee',
|
|
1366
|
+
},
|
|
1367
|
+
},
|
|
1368
|
+
properties: {
|
|
1369
|
+
id: {
|
|
1370
|
+
externalDocs: {
|
|
1371
|
+
description: 'Find more info here',
|
|
1372
|
+
url: 'https://example.com',
|
|
1373
|
+
},
|
|
1374
|
+
description: 'Pet ID',
|
|
1375
|
+
allOf: [
|
|
1376
|
+
{
|
|
1377
|
+
$ref: '#/components/schemas/Id',
|
|
1378
|
+
},
|
|
1379
|
+
],
|
|
1380
|
+
},
|
|
1381
|
+
category: {
|
|
1382
|
+
description: 'Categories this pet belongs to',
|
|
1383
|
+
allOf: [
|
|
1384
|
+
{
|
|
1385
|
+
$ref: '#/components/schemas/Category',
|
|
1386
|
+
},
|
|
1387
|
+
],
|
|
1388
|
+
},
|
|
1389
|
+
name: {
|
|
1390
|
+
description: 'The name given to a pet',
|
|
1391
|
+
type: 'string',
|
|
1392
|
+
example: 'Guru',
|
|
1393
|
+
},
|
|
1394
|
+
photoUrls: {
|
|
1395
|
+
description: 'The list of URL to a cute photos featuring pet',
|
|
1396
|
+
type: 'array',
|
|
1397
|
+
maxItems: 20,
|
|
1398
|
+
xml: {
|
|
1399
|
+
name: 'photoUrl',
|
|
1400
|
+
wrapped: true,
|
|
1401
|
+
},
|
|
1402
|
+
items: {
|
|
1403
|
+
type: 'string',
|
|
1404
|
+
format: 'url',
|
|
1405
|
+
},
|
|
1406
|
+
},
|
|
1407
|
+
friend: {
|
|
1408
|
+
allOf: [
|
|
1409
|
+
{
|
|
1410
|
+
$ref: '#/components/schemas/Pet',
|
|
1411
|
+
},
|
|
1412
|
+
],
|
|
1413
|
+
},
|
|
1414
|
+
tags: {
|
|
1415
|
+
description: 'Tags attached to the pet',
|
|
1416
|
+
type: 'array',
|
|
1417
|
+
minItems: 1,
|
|
1418
|
+
xml: {
|
|
1419
|
+
name: 'tag',
|
|
1420
|
+
wrapped: true,
|
|
1421
|
+
},
|
|
1422
|
+
items: {
|
|
1423
|
+
$ref: '#/components/schemas/Tag',
|
|
1424
|
+
},
|
|
1425
|
+
},
|
|
1426
|
+
status: {
|
|
1427
|
+
type: 'string',
|
|
1428
|
+
description: 'Pet status in the store',
|
|
1429
|
+
enum: ['available', 'pending', 'sold'],
|
|
1430
|
+
},
|
|
1431
|
+
petType: {
|
|
1432
|
+
description: 'Type of a pet',
|
|
1433
|
+
type: 'string',
|
|
1434
|
+
},
|
|
1435
|
+
},
|
|
1436
|
+
xml: {
|
|
1437
|
+
name: 'Pet',
|
|
1438
|
+
},
|
|
1439
|
+
},
|
|
1440
|
+
Tag: {
|
|
1441
|
+
type: 'object',
|
|
1442
|
+
properties: {
|
|
1443
|
+
id: {
|
|
1444
|
+
description: 'Tag ID',
|
|
1445
|
+
allOf: [
|
|
1446
|
+
{
|
|
1447
|
+
$ref: '#/components/schemas/Id',
|
|
1448
|
+
},
|
|
1449
|
+
],
|
|
1450
|
+
},
|
|
1451
|
+
name: {
|
|
1452
|
+
description: 'Tag name',
|
|
1453
|
+
type: 'string',
|
|
1454
|
+
minLength: 1,
|
|
1455
|
+
},
|
|
1456
|
+
},
|
|
1457
|
+
xml: {
|
|
1458
|
+
name: 'Tag',
|
|
1459
|
+
},
|
|
1460
|
+
},
|
|
1461
|
+
User: {
|
|
1462
|
+
type: 'object',
|
|
1463
|
+
properties: {
|
|
1464
|
+
id: {
|
|
1465
|
+
$ref: '#/components/schemas/Id',
|
|
1466
|
+
},
|
|
1467
|
+
pet: {
|
|
1468
|
+
oneOf: [
|
|
1469
|
+
{
|
|
1470
|
+
$ref: '#/components/schemas/Pet',
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
$ref: '#/components/schemas/Tag',
|
|
1474
|
+
},
|
|
1475
|
+
],
|
|
1476
|
+
},
|
|
1477
|
+
username: {
|
|
1478
|
+
description: 'User supplied username',
|
|
1479
|
+
type: 'string',
|
|
1480
|
+
minLength: 4,
|
|
1481
|
+
example: 'John78',
|
|
1482
|
+
},
|
|
1483
|
+
firstName: {
|
|
1484
|
+
description: 'User first name',
|
|
1485
|
+
type: 'string',
|
|
1486
|
+
minLength: 1,
|
|
1487
|
+
example: 'John',
|
|
1488
|
+
},
|
|
1489
|
+
lastName: {
|
|
1490
|
+
description: 'User last name',
|
|
1491
|
+
type: 'string',
|
|
1492
|
+
minLength: 1,
|
|
1493
|
+
example: 'Smith',
|
|
1494
|
+
},
|
|
1495
|
+
email: {
|
|
1496
|
+
description: 'User email address',
|
|
1497
|
+
type: 'string',
|
|
1498
|
+
format: 'email',
|
|
1499
|
+
example: 'john.smith@example.com',
|
|
1500
|
+
},
|
|
1501
|
+
password: {
|
|
1502
|
+
type: 'string',
|
|
1503
|
+
description: 'User password, MUST contain a mix of upper and lower case letters, as well as digits',
|
|
1504
|
+
format: 'password',
|
|
1505
|
+
minLength: 8,
|
|
1506
|
+
pattern: '/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/',
|
|
1507
|
+
example: 'drowssaP123',
|
|
1508
|
+
},
|
|
1509
|
+
phone: {
|
|
1510
|
+
description: 'User phone number in international format',
|
|
1511
|
+
type: 'string',
|
|
1512
|
+
pattern: '/^\\+(?:[0-9]-?){6,14}[0-9]$/',
|
|
1513
|
+
example: '+1-202-555-0192',
|
|
1514
|
+
},
|
|
1515
|
+
userStatus: {
|
|
1516
|
+
description: 'User status',
|
|
1517
|
+
type: 'integer',
|
|
1518
|
+
format: 'int32',
|
|
1519
|
+
},
|
|
1520
|
+
},
|
|
1521
|
+
xml: {
|
|
1522
|
+
name: 'User',
|
|
1523
|
+
},
|
|
1524
|
+
},
|
|
1525
|
+
},
|
|
1526
|
+
requestBodies: {
|
|
1527
|
+
Pet: {
|
|
1528
|
+
content: {
|
|
1529
|
+
'application/json': {
|
|
1530
|
+
schema: {
|
|
1531
|
+
allOf: [
|
|
1532
|
+
{
|
|
1533
|
+
description: 'My Pet',
|
|
1534
|
+
title: 'Pettie',
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
$ref: '#/components/schemas/Pet',
|
|
1538
|
+
},
|
|
1539
|
+
],
|
|
1540
|
+
},
|
|
1541
|
+
},
|
|
1542
|
+
'application/xml': {
|
|
1543
|
+
schema: {
|
|
1544
|
+
type: 'object',
|
|
1545
|
+
properties: {
|
|
1546
|
+
name: {
|
|
1547
|
+
type: 'string',
|
|
1548
|
+
description: 'hooray',
|
|
1549
|
+
},
|
|
1550
|
+
},
|
|
1551
|
+
},
|
|
1552
|
+
},
|
|
1553
|
+
},
|
|
1554
|
+
description: 'Pet object that needs to be added to the store',
|
|
1555
|
+
required: true,
|
|
1556
|
+
},
|
|
1557
|
+
UserArray: {
|
|
1558
|
+
content: {
|
|
1559
|
+
'application/json': {
|
|
1560
|
+
schema: {
|
|
1561
|
+
type: 'array',
|
|
1562
|
+
items: {
|
|
1563
|
+
$ref: '#/components/schemas/User',
|
|
1564
|
+
},
|
|
1565
|
+
},
|
|
1566
|
+
},
|
|
1567
|
+
},
|
|
1568
|
+
description: 'List of user object',
|
|
1569
|
+
required: true,
|
|
1570
|
+
},
|
|
1571
|
+
},
|
|
1572
|
+
securitySchemes: {
|
|
1573
|
+
petstore_auth: {
|
|
1574
|
+
description: 'Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n',
|
|
1575
|
+
type: 'oauth2',
|
|
1576
|
+
flows: {
|
|
1577
|
+
clientCredentials: {
|
|
1578
|
+
tokenUrl: 'http://petstore.swagger.io/api/oauth/dialog',
|
|
1579
|
+
scopes: {
|
|
1580
|
+
'write:pets': 'modify pets in your account',
|
|
1581
|
+
'read:pets': 'read your pets',
|
|
1582
|
+
},
|
|
1583
|
+
},
|
|
1584
|
+
},
|
|
1585
|
+
},
|
|
1586
|
+
api_key: {
|
|
1587
|
+
description: 'For this sample, you can use the api key `special-key` to test the authorization filters.\n',
|
|
1588
|
+
type: 'apiKey',
|
|
1589
|
+
name: 'api_key',
|
|
1590
|
+
in: 'header',
|
|
1591
|
+
},
|
|
1592
|
+
},
|
|
1593
|
+
examples: {
|
|
1594
|
+
Order: {
|
|
1595
|
+
value: {
|
|
1596
|
+
quantity: 1,
|
|
1597
|
+
shipDate: '2018-10-19T16:46:45Z',
|
|
1598
|
+
status: 'placed',
|
|
1599
|
+
complete: false,
|
|
1600
|
+
},
|
|
1601
|
+
},
|
|
1602
|
+
},
|
|
1603
|
+
},
|
|
1604
|
+
'x-webhooks': {
|
|
1605
|
+
newPet: {
|
|
1606
|
+
post: {
|
|
1607
|
+
summary: 'New pet',
|
|
1608
|
+
description: 'Information about a new pet in the systems',
|
|
1609
|
+
operationId: 'newPet',
|
|
1610
|
+
tags: ['pet'],
|
|
1611
|
+
requestBody: {
|
|
1612
|
+
content: {
|
|
1613
|
+
'application/json': {
|
|
1614
|
+
schema: {
|
|
1615
|
+
$ref: '#/components/schemas/Pet',
|
|
1616
|
+
},
|
|
1617
|
+
},
|
|
1618
|
+
},
|
|
1619
|
+
},
|
|
1620
|
+
responses: {
|
|
1621
|
+
'200': {
|
|
1622
|
+
description: 'Return a 200 status to indicate that the data was received successfully',
|
|
1623
|
+
},
|
|
1624
|
+
},
|
|
1625
|
+
},
|
|
1626
|
+
},
|
|
1627
|
+
},
|
|
1628
|
+
};
|
|
1629
|
+
export const originalOptions = {
|
|
1630
|
+
withImports: true,
|
|
1631
|
+
withComments: false,
|
|
1632
|
+
skipOptionalParameters: false,
|
|
1633
|
+
withOAuth2Call: true,
|
|
1634
|
+
spec,
|
|
1635
|
+
};
|
|
1636
|
+
export const source = {
|
|
1637
|
+
['POST http://petstore.swagger.io/v2/pet']: {
|
|
1638
|
+
method: 'post',
|
|
1639
|
+
url: 'http://petstore.swagger.io/v2/pet',
|
|
1640
|
+
httpVersion: 'HTTP/1.1',
|
|
1641
|
+
cookies: [
|
|
1642
|
+
{
|
|
1643
|
+
name: 'cookieParam',
|
|
1644
|
+
value: '0',
|
|
1645
|
+
},
|
|
1646
|
+
],
|
|
1647
|
+
headers: [
|
|
1648
|
+
{
|
|
1649
|
+
name: 'Content-Type',
|
|
1650
|
+
value: 'application/json',
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
name: 'Accept-Language',
|
|
1654
|
+
value: 'en-AU',
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
name: 'Authorization',
|
|
1658
|
+
value: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1659
|
+
},
|
|
1660
|
+
],
|
|
1661
|
+
queryString: [],
|
|
1662
|
+
postData: {
|
|
1663
|
+
mimeType: 'application/json',
|
|
1664
|
+
text: '{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":"cat","huntingSkill":"adventurous"}',
|
|
1665
|
+
params: [],
|
|
1666
|
+
jsonObj: {
|
|
1667
|
+
category: {
|
|
1668
|
+
name: 'string',
|
|
1669
|
+
sub: {
|
|
1670
|
+
prop1: 'string',
|
|
1671
|
+
},
|
|
1672
|
+
},
|
|
1673
|
+
name: 'Guru',
|
|
1674
|
+
photoUrls: ['string'],
|
|
1675
|
+
friend: {},
|
|
1676
|
+
tags: [
|
|
1677
|
+
{
|
|
1678
|
+
name: 'string',
|
|
1679
|
+
},
|
|
1680
|
+
],
|
|
1681
|
+
status: 'available',
|
|
1682
|
+
petType: 'cat',
|
|
1683
|
+
huntingSkill: 'adventurous',
|
|
1684
|
+
},
|
|
1685
|
+
},
|
|
1686
|
+
headersSize: 0,
|
|
1687
|
+
bodySize: 0,
|
|
1688
|
+
securityOAuth2ExtraCalls: [
|
|
1689
|
+
{
|
|
1690
|
+
method: 'POST',
|
|
1691
|
+
url: 'http://petstore.swagger.io/api/oauth/dialog',
|
|
1692
|
+
httpVersion: 'HTTP/1.1',
|
|
1693
|
+
headers: [
|
|
1694
|
+
{
|
|
1695
|
+
name: 'Content-Type',
|
|
1696
|
+
value: 'application/x-www-form-urlencoded',
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
name: 'Accept',
|
|
1700
|
+
value: 'application/json',
|
|
1701
|
+
},
|
|
1702
|
+
],
|
|
1703
|
+
queryString: [],
|
|
1704
|
+
postData: {
|
|
1705
|
+
mimeType: 'application/x-www-form-urlencoded',
|
|
1706
|
+
text: '',
|
|
1707
|
+
params: [
|
|
1708
|
+
{
|
|
1709
|
+
name: 'grant_type',
|
|
1710
|
+
value: 'client_credentials',
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
name: 'client_id',
|
|
1714
|
+
value: 'YOUR_CLIENT_ID',
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
name: 'client_secret',
|
|
1718
|
+
value: 'YOUR_CLIENT_SECRET',
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
name: 'scope',
|
|
1722
|
+
value: 'write:pets read:pets',
|
|
1723
|
+
},
|
|
1724
|
+
],
|
|
1725
|
+
},
|
|
1726
|
+
cookies: [],
|
|
1727
|
+
headersSize: -1,
|
|
1728
|
+
bodySize: -1,
|
|
1729
|
+
securityOAuth2ExtraCalls: [],
|
|
1730
|
+
},
|
|
1731
|
+
],
|
|
1732
|
+
pathParameters: {},
|
|
1733
|
+
serverVariables: {},
|
|
1734
|
+
queryObj: {},
|
|
1735
|
+
headersObj: {
|
|
1736
|
+
'Content-Type': 'application/json',
|
|
1737
|
+
'Accept-Language': 'en-AU',
|
|
1738
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1739
|
+
},
|
|
1740
|
+
cookiesObj: {
|
|
1741
|
+
cookieParam: '0',
|
|
1742
|
+
},
|
|
1743
|
+
allHeaders: {
|
|
1744
|
+
cookie: 'cookieParam=0',
|
|
1745
|
+
'Content-Type': 'application/json',
|
|
1746
|
+
'Accept-Language': 'en-AU',
|
|
1747
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1748
|
+
},
|
|
1749
|
+
uriObj: {
|
|
1750
|
+
protocol: 'http:',
|
|
1751
|
+
slashes: true,
|
|
1752
|
+
auth: null,
|
|
1753
|
+
host: 'petstore.swagger.io',
|
|
1754
|
+
port: null,
|
|
1755
|
+
hostname: 'petstore.swagger.io',
|
|
1756
|
+
hash: null,
|
|
1757
|
+
search: '',
|
|
1758
|
+
query: {},
|
|
1759
|
+
pathname: '/v2/pet',
|
|
1760
|
+
path: '/v2/pet',
|
|
1761
|
+
href: 'http://petstore.swagger.io/v2/pet',
|
|
1762
|
+
},
|
|
1763
|
+
fullUrl: 'http://petstore.swagger.io/v2/pet',
|
|
1764
|
+
},
|
|
1765
|
+
['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}']: {
|
|
1766
|
+
method: 'post',
|
|
1767
|
+
url: 'http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}',
|
|
1768
|
+
httpVersion: 'HTTP/1.1',
|
|
1769
|
+
cookies: [],
|
|
1770
|
+
headers: [
|
|
1771
|
+
{
|
|
1772
|
+
name: 'Content-Type',
|
|
1773
|
+
value: 'application/octet-stream',
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
name: 'Authorization',
|
|
1777
|
+
value: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1778
|
+
},
|
|
1779
|
+
],
|
|
1780
|
+
queryString: [],
|
|
1781
|
+
headersSize: 0,
|
|
1782
|
+
bodySize: 0,
|
|
1783
|
+
securityOAuth2ExtraCalls: [
|
|
1784
|
+
{
|
|
1785
|
+
method: 'POST',
|
|
1786
|
+
url: 'http://petstore.swagger.io/api/oauth/dialog',
|
|
1787
|
+
httpVersion: 'HTTP/1.1',
|
|
1788
|
+
headers: [
|
|
1789
|
+
{
|
|
1790
|
+
name: 'Content-Type',
|
|
1791
|
+
value: 'application/x-www-form-urlencoded',
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
name: 'Accept',
|
|
1795
|
+
value: 'application/json',
|
|
1796
|
+
},
|
|
1797
|
+
],
|
|
1798
|
+
queryString: [],
|
|
1799
|
+
postData: {
|
|
1800
|
+
mimeType: 'application/x-www-form-urlencoded',
|
|
1801
|
+
text: '',
|
|
1802
|
+
params: [
|
|
1803
|
+
{
|
|
1804
|
+
name: 'grant_type',
|
|
1805
|
+
value: 'client_credentials',
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
name: 'client_id',
|
|
1809
|
+
value: 'YOUR_CLIENT_ID',
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
name: 'client_secret',
|
|
1813
|
+
value: 'YOUR_CLIENT_SECRET',
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
name: 'scope',
|
|
1817
|
+
value: 'write:pets read:pets',
|
|
1818
|
+
},
|
|
1819
|
+
],
|
|
1820
|
+
},
|
|
1821
|
+
cookies: [],
|
|
1822
|
+
headersSize: -1,
|
|
1823
|
+
bodySize: -1,
|
|
1824
|
+
securityOAuth2ExtraCalls: [],
|
|
1825
|
+
},
|
|
1826
|
+
],
|
|
1827
|
+
pathParameters: {
|
|
1828
|
+
petId: '',
|
|
1829
|
+
data: '',
|
|
1830
|
+
},
|
|
1831
|
+
serverVariables: {},
|
|
1832
|
+
queryObj: {},
|
|
1833
|
+
headersObj: {
|
|
1834
|
+
'Content-Type': 'application/octet-stream',
|
|
1835
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1836
|
+
},
|
|
1837
|
+
cookiesObj: {},
|
|
1838
|
+
allHeaders: {
|
|
1839
|
+
'Content-Type': 'application/octet-stream',
|
|
1840
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1841
|
+
},
|
|
1842
|
+
uriObj: {
|
|
1843
|
+
protocol: 'http:',
|
|
1844
|
+
slashes: true,
|
|
1845
|
+
auth: null,
|
|
1846
|
+
host: 'petstore.swagger.io',
|
|
1847
|
+
port: null,
|
|
1848
|
+
hostname: 'petstore.swagger.io',
|
|
1849
|
+
hash: null,
|
|
1850
|
+
search: '',
|
|
1851
|
+
query: {},
|
|
1852
|
+
pathname: '/v2/pet/{petId}/uploadImage/{data}',
|
|
1853
|
+
path: '/v2/pet/{petId}/uploadImage/{data}',
|
|
1854
|
+
href: 'http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}',
|
|
1855
|
+
},
|
|
1856
|
+
fullUrl: 'http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}',
|
|
1857
|
+
},
|
|
1858
|
+
['PUT http://petstore.swagger.io/v2/pet']: {
|
|
1859
|
+
method: 'put',
|
|
1860
|
+
url: 'http://petstore.swagger.io/v2/pet',
|
|
1861
|
+
httpVersion: 'HTTP/1.1',
|
|
1862
|
+
cookies: [
|
|
1863
|
+
{
|
|
1864
|
+
name: 'cookieParam',
|
|
1865
|
+
value: '0',
|
|
1866
|
+
},
|
|
1867
|
+
],
|
|
1868
|
+
headers: [
|
|
1869
|
+
{
|
|
1870
|
+
name: 'Content-Type',
|
|
1871
|
+
value: 'application/json',
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
name: 'Accept-Language',
|
|
1875
|
+
value: 'en-AU',
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
name: 'Authorization',
|
|
1879
|
+
value: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1880
|
+
},
|
|
1881
|
+
],
|
|
1882
|
+
queryString: [],
|
|
1883
|
+
postData: {
|
|
1884
|
+
mimeType: 'application/json',
|
|
1885
|
+
text: '{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":"cat","huntingSkill":"adventurous"}',
|
|
1886
|
+
params: [],
|
|
1887
|
+
jsonObj: {
|
|
1888
|
+
category: {
|
|
1889
|
+
name: 'string',
|
|
1890
|
+
sub: {
|
|
1891
|
+
prop1: 'string',
|
|
1892
|
+
},
|
|
1893
|
+
},
|
|
1894
|
+
name: 'Guru',
|
|
1895
|
+
photoUrls: ['string'],
|
|
1896
|
+
friend: {},
|
|
1897
|
+
tags: [
|
|
1898
|
+
{
|
|
1899
|
+
name: 'string',
|
|
1900
|
+
},
|
|
1901
|
+
],
|
|
1902
|
+
status: 'available',
|
|
1903
|
+
petType: 'cat',
|
|
1904
|
+
huntingSkill: 'adventurous',
|
|
1905
|
+
},
|
|
1906
|
+
},
|
|
1907
|
+
headersSize: 0,
|
|
1908
|
+
bodySize: 0,
|
|
1909
|
+
securityOAuth2ExtraCalls: [
|
|
1910
|
+
{
|
|
1911
|
+
method: 'POST',
|
|
1912
|
+
url: 'http://petstore.swagger.io/api/oauth/dialog',
|
|
1913
|
+
httpVersion: 'HTTP/1.1',
|
|
1914
|
+
headers: [
|
|
1915
|
+
{
|
|
1916
|
+
name: 'Content-Type',
|
|
1917
|
+
value: 'application/x-www-form-urlencoded',
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
name: 'Accept',
|
|
1921
|
+
value: 'application/json',
|
|
1922
|
+
},
|
|
1923
|
+
],
|
|
1924
|
+
queryString: [],
|
|
1925
|
+
postData: {
|
|
1926
|
+
mimeType: 'application/x-www-form-urlencoded',
|
|
1927
|
+
text: '',
|
|
1928
|
+
params: [
|
|
1929
|
+
{
|
|
1930
|
+
name: 'grant_type',
|
|
1931
|
+
value: 'client_credentials',
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
name: 'client_id',
|
|
1935
|
+
value: 'YOUR_CLIENT_ID',
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
name: 'client_secret',
|
|
1939
|
+
value: 'YOUR_CLIENT_SECRET',
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
name: 'scope',
|
|
1943
|
+
value: 'write:pets read:pets',
|
|
1944
|
+
},
|
|
1945
|
+
],
|
|
1946
|
+
},
|
|
1947
|
+
cookies: [],
|
|
1948
|
+
headersSize: -1,
|
|
1949
|
+
bodySize: -1,
|
|
1950
|
+
securityOAuth2ExtraCalls: [],
|
|
1951
|
+
},
|
|
1952
|
+
],
|
|
1953
|
+
pathParameters: {},
|
|
1954
|
+
serverVariables: {},
|
|
1955
|
+
queryObj: {},
|
|
1956
|
+
headersObj: {
|
|
1957
|
+
'Content-Type': 'application/json',
|
|
1958
|
+
'Accept-Language': 'en-AU',
|
|
1959
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1960
|
+
},
|
|
1961
|
+
cookiesObj: {
|
|
1962
|
+
cookieParam: '0',
|
|
1963
|
+
},
|
|
1964
|
+
allHeaders: {
|
|
1965
|
+
cookie: 'cookieParam=0',
|
|
1966
|
+
'Content-Type': 'application/json',
|
|
1967
|
+
'Accept-Language': 'en-AU',
|
|
1968
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1969
|
+
},
|
|
1970
|
+
uriObj: {
|
|
1971
|
+
protocol: 'http:',
|
|
1972
|
+
slashes: true,
|
|
1973
|
+
auth: null,
|
|
1974
|
+
host: 'petstore.swagger.io',
|
|
1975
|
+
port: null,
|
|
1976
|
+
hostname: 'petstore.swagger.io',
|
|
1977
|
+
hash: null,
|
|
1978
|
+
search: '',
|
|
1979
|
+
query: {},
|
|
1980
|
+
pathname: '/v2/pet',
|
|
1981
|
+
path: '/v2/pet',
|
|
1982
|
+
href: 'http://petstore.swagger.io/v2/pet',
|
|
1983
|
+
},
|
|
1984
|
+
fullUrl: 'http://petstore.swagger.io/v2/pet',
|
|
1985
|
+
},
|
|
1986
|
+
['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage']: {
|
|
1987
|
+
method: 'post',
|
|
1988
|
+
url: 'http://petstore.swagger.io/v2/pet/{petId}/uploadImage',
|
|
1989
|
+
httpVersion: 'HTTP/1.1',
|
|
1990
|
+
cookies: [],
|
|
1991
|
+
headers: [
|
|
1992
|
+
{
|
|
1993
|
+
name: 'Content-Type',
|
|
1994
|
+
value: 'application/octet-stream',
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
name: 'Authorization',
|
|
1998
|
+
value: 'Bearer <YOUR_TOKEN_HERE>',
|
|
1999
|
+
},
|
|
2000
|
+
],
|
|
2001
|
+
queryString: [],
|
|
2002
|
+
headersSize: 0,
|
|
2003
|
+
bodySize: 0,
|
|
2004
|
+
securityOAuth2ExtraCalls: [
|
|
2005
|
+
{
|
|
2006
|
+
method: 'POST',
|
|
2007
|
+
url: 'http://petstore.swagger.io/api/oauth/dialog',
|
|
2008
|
+
httpVersion: 'HTTP/1.1',
|
|
2009
|
+
headers: [
|
|
2010
|
+
{
|
|
2011
|
+
name: 'Content-Type',
|
|
2012
|
+
value: 'application/x-www-form-urlencoded',
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
name: 'Accept',
|
|
2016
|
+
value: 'application/json',
|
|
2017
|
+
},
|
|
2018
|
+
],
|
|
2019
|
+
queryString: [],
|
|
2020
|
+
postData: {
|
|
2021
|
+
mimeType: 'application/x-www-form-urlencoded',
|
|
2022
|
+
text: '',
|
|
2023
|
+
params: [
|
|
2024
|
+
{
|
|
2025
|
+
name: 'grant_type',
|
|
2026
|
+
value: 'client_credentials',
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
name: 'client_id',
|
|
2030
|
+
value: 'YOUR_CLIENT_ID',
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
name: 'client_secret',
|
|
2034
|
+
value: 'YOUR_CLIENT_SECRET',
|
|
2035
|
+
},
|
|
2036
|
+
{
|
|
2037
|
+
name: 'scope',
|
|
2038
|
+
value: 'write:pets read:pets',
|
|
2039
|
+
},
|
|
2040
|
+
],
|
|
2041
|
+
},
|
|
2042
|
+
cookies: [],
|
|
2043
|
+
headersSize: -1,
|
|
2044
|
+
bodySize: -1,
|
|
2045
|
+
securityOAuth2ExtraCalls: [],
|
|
2046
|
+
},
|
|
2047
|
+
],
|
|
2048
|
+
pathParameters: {
|
|
2049
|
+
petId: '',
|
|
2050
|
+
},
|
|
2051
|
+
serverVariables: {},
|
|
2052
|
+
queryObj: {},
|
|
2053
|
+
headersObj: {
|
|
2054
|
+
'Content-Type': 'application/octet-stream',
|
|
2055
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
2056
|
+
},
|
|
2057
|
+
cookiesObj: {},
|
|
2058
|
+
allHeaders: {
|
|
2059
|
+
'Content-Type': 'application/octet-stream',
|
|
2060
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
2061
|
+
},
|
|
2062
|
+
uriObj: {
|
|
2063
|
+
protocol: 'http:',
|
|
2064
|
+
slashes: true,
|
|
2065
|
+
auth: null,
|
|
2066
|
+
host: 'petstore.swagger.io',
|
|
2067
|
+
port: null,
|
|
2068
|
+
hostname: 'petstore.swagger.io',
|
|
2069
|
+
hash: null,
|
|
2070
|
+
search: '',
|
|
2071
|
+
query: {},
|
|
2072
|
+
pathname: '/v2/pet/{petId}/uploadImage',
|
|
2073
|
+
path: '/v2/pet/{petId}/uploadImage',
|
|
2074
|
+
href: 'http://petstore.swagger.io/v2/pet/{petId}/uploadImage',
|
|
2075
|
+
},
|
|
2076
|
+
fullUrl: 'http://petstore.swagger.io/v2/pet/{petId}/uploadImage',
|
|
2077
|
+
},
|
|
2078
|
+
['GET http://petstore.swagger.io/v2/pet/findByStatus/{id}']: {
|
|
2079
|
+
method: 'get',
|
|
2080
|
+
url: 'http://petstore.swagger.io/v2/pet/findByStatus/{id}',
|
|
2081
|
+
httpVersion: 'HTTP/1.1',
|
|
2082
|
+
cookies: [],
|
|
2083
|
+
headers: [
|
|
2084
|
+
{
|
|
2085
|
+
name: 'Authorization',
|
|
2086
|
+
value: 'Bearer <YOUR_TOKEN_HERE>',
|
|
2087
|
+
},
|
|
2088
|
+
],
|
|
2089
|
+
queryString: [
|
|
2090
|
+
{
|
|
2091
|
+
name: 'status',
|
|
2092
|
+
value: 'available',
|
|
2093
|
+
},
|
|
2094
|
+
],
|
|
2095
|
+
headersSize: 0,
|
|
2096
|
+
bodySize: 0,
|
|
2097
|
+
securityOAuth2ExtraCalls: [
|
|
2098
|
+
{
|
|
2099
|
+
method: 'POST',
|
|
2100
|
+
url: 'http://petstore.swagger.io/api/oauth/dialog',
|
|
2101
|
+
httpVersion: 'HTTP/1.1',
|
|
2102
|
+
headers: [
|
|
2103
|
+
{
|
|
2104
|
+
name: 'Content-Type',
|
|
2105
|
+
value: 'application/x-www-form-urlencoded',
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
name: 'Accept',
|
|
2109
|
+
value: 'application/json',
|
|
2110
|
+
},
|
|
2111
|
+
],
|
|
2112
|
+
queryString: [],
|
|
2113
|
+
postData: {
|
|
2114
|
+
mimeType: 'application/x-www-form-urlencoded',
|
|
2115
|
+
text: '',
|
|
2116
|
+
params: [
|
|
2117
|
+
{
|
|
2118
|
+
name: 'grant_type',
|
|
2119
|
+
value: 'client_credentials',
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
name: 'client_id',
|
|
2123
|
+
value: 'YOUR_CLIENT_ID',
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
name: 'client_secret',
|
|
2127
|
+
value: 'YOUR_CLIENT_SECRET',
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
name: 'scope',
|
|
2131
|
+
value: 'write:pets read:pets',
|
|
2132
|
+
},
|
|
2133
|
+
],
|
|
2134
|
+
},
|
|
2135
|
+
cookies: [],
|
|
2136
|
+
headersSize: -1,
|
|
2137
|
+
bodySize: -1,
|
|
2138
|
+
securityOAuth2ExtraCalls: [],
|
|
2139
|
+
},
|
|
2140
|
+
],
|
|
2141
|
+
pathParameters: {
|
|
2142
|
+
id: '',
|
|
2143
|
+
},
|
|
2144
|
+
serverVariables: {},
|
|
2145
|
+
queryObj: {
|
|
2146
|
+
status: 'available',
|
|
2147
|
+
},
|
|
2148
|
+
headersObj: {
|
|
2149
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
2150
|
+
},
|
|
2151
|
+
cookiesObj: {},
|
|
2152
|
+
allHeaders: {
|
|
2153
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
2154
|
+
},
|
|
2155
|
+
uriObj: {
|
|
2156
|
+
protocol: 'http:',
|
|
2157
|
+
slashes: true,
|
|
2158
|
+
auth: null,
|
|
2159
|
+
host: 'petstore.swagger.io',
|
|
2160
|
+
port: null,
|
|
2161
|
+
hostname: 'petstore.swagger.io',
|
|
2162
|
+
hash: null,
|
|
2163
|
+
search: 'status=available',
|
|
2164
|
+
query: {
|
|
2165
|
+
status: 'available',
|
|
2166
|
+
},
|
|
2167
|
+
pathname: '/v2/pet/findByStatus/{id}',
|
|
2168
|
+
path: '/v2/pet/findByStatus/{id}?status=available',
|
|
2169
|
+
href: 'http://petstore.swagger.io/v2/pet/findByStatus/%7Bid%7D',
|
|
2170
|
+
},
|
|
2171
|
+
fullUrl: 'http://petstore.swagger.io/v2/pet/findByStatus/{id}?status=available',
|
|
2172
|
+
},
|
|
2173
|
+
['POST https://{customerId}.saas-app.com:{port}/v2']: {
|
|
2174
|
+
method: 'post',
|
|
2175
|
+
url: 'https://{customerId}.saas-app.com:{port}/v2/pet',
|
|
2176
|
+
httpVersion: 'HTTP/1.1',
|
|
2177
|
+
cookies: [{ name: 'cookieParam', value: '0' }],
|
|
2178
|
+
headers: [
|
|
2179
|
+
{ name: 'Content-Type', value: 'application/json' },
|
|
2180
|
+
{ name: 'Accept-Language', value: 'en-AU' },
|
|
2181
|
+
{ name: 'Authorization', value: 'Bearer <YOUR_TOKEN_HERE>' },
|
|
2182
|
+
],
|
|
2183
|
+
queryString: [],
|
|
2184
|
+
postData: {
|
|
2185
|
+
mimeType: 'application/json',
|
|
2186
|
+
text: 'text',
|
|
2187
|
+
params: [],
|
|
2188
|
+
jsonObj: {
|
|
2189
|
+
category: { name: 'string', sub: { prop1: 'string' } },
|
|
2190
|
+
name: 'Guru',
|
|
2191
|
+
photoUrls: ['string'],
|
|
2192
|
+
friend: {},
|
|
2193
|
+
tags: [{ name: 'string' }],
|
|
2194
|
+
cvv_check: 'string',
|
|
2195
|
+
status: 'available',
|
|
2196
|
+
petType: 'cat',
|
|
2197
|
+
huntingSkill: 'adventurous',
|
|
2198
|
+
},
|
|
2199
|
+
},
|
|
2200
|
+
headersSize: 0,
|
|
2201
|
+
bodySize: 0,
|
|
2202
|
+
securityOAuth2ExtraCalls: [],
|
|
2203
|
+
pathParameters: {},
|
|
2204
|
+
serverVariables: { customerId: 'demo', port: '443' },
|
|
2205
|
+
queryObj: {},
|
|
2206
|
+
headersObj: {
|
|
2207
|
+
'Content-Type': 'application/json',
|
|
2208
|
+
'Accept-Language': 'en-AU',
|
|
2209
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
2210
|
+
},
|
|
2211
|
+
cookiesObj: { cookieParam: '0' },
|
|
2212
|
+
allHeaders: {
|
|
2213
|
+
cookie: 'cookieParam=0',
|
|
2214
|
+
'Content-Type': 'application/json',
|
|
2215
|
+
'Accept-Language': 'en-AU',
|
|
2216
|
+
Authorization: 'Bearer <YOUR_TOKEN_HERE>',
|
|
2217
|
+
},
|
|
2218
|
+
uriObj: {
|
|
2219
|
+
protocol: 'https:',
|
|
2220
|
+
slashes: true,
|
|
2221
|
+
auth: null,
|
|
2222
|
+
host: '',
|
|
2223
|
+
port: null,
|
|
2224
|
+
hostname: '',
|
|
2225
|
+
hash: null,
|
|
2226
|
+
search: '',
|
|
2227
|
+
query: {},
|
|
2228
|
+
pathname: '{customerId}.saas-app.com:{port}/v2/pet',
|
|
2229
|
+
path: '{customerId}.saas-app.com:{port}/v2/pet',
|
|
2230
|
+
href: 'https:///%7BcustomerId%7D.saas-app.com:%7Bport%7D/v2/pet',
|
|
2231
|
+
},
|
|
2232
|
+
fullUrl: 'https://{customerId}.saas-app.com:{port}/v2/pet',
|
|
2233
|
+
},
|
|
2234
|
+
['POST http://petstore.swagger.io/login']: {
|
|
2235
|
+
method: 'post',
|
|
2236
|
+
url: 'http://petstore.swagger.io/login',
|
|
2237
|
+
httpVersion: 'HTTP/1.1',
|
|
2238
|
+
headers: [],
|
|
2239
|
+
queryString: [],
|
|
2240
|
+
postData: {
|
|
2241
|
+
mimeType: 'application/json',
|
|
2242
|
+
text: 'text',
|
|
2243
|
+
params: [],
|
|
2244
|
+
jsonObj: {},
|
|
2245
|
+
},
|
|
2246
|
+
basicAuth: { username: 'usernamestring', password: 'passwordstring' },
|
|
2247
|
+
headersSize: 0,
|
|
2248
|
+
bodySize: 0,
|
|
2249
|
+
securityOAuth2ExtraCalls: [],
|
|
2250
|
+
pathParameters: {},
|
|
2251
|
+
queryObj: {},
|
|
2252
|
+
headersObj: {},
|
|
2253
|
+
cookiesObj: {},
|
|
2254
|
+
allHeaders: {},
|
|
2255
|
+
serverVariables: {},
|
|
2256
|
+
cookies: [{ name: 'cookieParam', value: '0' }],
|
|
2257
|
+
uriObj: {
|
|
2258
|
+
protocol: 'https:',
|
|
2259
|
+
slashes: true,
|
|
2260
|
+
auth: null,
|
|
2261
|
+
host: '',
|
|
2262
|
+
port: null,
|
|
2263
|
+
hostname: '',
|
|
2264
|
+
hash: null,
|
|
2265
|
+
search: '',
|
|
2266
|
+
query: {},
|
|
2267
|
+
pathname: 'petstore.swagger.io/login',
|
|
2268
|
+
path: 'petstore.swagger.io/login',
|
|
2269
|
+
href: 'https://petstore.swagger.io/login',
|
|
2270
|
+
},
|
|
2271
|
+
fullUrl: 'https://petstore.swagger.io/login',
|
|
2272
|
+
},
|
|
2273
|
+
['POST http://petstore.swagger.io/v2/uploadImage']: {
|
|
2274
|
+
httpVersion: 'HTTP/1.1',
|
|
2275
|
+
queryString: [],
|
|
2276
|
+
basicAuth: { username: 'usernamestring', password: 'passwordstring' },
|
|
2277
|
+
headersSize: 0,
|
|
2278
|
+
bodySize: 0,
|
|
2279
|
+
securityOAuth2ExtraCalls: [],
|
|
2280
|
+
pathParameters: {},
|
|
2281
|
+
queryObj: {},
|
|
2282
|
+
headersObj: {},
|
|
2283
|
+
cookiesObj: {},
|
|
2284
|
+
allHeaders: {},
|
|
2285
|
+
serverVariables: {},
|
|
2286
|
+
cookies: [{ name: 'cookieParam', value: '0' }],
|
|
2287
|
+
uriObj: {
|
|
2288
|
+
protocol: 'https:',
|
|
2289
|
+
slashes: true,
|
|
2290
|
+
auth: null,
|
|
2291
|
+
host: '',
|
|
2292
|
+
port: null,
|
|
2293
|
+
hostname: '',
|
|
2294
|
+
hash: null,
|
|
2295
|
+
search: '',
|
|
2296
|
+
query: {},
|
|
2297
|
+
pathname: 'petstore.swagger.io/login',
|
|
2298
|
+
path: 'petstore.swagger.io/login',
|
|
2299
|
+
href: 'https://petstore.swagger.io/login',
|
|
2300
|
+
},
|
|
2301
|
+
fullUrl: 'https://petstore.swagger.io/login',
|
|
2302
|
+
method: 'POST',
|
|
2303
|
+
url: 'http://petstore.swagger.io/v2/uploadImage',
|
|
2304
|
+
headers: [],
|
|
2305
|
+
postData: {
|
|
2306
|
+
mimeType: 'multipart/form-data',
|
|
2307
|
+
params: [
|
|
2308
|
+
{ name: 'file', value: 'pet_image.png' },
|
|
2309
|
+
{ name: 'description', value: 'Pet photo' },
|
|
2310
|
+
],
|
|
2311
|
+
},
|
|
2312
|
+
},
|
|
2313
|
+
};
|
|
2314
|
+
export const serverVariablesOptions = {
|
|
2315
|
+
withImports: true,
|
|
2316
|
+
withComments: false,
|
|
2317
|
+
skipOptionalParameters: false,
|
|
2318
|
+
withOAuth2Call: true,
|
|
2319
|
+
spec: {
|
|
2320
|
+
...spec,
|
|
2321
|
+
...{
|
|
2322
|
+
servers: [
|
|
2323
|
+
{
|
|
2324
|
+
url: 'https://{customerId}.saas-app.com:{port}/v2',
|
|
2325
|
+
variables: {
|
|
2326
|
+
customerId: {
|
|
2327
|
+
default: 'demo',
|
|
2328
|
+
description: 'Customer ID assigned by the service provider',
|
|
2329
|
+
},
|
|
2330
|
+
port: {
|
|
2331
|
+
enum: ['443', '8443'],
|
|
2332
|
+
default: '443',
|
|
2333
|
+
},
|
|
2334
|
+
},
|
|
2335
|
+
},
|
|
2336
|
+
],
|
|
2337
|
+
},
|
|
2338
|
+
},
|
|
2339
|
+
};
|
|
2340
|
+
//# sourceMappingURL=mock.js.map
|