@scalar/api-reference 1.49.0 → 1.49.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/CHANGELOG.md +7 -0
- package/dist/AgentScalarChatInterface-MUbtSqMw.js +41 -0
- package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +1 -0
- package/dist/ExternalDocs-phu7GxpZ.js +272 -0
- package/dist/ExternalDocs-phu7GxpZ.js.map +1 -0
- package/dist/MobileHeader-B71jYJdT.js +1373 -0
- package/dist/MobileHeader-B71jYJdT.js.map +1 -0
- package/dist/Operation-CixLVfKd.js +3827 -0
- package/dist/Operation-CixLVfKd.js.map +1 -0
- package/dist/SearchButton-xzhIpMCZ.js +621 -0
- package/dist/SearchButton-xzhIpMCZ.js.map +1 -0
- package/dist/ServerSelector-5y29y2BJ.js +852 -0
- package/dist/ServerSelector-5y29y2BJ.js.map +1 -0
- package/dist/blocks/index.js +3 -10
- package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
- package/dist/blocks/scalar-info-block/index.d.ts +2 -2
- package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
- package/dist/browser/standalone.js +40759 -34701
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/index.d.ts +3 -3
- package/dist/components/Anchor/index.d.ts +2 -2
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Content/Auth/index.d.ts +1 -1
- package/dist/components/Content/Models/index.d.ts +2 -2
- package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
- package/dist/components/Content/Schema/index.d.ts +4 -4
- package/dist/components/Content/Tags/index.d.ts +1 -1
- package/dist/components/Content/index.d.ts +2 -2
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/LinkList/index.d.ts +1 -1
- package/dist/components/OperationsList/index.d.ts +1 -1
- package/dist/components/RenderPlugins/index.d.ts +1 -1
- package/dist/components/Section/index.d.ts +10 -10
- package/dist/components/SectionFlare/index.d.ts +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +102 -42
- package/dist/components/index.js.map +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
- package/dist/features/Operation/index.d.ts +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/features/Search/helpers/create-search-index.d.ts +1 -1
- package/dist/features/Search/index.d.ts +2 -2
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/developer-tools/index.d.ts +1 -1
- package/dist/features/example-responses/index.d.ts +1 -1
- package/dist/features/external-docs/index.d.ts +1 -1
- package/dist/features/index.d.ts +2 -2
- package/dist/features/index.js +4 -10
- package/dist/features/info-object/index.d.ts +3 -3
- package/dist/features/specification-extension/index.d.ts +2 -2
- package/dist/features/test-request-button/index.d.ts +1 -1
- package/dist/features/x-badges/index.d.ts +1 -1
- package/dist/helpers/download.d.ts +1 -1
- package/dist/helpers/download.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +8 -8
- package/dist/helpers/index.js +3 -24
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +3 -8
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -14
- package/dist/lazy-bus-CV8Ox5hD.js +333 -0
- package/dist/lazy-bus-CV8Ox5hD.js.map +1 -0
- package/dist/normalize-configurations-DcVpOEjD.js +232 -0
- package/dist/normalize-configurations-DcVpOEjD.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.js +2 -9
- package/dist/plugins-4EyiUD_A.js +80 -0
- package/dist/plugins-4EyiUD_A.js.map +1 -0
- package/dist/src-DqcYVBWI.js +1686 -0
- package/dist/src-DqcYVBWI.js.map +1 -0
- package/dist/ssr.d.ts +2 -2
- package/dist/ssr.js +7 -14
- package/dist/storage--3JuzjCI.js +42 -0
- package/dist/storage--3JuzjCI.js.map +1 -0
- package/dist/style.css +6773 -7332
- package/dist/urls-gPTXGgbj.js +17 -0
- package/dist/urls-gPTXGgbj.js.map +1 -0
- package/dist/use-agent-Bnm1de0n.js +60 -0
- package/dist/use-agent-Bnm1de0n.js.map +1 -0
- package/dist/use-intersection-8QqPi2O-.js +24 -0
- package/dist/use-intersection-8QqPi2O-.js.map +1 -0
- package/package.json +25 -27
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -10
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +0 -7
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +0 -123
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +0 -7
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +0 -142
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +0 -24
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +0 -63
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +0 -59
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue2.js +0 -70
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +0 -38
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +0 -38
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +0 -28
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue2.js +0 -19
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +0 -14
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +0 -112
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +0 -21
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +0 -4
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +0 -76
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue2.js +0 -4
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +0 -72
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +0 -4
- package/dist/components/AgentScalar/AgentScalarButton.vue.js +0 -22
- package/dist/components/AgentScalar/AgentScalarButton.vue2.js +0 -4
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +0 -4
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue2.js +0 -29
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +0 -7
- package/dist/components/AgentScalar/AgentScalarDrawer.vue2.js +0 -78
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +0 -7
- package/dist/components/AgentScalar/OpenMCPButton.vue2.js +0 -191
- package/dist/components/Anchor/Anchor.vue.js +0 -51
- package/dist/components/Anchor/Anchor.vue2.js +0 -4
- package/dist/components/Anchor/WithBreadcrumb.vue.js +0 -41
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +0 -4
- package/dist/components/ApiReference.vue.js +0 -10
- package/dist/components/ApiReference.vue2.js +0 -742
- package/dist/components/Badge/Badge.vue.js +0 -7
- package/dist/components/Badge/Badge.vue2.js +0 -26
- package/dist/components/ClassicHeader.vue.js +0 -21
- package/dist/components/Content/Auth/Auth.vue.js +0 -77
- package/dist/components/Content/Auth/Auth.vue2.js +0 -4
- package/dist/components/Content/Auth/helpers/get-default-security.js +0 -55
- package/dist/components/Content/Content.vue.js +0 -171
- package/dist/components/Content/Content.vue3.js +0 -5
- package/dist/components/Content/Models/Model.vue.js +0 -47
- package/dist/components/Content/Models/Model.vue2.js +0 -4
- package/dist/components/Content/Models/ModelTag.vue.js +0 -76
- package/dist/components/Content/Models/ModelTag.vue2.js +0 -4
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +0 -7
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +0 -78
- package/dist/components/Content/Models/components/ModernLayout.vue.js +0 -61
- package/dist/components/Content/Models/components/ModernLayout.vue2.js +0 -4
- package/dist/components/Content/Operations/TraversedEntry.vue.js +0 -146
- package/dist/components/Content/Operations/TraversedEntry.vue2.js +0 -4
- package/dist/components/Content/Schema/RenderString.vue.js +0 -27
- package/dist/components/Content/Schema/RenderString.vue2.js +0 -4
- package/dist/components/Content/Schema/Schema.vue.js +0 -7
- package/dist/components/Content/Schema/Schema.vue2.js +0 -193
- package/dist/components/Content/Schema/SchemaComposition.vue.js +0 -120
- package/dist/components/Content/Schema/SchemaComposition.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +0 -36
- package/dist/components/Content/Schema/SchemaEnums.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaEnums.vue2.js +0 -112
- package/dist/components/Content/Schema/SchemaHeading.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +0 -61
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +0 -66
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +0 -120
- package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaProperty.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +0 -236
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue2.js +0 -45
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue2.js +0 -40
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +0 -80
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +0 -318
- package/dist/components/Content/Schema/helpers/format-example.js +0 -41
- package/dist/components/Content/Schema/helpers/format-value.js +0 -35
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +0 -31
- package/dist/components/Content/Schema/helpers/get-enum-values.js +0 -20
- package/dist/components/Content/Schema/helpers/get-property-description.js +0 -34
- package/dist/components/Content/Schema/helpers/get-ref-name.js +0 -14
- package/dist/components/Content/Schema/helpers/get-schema-type.js +0 -47
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js +0 -48
- package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +0 -13
- package/dist/components/Content/Schema/helpers/is-type-object.js +0 -27
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +0 -215
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +0 -64
- package/dist/components/Content/Schema/helpers/schema-composition.js +0 -4
- package/dist/components/Content/Schema/helpers/schema-name.js +0 -24
- package/dist/components/Content/Schema/helpers/should-display-description.js +0 -12
- package/dist/components/Content/Schema/helpers/should-display-heading.js +0 -12
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +0 -15
- package/dist/components/Content/Schema/helpers/sort-property-names.js +0 -71
- package/dist/components/Content/Tags/Tag.vue.js +0 -46
- package/dist/components/Content/Tags/Tag.vue2.js +0 -4
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js +0 -7
- package/dist/components/Content/Tags/components/ClassicLayout.vue2.js +0 -57
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +0 -7
- package/dist/components/Content/Tags/components/ModernLayout.vue2.js +0 -56
- package/dist/components/Content/Tags/components/TagSection.vue.js +0 -100
- package/dist/components/Content/Tags/components/TagSection.vue2.js +0 -4
- package/dist/components/GettingStarted.vue.js +0 -7
- package/dist/components/GettingStarted.vue2.js +0 -82
- package/dist/components/HttpMethod/HttpMethod.vue.js +0 -34
- package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -4
- package/dist/components/IntersectionObserver.vue.js +0 -55
- package/dist/components/IntersectionObserver.vue2.js +0 -4
- package/dist/components/Lazy/Lazy.vue.js +0 -106
- package/dist/components/Lazy/Lazy.vue2.js +0 -4
- package/dist/components/LinkList/LinkList.vue.js +0 -7
- package/dist/components/LinkList/LinkList.vue2.js +0 -48
- package/dist/components/LoadingSkeleton.vue.js +0 -7
- package/dist/components/LoadingSkeleton.vue2.js +0 -20
- package/dist/components/MobileHeader.vue.js +0 -62
- package/dist/components/MobileHeader.vue2.js +0 -4
- package/dist/components/OperationPath.vue.js +0 -7
- package/dist/components/OperationPath.vue2.js +0 -30
- package/dist/components/OperationsList/OperationsList.vue.js +0 -7
- package/dist/components/OperationsList/OperationsList.vue2.js +0 -61
- package/dist/components/OperationsList/OperationsListItem.vue.js +0 -7
- package/dist/components/OperationsList/OperationsListItem.vue2.js +0 -68
- package/dist/components/RenderPlugins/RenderPlugins.vue.js +0 -43
- package/dist/components/RenderPlugins/RenderPlugins.vue2.js +0 -4
- package/dist/components/ScreenReader.vue.js +0 -7
- package/dist/components/ScreenReader.vue2.js +0 -21
- package/dist/components/Section/CompactSection.vue.js +0 -7
- package/dist/components/Section/CompactSection.vue2.js +0 -60
- package/dist/components/Section/Section.vue.js +0 -7
- package/dist/components/Section/Section.vue2.js +0 -23
- package/dist/components/Section/SectionAccordion.vue.js +0 -7
- package/dist/components/Section/SectionAccordion.vue2.js +0 -76
- package/dist/components/Section/SectionColumn.vue.js +0 -14
- package/dist/components/Section/SectionColumns.vue.js +0 -14
- package/dist/components/Section/SectionContainer.vue.js +0 -7
- package/dist/components/Section/SectionContainer.vue2.js +0 -21
- package/dist/components/Section/SectionContainerAccordion.vue.js +0 -7
- package/dist/components/Section/SectionContainerAccordion.vue2.js +0 -54
- package/dist/components/Section/SectionContent.vue.js +0 -7
- package/dist/components/Section/SectionContent.vue2.js +0 -22
- package/dist/components/Section/SectionHeader.vue.js +0 -7
- package/dist/components/Section/SectionHeader.vue2.js +0 -26
- package/dist/components/Section/SectionHeaderTag.vue.js +0 -7
- package/dist/components/Section/SectionHeaderTag.vue2.js +0 -20
- package/dist/components/SectionFlare/SectionFlare.vue.js +0 -14
- package/dist/components/ShowMoreButton.vue.js +0 -7
- package/dist/components/ShowMoreButton.vue2.js +0 -23
- package/dist/consts/urls.js +0 -16
- package/dist/features/Operation/Operation.vue.js +0 -100
- package/dist/features/Operation/Operation.vue2.js +0 -4
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +0 -88
- package/dist/features/Operation/components/ContentTypeSelect.vue2.js +0 -4
- package/dist/features/Operation/components/Header.vue.js +0 -33
- package/dist/features/Operation/components/Header.vue2.js +0 -4
- package/dist/features/Operation/components/Headers.vue.js +0 -7
- package/dist/features/Operation/components/Headers.vue2.js +0 -71
- package/dist/features/Operation/components/OperationParameters.vue.js +0 -92
- package/dist/features/Operation/components/OperationParameters.vue2.js +0 -4
- package/dist/features/Operation/components/OperationResponses.vue.js +0 -44
- package/dist/features/Operation/components/OperationResponses.vue2.js +0 -4
- package/dist/features/Operation/components/ParameterList.vue.js +0 -50
- package/dist/features/Operation/components/ParameterList.vue2.js +0 -4
- package/dist/features/Operation/components/ParameterListItem.vue.js +0 -7
- package/dist/features/Operation/components/ParameterListItem.vue2.js +0 -163
- package/dist/features/Operation/components/RequestBody.vue.js +0 -7
- package/dist/features/Operation/components/RequestBody.vue2.js +0 -164
- package/dist/features/Operation/components/callbacks/Callback.vue.js +0 -7
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +0 -60
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +0 -63
- package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +0 -4
- package/dist/features/Operation/helpers/filter-selected-security.js +0 -28
- package/dist/features/Operation/helpers/get-first-server.js +0 -25
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +0 -7
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +0 -243
- package/dist/features/Operation/layouts/ModernLayout.vue.js +0 -7
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +0 -256
- package/dist/features/Search/components/SearchButton.vue.js +0 -88
- package/dist/features/Search/components/SearchButton.vue2.js +0 -4
- package/dist/features/Search/components/SearchModal.vue.js +0 -7
- package/dist/features/Search/components/SearchModal.vue2.js +0 -120
- package/dist/features/Search/components/SearchResult.vue.js +0 -84
- package/dist/features/Search/components/SearchResult.vue2.js +0 -4
- package/dist/features/Search/helpers/create-fuse-instance.js +0 -43
- package/dist/features/Search/helpers/create-search-index.js +0 -119
- package/dist/features/Search/hooks/useSearchIndex.js +0 -33
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +0 -7
- package/dist/features/ask-agent-button/AskAgentButton.vue2.js +0 -51
- package/dist/features/developer-tools/DeveloperTools.vue.js +0 -60
- package/dist/features/developer-tools/DeveloperTools.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +0 -13
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +0 -33
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +0 -138
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +0 -66
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +0 -54
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +0 -71
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +0 -63
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +0 -73
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +0 -57
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue2.js +0 -4
- package/dist/features/developer-tools/components/DeployApiReference.vue.js +0 -35
- package/dist/features/developer-tools/components/DeployApiReference.vue2.js +0 -4
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +0 -103
- package/dist/features/developer-tools/components/ModifyConfiguration.vue2.js +0 -4
- package/dist/features/developer-tools/components/ShareApiReference.vue.js +0 -35
- package/dist/features/developer-tools/components/ShareApiReference.vue2.js +0 -4
- package/dist/features/example-responses/ExampleResponse.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponse.vue2.js +0 -61
- package/dist/features/example-responses/ExampleResponseTab.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponseTab.vue2.js +0 -25
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponseTabList.vue2.js +0 -37
- package/dist/features/example-responses/ExampleResponses.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponses.vue2.js +0 -181
- package/dist/features/example-responses/ExampleSchema.vue.js +0 -42
- package/dist/features/example-responses/ExampleSchema.vue2.js +0 -4
- package/dist/features/example-responses/has-response-content.js +0 -28
- package/dist/features/external-docs/ExternalDocs.vue.js +0 -42
- package/dist/features/external-docs/ExternalDocs.vue2.js +0 -4
- package/dist/features/info-object/Contact.vue.js +0 -46
- package/dist/features/info-object/Contact.vue2.js +0 -4
- package/dist/features/info-object/License.vue.js +0 -40
- package/dist/features/info-object/License.vue2.js +0 -4
- package/dist/features/info-object/TermsOfService.vue.js +0 -34
- package/dist/features/info-object/TermsOfService.vue2.js +0 -4
- package/dist/features/multiple-documents/DocumentSelector.vue.js +0 -54
- package/dist/features/multiple-documents/DocumentSelector.vue2.js +0 -4
- package/dist/features/specification-extension/SpecificationExtension.vue.js +0 -4
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +0 -52
- package/dist/features/specification-extension/helpers.js +0 -9
- package/dist/features/test-request-button/TestRequestButton.vue.js +0 -7
- package/dist/features/test-request-button/TestRequestButton.vue2.js +0 -46
- package/dist/features/x-badges/XBadges.vue.js +0 -35
- package/dist/features/x-badges/XBadges.vue2.js +0 -4
- package/dist/helpers/color-mode.js +0 -9
- package/dist/helpers/download.js +0 -45
- package/dist/helpers/id-routing.js +0 -109
- package/dist/helpers/lazy-bus.js +0 -195
- package/dist/helpers/load-from-perssistance.js +0 -17
- package/dist/helpers/map-config-plugins.js +0 -27
- package/dist/helpers/map-config-to-workspace-store.js +0 -45
- package/dist/helpers/normalize-configurations.js +0 -69
- package/dist/helpers/openapi.js +0 -135
- package/dist/helpers/storage.js +0 -47
- package/dist/helpers/upload-temp-document.js +0 -24
- package/dist/hooks/use-agent.js +0 -42
- package/dist/hooks/use-intersection.js +0 -32
- package/dist/plugins/hooks/usePluginManager.js +0 -14
- package/dist/plugins/persistance-plugin.js +0 -48
- package/dist/plugins/plugin-manager.js +0 -39
- package/dist/standalone/lib/html-api.js +0 -81
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, createElementBlock, createCommentVNode, openBlock, createElementVNode, Fragment, renderList, createBlock, createVNode, unref, withCtx, createTextVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
|
-
import { ScalarButton } from "@scalar/components";
|
|
3
|
-
import { ScalarIconPlus } from "@scalar/icons";
|
|
4
|
-
import { resolve } from "@scalar/workspace-store/resolve";
|
|
5
|
-
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
6
|
-
import SchemaEnumPropertyItem from "./SchemaEnumPropertyItem.vue.js";
|
|
7
|
-
const _hoisted_1 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "property-enum"
|
|
10
|
-
};
|
|
11
|
-
const _hoisted_2 = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "property-enum-property-names"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_3 = {
|
|
16
|
-
key: 1,
|
|
17
|
-
class: "property-enum-property-names"
|
|
18
|
-
};
|
|
19
|
-
const _hoisted_4 = { class: "property-enum-values" };
|
|
20
|
-
const _hoisted_5 = { key: 1 };
|
|
21
|
-
const ENUM_DISPLAY_THRESHOLD = 9;
|
|
22
|
-
const INITIAL_VISIBLE_COUNT = 5;
|
|
23
|
-
const THIN_SPACE = " ";
|
|
24
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25
|
-
__name: "SchemaEnums",
|
|
26
|
-
props: {
|
|
27
|
-
value: {},
|
|
28
|
-
propertyNames: { type: Boolean }
|
|
29
|
-
},
|
|
30
|
-
setup(__props) {
|
|
31
|
-
const enumValues = computed(() => {
|
|
32
|
-
if (!__props.value) {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
return __props.value.enum || isArraySchema(__props.value) && resolve.schema(__props.value.items)?.enum || [];
|
|
36
|
-
});
|
|
37
|
-
const shouldUseLongListDisplay = computed(
|
|
38
|
-
() => enumValues.value.length > ENUM_DISPLAY_THRESHOLD
|
|
39
|
-
);
|
|
40
|
-
const initialVisibleCount = computed(
|
|
41
|
-
() => shouldUseLongListDisplay.value ? INITIAL_VISIBLE_COUNT : enumValues.value.length
|
|
42
|
-
);
|
|
43
|
-
const visibleEnumValues = computed(
|
|
44
|
-
() => enumValues.value.slice(0, initialVisibleCount.value)
|
|
45
|
-
);
|
|
46
|
-
const hiddenEnumValues = computed(
|
|
47
|
-
() => enumValues.value.slice(initialVisibleCount.value)
|
|
48
|
-
);
|
|
49
|
-
const getEnumValueDescription = (enumValue, index) => {
|
|
50
|
-
const descriptions = __props.value?.["x-enumDescriptions"] ?? __props.value?.["x-enum-descriptions"];
|
|
51
|
-
if (!descriptions) {
|
|
52
|
-
return void 0;
|
|
53
|
-
}
|
|
54
|
-
if (Array.isArray(descriptions)) {
|
|
55
|
-
return descriptions[index];
|
|
56
|
-
}
|
|
57
|
-
if (typeof descriptions === "object" && descriptions !== null) {
|
|
58
|
-
return descriptions[String(enumValue)];
|
|
59
|
-
}
|
|
60
|
-
return void 0;
|
|
61
|
-
};
|
|
62
|
-
const formatEnumValueWithName = (enumValue, index) => {
|
|
63
|
-
const varNames = __props.value?.["x-enum-varnames"] ?? __props.value?.["x-enumNames"];
|
|
64
|
-
const varName = Array.isArray(varNames) ? varNames[index] : void 0;
|
|
65
|
-
return varName ? `${enumValue}${THIN_SPACE}=${THIN_SPACE}${varName}` : String(enumValue);
|
|
66
|
-
};
|
|
67
|
-
const isExpanded = ref(false);
|
|
68
|
-
const toggleExpanded = () => {
|
|
69
|
-
isExpanded.value = !isExpanded.value;
|
|
70
|
-
};
|
|
71
|
-
return (_ctx, _cache) => {
|
|
72
|
-
return enumValues.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
73
|
-
__props.propertyNames ? (openBlock(), createElementBlock("div", _hoisted_2, " property names ")) : (openBlock(), createElementBlock("div", _hoisted_3, " values ")),
|
|
74
|
-
createElementVNode("ul", _hoisted_4, [
|
|
75
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleEnumValues.value, (enumValue, index) => {
|
|
76
|
-
return openBlock(), createBlock(SchemaEnumPropertyItem, {
|
|
77
|
-
key: String(enumValue),
|
|
78
|
-
description: getEnumValueDescription(enumValue, index),
|
|
79
|
-
label: formatEnumValueWithName(enumValue, index)
|
|
80
|
-
}, null, 8, ["description", "label"]);
|
|
81
|
-
}), 128)),
|
|
82
|
-
shouldUseLongListDisplay.value && isExpanded.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(hiddenEnumValues.value, (enumValue, index) => {
|
|
83
|
-
return openBlock(), createBlock(SchemaEnumPropertyItem, {
|
|
84
|
-
key: String(enumValue),
|
|
85
|
-
description: getEnumValueDescription(enumValue, initialVisibleCount.value + index),
|
|
86
|
-
label: formatEnumValueWithName(enumValue, initialVisibleCount.value + index)
|
|
87
|
-
}, null, 8, ["description", "label"]);
|
|
88
|
-
}), 128)) : createCommentVNode("", true),
|
|
89
|
-
shouldUseLongListDisplay.value ? (openBlock(), createElementBlock("li", _hoisted_5, [
|
|
90
|
-
createVNode(unref(ScalarButton), {
|
|
91
|
-
class: "enum-toggle-button my-2 flex h-fit gap-1 rounded-full border py-1.5 pr-2.5 pl-2 leading-none",
|
|
92
|
-
variant: "ghost",
|
|
93
|
-
onClick: toggleExpanded
|
|
94
|
-
}, {
|
|
95
|
-
default: withCtx(() => [
|
|
96
|
-
createVNode(unref(ScalarIconPlus), {
|
|
97
|
-
class: normalizeClass({ "rotate-45": isExpanded.value }),
|
|
98
|
-
weight: "bold"
|
|
99
|
-
}, null, 8, ["class"]),
|
|
100
|
-
createTextVNode(" " + toDisplayString(isExpanded.value ? "Hide values" : "Show all values"), 1)
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
})
|
|
104
|
-
])) : createCommentVNode("", true)
|
|
105
|
-
])
|
|
106
|
-
])) : createCommentVNode("", true);
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
export {
|
|
111
|
-
_sfc_main as default
|
|
112
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./SchemaHeading.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaHeading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70cb5c13"]]);
|
|
5
|
-
export {
|
|
6
|
-
SchemaHeading as default
|
|
7
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, createBlock, unref, Fragment, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { ScalarWrappingText } from "@scalar/components";
|
|
3
|
-
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
4
|
-
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
5
|
-
const _hoisted_1 = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "schema-type"
|
|
8
|
-
};
|
|
9
|
-
const _hoisted_2 = ["title"];
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "SchemaHeading",
|
|
12
|
-
props: {
|
|
13
|
-
value: {},
|
|
14
|
-
name: {}
|
|
15
|
-
},
|
|
16
|
-
setup(__props) {
|
|
17
|
-
const failsafeType = computed(() => {
|
|
18
|
-
if ("type" in __props.value) {
|
|
19
|
-
return __props.value.type;
|
|
20
|
-
}
|
|
21
|
-
if (__props.value.enum) {
|
|
22
|
-
return "enum";
|
|
23
|
-
}
|
|
24
|
-
if (isArraySchema(__props.value) && __props.value.items) {
|
|
25
|
-
return "array";
|
|
26
|
-
}
|
|
27
|
-
if (isTypeObject(__props.value) && (__props.value.properties || __props.value.additionalProperties)) {
|
|
28
|
-
return "object";
|
|
29
|
-
}
|
|
30
|
-
return "unknown";
|
|
31
|
-
});
|
|
32
|
-
return (_ctx, _cache) => {
|
|
33
|
-
return typeof __props.value === "object" ? (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
34
|
-
createElementVNode("span", {
|
|
35
|
-
class: "schema-type-icon",
|
|
36
|
-
title: "type" in __props.value && typeof __props.value.type === "string" ? __props.value.type : "type" in __props.value && Array.isArray(__props.value.type) ? __props.value.type.join(" | ") : "unknown type"
|
|
37
|
-
}, [
|
|
38
|
-
unref(isTypeObject)(__props.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
39
|
-
createTextVNode(" {} ")
|
|
40
|
-
], 64)) : createCommentVNode("", true),
|
|
41
|
-
unref(isArraySchema)(__props.value) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
42
|
-
createTextVNode(" [] ")
|
|
43
|
-
], 64)) : createCommentVNode("", true),
|
|
44
|
-
__props.value.enum ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
45
|
-
createTextVNode(" enum ")
|
|
46
|
-
], 64)) : createCommentVNode("", true)
|
|
47
|
-
], 8, _hoisted_2),
|
|
48
|
-
__props.name ? (openBlock(), createBlock(unref(ScalarWrappingText), {
|
|
49
|
-
key: 0,
|
|
50
|
-
text: __props.name,
|
|
51
|
-
preset: "property"
|
|
52
|
-
}, null, 8, ["text"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
53
|
-
createTextVNode(toDisplayString(failsafeType.value), 1)
|
|
54
|
-
], 64))
|
|
55
|
-
])) : createCommentVNode("", true);
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
export {
|
|
60
|
-
_sfc_main as default
|
|
61
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, createBlock, createCommentVNode, openBlock, unref, withCtx, createVNode, createElementVNode } from "vue";
|
|
2
|
-
import { ExamplePicker } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
3
|
-
import { ScalarCard, ScalarCardSection, ScalarCodeBlock, ScalarCardFooter } from "@scalar/components";
|
|
4
|
-
const _hoisted_1 = { class: "code-snippet" };
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "SchemaObjectExampleCodeBlock",
|
|
7
|
-
props: {
|
|
8
|
-
schema: {}
|
|
9
|
-
},
|
|
10
|
-
setup(__props) {
|
|
11
|
-
const examples = computed(() => {
|
|
12
|
-
const base = {};
|
|
13
|
-
if (__props.schema["x-examples"]) {
|
|
14
|
-
Object.entries(__props.schema["x-examples"]).forEach(([key, value]) => {
|
|
15
|
-
base[key] = typeof value === "object" ? JSON.stringify(value, null, 2) : String(value);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
if (__props.schema.examples) {
|
|
19
|
-
__props.schema.examples.forEach((value, index) => {
|
|
20
|
-
base[`Example ${index + 1}`] = typeof value === "object" ? JSON.stringify(value, null, 2) : String(value);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return base;
|
|
24
|
-
});
|
|
25
|
-
const selectedExampleKey = ref(Object.keys(examples.value)[0] ?? "");
|
|
26
|
-
return (_ctx, _cache) => {
|
|
27
|
-
return Object.keys(examples.value).length > 0 ? (openBlock(), createBlock(unref(ScalarCard), {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "dark-mode"
|
|
30
|
-
}, {
|
|
31
|
-
default: withCtx(() => [
|
|
32
|
-
createVNode(unref(ScalarCardSection), null, {
|
|
33
|
-
default: withCtx(() => [
|
|
34
|
-
createElementVNode("div", _hoisted_1, [
|
|
35
|
-
createVNode(unref(ScalarCodeBlock), {
|
|
36
|
-
class: "bg-b-2",
|
|
37
|
-
lang: "json",
|
|
38
|
-
lineNumbers: "",
|
|
39
|
-
prettyPrintedContent: examples.value[selectedExampleKey.value] ?? "There was an error loading the example"
|
|
40
|
-
}, null, 8, ["prettyPrintedContent"])
|
|
41
|
-
])
|
|
42
|
-
]),
|
|
43
|
-
_: 1
|
|
44
|
-
}),
|
|
45
|
-
Object.keys(examples.value).length > 1 ? (openBlock(), createBlock(unref(ScalarCardFooter), {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: "bg-b-3"
|
|
48
|
-
}, {
|
|
49
|
-
default: withCtx(() => [
|
|
50
|
-
createVNode(unref(ExamplePicker), {
|
|
51
|
-
modelValue: selectedExampleKey.value,
|
|
52
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedExampleKey.value = $event),
|
|
53
|
-
examples: examples.value
|
|
54
|
-
}, null, 8, ["modelValue", "examples"])
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
})) : createCommentVNode("", true)
|
|
58
|
-
]),
|
|
59
|
-
_: 1
|
|
60
|
-
})) : createCommentVNode("", true);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
export {
|
|
65
|
-
_sfc_main as default
|
|
66
|
-
};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock, Fragment, createCommentVNode, createBlock, unref, renderList } from "vue";
|
|
2
|
-
import { resolve } from "@scalar/workspace-store/resolve";
|
|
3
|
-
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
4
|
-
import { sortPropertyNames } from "./helpers/sort-property-names.js";
|
|
5
|
-
import SchemaProperty from "./SchemaProperty.vue.js";
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "SchemaObjectProperties",
|
|
8
|
-
props: {
|
|
9
|
-
schema: {},
|
|
10
|
-
discriminator: {},
|
|
11
|
-
compact: { type: Boolean },
|
|
12
|
-
hideHeading: { type: Boolean },
|
|
13
|
-
level: {},
|
|
14
|
-
hideModelNames: { type: Boolean },
|
|
15
|
-
breadcrumb: {},
|
|
16
|
-
eventBus: {},
|
|
17
|
-
options: {}
|
|
18
|
-
},
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const sortedProperties = computed(
|
|
21
|
-
() => sortPropertyNames(__props.schema, __props.discriminator, __props.options)
|
|
22
|
-
);
|
|
23
|
-
const getAdditionalPropertiesName = (_additionalProperties, _propertyNames) => {
|
|
24
|
-
const additionalProperties = typeof _additionalProperties === "boolean" ? _additionalProperties : resolve.schema(_additionalProperties);
|
|
25
|
-
if (typeof additionalProperties === "object" && typeof additionalProperties["x-additionalPropertiesName"] === "string" && additionalProperties["x-additionalPropertiesName"].trim().length > 0) {
|
|
26
|
-
return `${additionalProperties["x-additionalPropertiesName"].trim()}`;
|
|
27
|
-
}
|
|
28
|
-
if (_propertyNames) {
|
|
29
|
-
const resolved = resolve.schema(_propertyNames);
|
|
30
|
-
if (resolved?.title) {
|
|
31
|
-
return resolved.title;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return "propertyName";
|
|
35
|
-
};
|
|
36
|
-
const getPropertyNamesEnum = (_propertyNames) => {
|
|
37
|
-
if (!_propertyNames) {
|
|
38
|
-
return void 0;
|
|
39
|
-
}
|
|
40
|
-
const resolved = resolve.schema(_propertyNames);
|
|
41
|
-
if (resolved && "enum" in resolved && Array.isArray(resolved.enum) && resolved.enum.length > 0) {
|
|
42
|
-
return resolved.enum;
|
|
43
|
-
}
|
|
44
|
-
return void 0;
|
|
45
|
-
};
|
|
46
|
-
const additionalPropertiesEnum = computed(() => {
|
|
47
|
-
if (!isTypeObject(__props.schema) || !__props.schema.additionalProperties) {
|
|
48
|
-
return void 0;
|
|
49
|
-
}
|
|
50
|
-
return getPropertyNamesEnum(__props.schema.propertyNames);
|
|
51
|
-
});
|
|
52
|
-
const getAdditionalPropertiesValue = (additionalProperties) => {
|
|
53
|
-
if (additionalProperties === true || typeof additionalProperties === "object" && Object.keys(additionalProperties).length === 0 || typeof additionalProperties !== "object" || !("type" in additionalProperties)) {
|
|
54
|
-
return {
|
|
55
|
-
// @ts-expect-error - ask hans
|
|
56
|
-
type: "anything",
|
|
57
|
-
...typeof additionalProperties === "object" ? additionalProperties : {}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return additionalProperties;
|
|
61
|
-
};
|
|
62
|
-
return (_ctx, _cache) => {
|
|
63
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
64
|
-
unref(isTypeObject)(__props.schema) && __props.schema.properties ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(sortedProperties.value, (property) => {
|
|
65
|
-
return openBlock(), createBlock(SchemaProperty, {
|
|
66
|
-
key: property,
|
|
67
|
-
breadcrumb: __props.breadcrumb,
|
|
68
|
-
compact: __props.compact,
|
|
69
|
-
discriminator: __props.discriminator,
|
|
70
|
-
eventBus: __props.eventBus,
|
|
71
|
-
hideHeading: __props.hideHeading,
|
|
72
|
-
hideModelNames: __props.hideModelNames,
|
|
73
|
-
level: __props.level,
|
|
74
|
-
name: property,
|
|
75
|
-
options: __props.options,
|
|
76
|
-
required: __props.schema.required?.includes(property),
|
|
77
|
-
schema: unref(resolve).schema(__props.schema.properties[property])
|
|
78
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "eventBus", "hideHeading", "hideModelNames", "level", "name", "options", "required", "schema"]);
|
|
79
|
-
}), 128)) : createCommentVNode("", true),
|
|
80
|
-
unref(isTypeObject)(__props.schema) && __props.schema.patternProperties ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(Object.entries(__props.schema.patternProperties), ([key, property]) => {
|
|
81
|
-
return openBlock(), createBlock(SchemaProperty, {
|
|
82
|
-
key,
|
|
83
|
-
breadcrumb: __props.breadcrumb,
|
|
84
|
-
compact: __props.compact,
|
|
85
|
-
discriminator: __props.discriminator,
|
|
86
|
-
eventBus: __props.eventBus,
|
|
87
|
-
hideHeading: __props.hideHeading,
|
|
88
|
-
hideModelNames: __props.hideModelNames,
|
|
89
|
-
level: __props.level,
|
|
90
|
-
name: key,
|
|
91
|
-
options: __props.options,
|
|
92
|
-
schema: unref(resolve).schema(property)
|
|
93
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "eventBus", "hideHeading", "hideModelNames", "level", "name", "options", "schema"]);
|
|
94
|
-
}), 128)) : createCommentVNode("", true),
|
|
95
|
-
unref(isTypeObject)(__props.schema) && __props.schema.additionalProperties ? (openBlock(), createBlock(SchemaProperty, {
|
|
96
|
-
key: 2,
|
|
97
|
-
breadcrumb: __props.breadcrumb,
|
|
98
|
-
compact: __props.compact,
|
|
99
|
-
discriminator: __props.discriminator,
|
|
100
|
-
eventBus: __props.eventBus,
|
|
101
|
-
hideHeading: __props.hideHeading,
|
|
102
|
-
hideModelNames: __props.hideModelNames,
|
|
103
|
-
level: __props.level,
|
|
104
|
-
name: getAdditionalPropertiesName(
|
|
105
|
-
__props.schema.additionalProperties,
|
|
106
|
-
__props.schema.propertyNames
|
|
107
|
-
),
|
|
108
|
-
noncollapsible: "",
|
|
109
|
-
options: __props.options,
|
|
110
|
-
propertyNamesEnum: additionalPropertiesEnum.value,
|
|
111
|
-
schema: getAdditionalPropertiesValue(__props.schema.additionalProperties),
|
|
112
|
-
variant: "additionalProperties"
|
|
113
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "eventBus", "hideHeading", "hideModelNames", "level", "name", "options", "propertyNamesEnum", "schema"])) : createCommentVNode("", true)
|
|
114
|
-
], 64);
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
export {
|
|
119
|
-
_sfc_main as default
|
|
120
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./SchemaProperty.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6031fee6"]]);
|
|
5
|
-
export {
|
|
6
|
-
SchemaProperty as default
|
|
7
|
-
};
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createCommentVNode, createElementBlock, createVNode, createSlots, unref, createTextVNode, toDisplayString, Fragment, renderList } from "vue";
|
|
2
|
-
import { ScalarWrappingText, ScalarMarkdown } from "@scalar/components";
|
|
3
|
-
import { resolve } from "@scalar/workspace-store/resolve";
|
|
4
|
-
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
5
|
-
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
6
|
-
import { getCompositionsToRender } from "./helpers/get-compositions-to-render.js";
|
|
7
|
-
import { getEnumValues } from "./helpers/get-enum-values.js";
|
|
8
|
-
import { getPropertyDescription } from "./helpers/get-property-description.js";
|
|
9
|
-
import { hasComplexArrayItems } from "./helpers/has-complex-array-items.js";
|
|
10
|
-
import { optimizeValueForDisplay } from "./helpers/optimize-value-for-display.js";
|
|
11
|
-
import { shouldDisplayDescription } from "./helpers/should-display-description.js";
|
|
12
|
-
import { shouldDisplayHeading } from "./helpers/should-display-heading.js";
|
|
13
|
-
import Schema from "./Schema.vue.js";
|
|
14
|
-
import _sfc_main$2 from "./SchemaComposition.vue.js";
|
|
15
|
-
import SchemaEnums from "./SchemaEnums.vue.js";
|
|
16
|
-
import SchemaPropertyHeading from "./SchemaPropertyHeading.vue.js";
|
|
17
|
-
import _sfc_main$1 from "../../Anchor/WithBreadcrumb.vue.js";
|
|
18
|
-
import _sfc_main$3 from "../../../features/specification-extension/SpecificationExtension.vue2.js";
|
|
19
|
-
const _hoisted_1 = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "property-name-pattern-properties"
|
|
22
|
-
};
|
|
23
|
-
const _hoisted_2 = {
|
|
24
|
-
key: 1,
|
|
25
|
-
class: "property-name-additional-properties"
|
|
26
|
-
};
|
|
27
|
-
const _hoisted_3 = {
|
|
28
|
-
key: 1,
|
|
29
|
-
class: "property-description"
|
|
30
|
-
};
|
|
31
|
-
const _hoisted_4 = {
|
|
32
|
-
key: 4,
|
|
33
|
-
class: "children"
|
|
34
|
-
};
|
|
35
|
-
const _hoisted_5 = {
|
|
36
|
-
key: 5,
|
|
37
|
-
class: "children"
|
|
38
|
-
};
|
|
39
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
|
-
__name: "SchemaProperty",
|
|
41
|
-
props: {
|
|
42
|
-
is: {},
|
|
43
|
-
schema: {},
|
|
44
|
-
noncollapsible: { type: Boolean },
|
|
45
|
-
level: { default: 0 },
|
|
46
|
-
name: {},
|
|
47
|
-
required: { type: Boolean, default: false },
|
|
48
|
-
compact: { type: Boolean, default: false },
|
|
49
|
-
discriminator: {},
|
|
50
|
-
description: {},
|
|
51
|
-
hideModelNames: { type: Boolean, default: false },
|
|
52
|
-
hideHeading: { type: Boolean },
|
|
53
|
-
modelName: {},
|
|
54
|
-
variant: {},
|
|
55
|
-
breadcrumb: {},
|
|
56
|
-
eventBus: {},
|
|
57
|
-
options: {},
|
|
58
|
-
propertyNamesEnum: {}
|
|
59
|
-
},
|
|
60
|
-
setup(__props) {
|
|
61
|
-
const props = __props;
|
|
62
|
-
const optimizedValue = computed(() => optimizeValueForDisplay(props.schema));
|
|
63
|
-
const childBreadcrumb = computed(
|
|
64
|
-
() => props.breadcrumb && props.name ? [...props.breadcrumb, props.name] : void 0
|
|
65
|
-
);
|
|
66
|
-
const shouldHaveLink = computed(() => props.level <= 1);
|
|
67
|
-
const hasComplexArrayItemsComputed = computed(
|
|
68
|
-
() => hasComplexArrayItems(optimizedValue.value)
|
|
69
|
-
);
|
|
70
|
-
const hasEnum = computed(() => enumValues.value.length > 0);
|
|
71
|
-
const shouldRenderObjectProperties = computed(() => {
|
|
72
|
-
const value = optimizedValue.value;
|
|
73
|
-
if (!value) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
return isTypeObject(value) && ("properties" in value || "additionalProperties" in value);
|
|
77
|
-
});
|
|
78
|
-
const shouldRenderArrayOfObjects = computed(() => {
|
|
79
|
-
const value = optimizedValue.value;
|
|
80
|
-
if (!value || !isArraySchema(value) || typeof value.items !== "object") {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
return hasComplexArrayItemsComputed.value;
|
|
84
|
-
});
|
|
85
|
-
const enumValues = computed(() => getEnumValues(optimizedValue.value));
|
|
86
|
-
const propertyDescription = computed(
|
|
87
|
-
() => getPropertyDescription(optimizedValue.value)
|
|
88
|
-
);
|
|
89
|
-
const displayDescription = computed(
|
|
90
|
-
() => shouldDisplayDescription(optimizedValue.value, props.description)
|
|
91
|
-
);
|
|
92
|
-
const objectSchemaForChildren = computed(() => {
|
|
93
|
-
const value = optimizedValue.value;
|
|
94
|
-
if (!value || !displayDescription.value || !("description" in value)) {
|
|
95
|
-
return value;
|
|
96
|
-
}
|
|
97
|
-
const { description: _description, ...schemaWithoutDescription } = value;
|
|
98
|
-
return schemaWithoutDescription;
|
|
99
|
-
});
|
|
100
|
-
const shouldDisplayHeadingComputed = computed(
|
|
101
|
-
() => shouldDisplayHeading(optimizedValue.value, props.name, props.required)
|
|
102
|
-
);
|
|
103
|
-
const compositionsToRender = computed(
|
|
104
|
-
() => getCompositionsToRender(optimizedValue.value)
|
|
105
|
-
);
|
|
106
|
-
const resolvedArrayItems = computed(() => {
|
|
107
|
-
const value = optimizedValue.value;
|
|
108
|
-
if (!value || !isArraySchema(value) || typeof value.items !== "object") {
|
|
109
|
-
return void 0;
|
|
110
|
-
}
|
|
111
|
-
return resolve.schema(value.items);
|
|
112
|
-
});
|
|
113
|
-
const isDiscriminatorProperty = computed(
|
|
114
|
-
() => Boolean(props.name && props.discriminator?.propertyName === props.name)
|
|
115
|
-
);
|
|
116
|
-
return (_ctx, _cache) => {
|
|
117
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.is ?? "li"), {
|
|
118
|
-
class: normalizeClass(["property", [
|
|
119
|
-
`property--level-${__props.level}`,
|
|
120
|
-
{
|
|
121
|
-
"property--compact": __props.compact,
|
|
122
|
-
"property--deprecated": optimizedValue.value?.deprecated
|
|
123
|
-
}
|
|
124
|
-
]])
|
|
125
|
-
}, {
|
|
126
|
-
default: withCtx(() => [
|
|
127
|
-
shouldDisplayHeadingComputed.value ? (openBlock(), createBlock(SchemaPropertyHeading, {
|
|
128
|
-
key: 0,
|
|
129
|
-
class: "group",
|
|
130
|
-
enum: hasEnum.value,
|
|
131
|
-
hideModelNames: __props.hideModelNames,
|
|
132
|
-
isDiscriminator: isDiscriminatorProperty.value,
|
|
133
|
-
modelName: __props.modelName,
|
|
134
|
-
required: __props.required,
|
|
135
|
-
value: optimizedValue.value
|
|
136
|
-
}, createSlots({ _: 2 }, [
|
|
137
|
-
__props.name ? {
|
|
138
|
-
name: "name",
|
|
139
|
-
fn: withCtx(() => [
|
|
140
|
-
createVNode(unref(_sfc_main$1), {
|
|
141
|
-
breadcrumb: shouldHaveLink.value ? childBreadcrumb.value : void 0,
|
|
142
|
-
eventBus: __props.eventBus
|
|
143
|
-
}, {
|
|
144
|
-
default: withCtx(() => [
|
|
145
|
-
__props.variant === "patternProperties" ? (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
146
|
-
createVNode(unref(ScalarWrappingText), {
|
|
147
|
-
preset: "property",
|
|
148
|
-
text: __props.name
|
|
149
|
-
}, null, 8, ["text"])
|
|
150
|
-
])) : __props.variant === "additionalProperties" ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
151
|
-
createVNode(unref(ScalarWrappingText), {
|
|
152
|
-
preset: "property",
|
|
153
|
-
text: __props.name
|
|
154
|
-
}, null, 8, ["text"])
|
|
155
|
-
])) : (openBlock(), createBlock(unref(ScalarWrappingText), {
|
|
156
|
-
key: 2,
|
|
157
|
-
preset: "property",
|
|
158
|
-
text: __props.name
|
|
159
|
-
}, null, 8, ["text"]))
|
|
160
|
-
]),
|
|
161
|
-
_: 1
|
|
162
|
-
}, 8, ["breadcrumb", "eventBus"])
|
|
163
|
-
]),
|
|
164
|
-
key: "0"
|
|
165
|
-
} : void 0,
|
|
166
|
-
optimizedValue.value?.example ? {
|
|
167
|
-
name: "example",
|
|
168
|
-
fn: withCtx(() => [
|
|
169
|
-
createTextVNode(" Example: " + toDisplayString(optimizedValue.value.example), 1)
|
|
170
|
-
]),
|
|
171
|
-
key: "1"
|
|
172
|
-
} : void 0
|
|
173
|
-
]), 1032, ["enum", "hideModelNames", "isDiscriminator", "modelName", "required", "value"])) : createCommentVNode("", true),
|
|
174
|
-
displayDescription.value || propertyDescription.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
175
|
-
createVNode(unref(ScalarMarkdown), {
|
|
176
|
-
value: displayDescription.value || propertyDescription.value || ""
|
|
177
|
-
}, null, 8, ["value"])
|
|
178
|
-
])) : createCommentVNode("", true),
|
|
179
|
-
__props.propertyNamesEnum && __props.propertyNamesEnum.length > 0 ? (openBlock(), createBlock(SchemaEnums, {
|
|
180
|
-
key: 2,
|
|
181
|
-
propertyNames: "",
|
|
182
|
-
value: { enum: __props.propertyNamesEnum }
|
|
183
|
-
}, null, 8, ["value"])) : createCommentVNode("", true),
|
|
184
|
-
enumValues.value.length > 0 ? (openBlock(), createBlock(SchemaEnums, {
|
|
185
|
-
key: 3,
|
|
186
|
-
value: optimizedValue.value
|
|
187
|
-
}, null, 8, ["value"])) : createCommentVNode("", true),
|
|
188
|
-
shouldRenderObjectProperties.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
189
|
-
createVNode(Schema, {
|
|
190
|
-
breadcrumb: childBreadcrumb.value,
|
|
191
|
-
compact: __props.compact,
|
|
192
|
-
eventBus: __props.eventBus,
|
|
193
|
-
level: __props.level + 1,
|
|
194
|
-
name: __props.name,
|
|
195
|
-
noncollapsible: __props.noncollapsible,
|
|
196
|
-
options: __props.options,
|
|
197
|
-
schema: objectSchemaForChildren.value
|
|
198
|
-
}, null, 8, ["breadcrumb", "compact", "eventBus", "level", "name", "noncollapsible", "options", "schema"])
|
|
199
|
-
])) : createCommentVNode("", true),
|
|
200
|
-
shouldRenderArrayOfObjects.value && resolvedArrayItems.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
201
|
-
createVNode(Schema, {
|
|
202
|
-
compact: __props.compact,
|
|
203
|
-
eventBus: __props.eventBus,
|
|
204
|
-
level: __props.level + 1,
|
|
205
|
-
name: __props.name,
|
|
206
|
-
noncollapsible: __props.noncollapsible,
|
|
207
|
-
options: __props.options,
|
|
208
|
-
schema: unref(resolve).schema(resolvedArrayItems.value)
|
|
209
|
-
}, null, 8, ["compact", "eventBus", "level", "name", "noncollapsible", "options", "schema"])
|
|
210
|
-
])) : createCommentVNode("", true),
|
|
211
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(compositionsToRender.value, (compositionData) => {
|
|
212
|
-
return openBlock(), createBlock(_sfc_main$2, {
|
|
213
|
-
key: compositionData.composition,
|
|
214
|
-
breadcrumb: __props.breadcrumb,
|
|
215
|
-
compact: __props.compact,
|
|
216
|
-
composition: compositionData.composition,
|
|
217
|
-
discriminator: __props.schema?.discriminator,
|
|
218
|
-
eventBus: __props.eventBus,
|
|
219
|
-
hideHeading: __props.hideHeading,
|
|
220
|
-
level: __props.level,
|
|
221
|
-
name: __props.name,
|
|
222
|
-
noncollapsible: __props.noncollapsible,
|
|
223
|
-
options: __props.options,
|
|
224
|
-
schema: compositionData.value
|
|
225
|
-
}, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "eventBus", "hideHeading", "level", "name", "noncollapsible", "options", "schema"]);
|
|
226
|
-
}), 128)),
|
|
227
|
-
createVNode(unref(_sfc_main$3), { value: optimizedValue.value }, null, 8, ["value"])
|
|
228
|
-
]),
|
|
229
|
-
_: 1
|
|
230
|
-
}, 8, ["class"]);
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
export {
|
|
235
|
-
_sfc_main as default
|
|
236
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./SchemaPropertyDefault.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaPropertyDefault = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4da5c70a"]]);
|
|
5
|
-
export {
|
|
6
|
-
SchemaPropertyDefault as default
|
|
7
|
-
};
|