@scalar/api-reference 1.61.0 → 1.62.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 +31 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +8 -5
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +11 -7
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts +36 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js +7 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js +69 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts +28 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js +7 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js +62 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts +18 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js +59 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts +3 -0
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +6 -3
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +4 -2
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +3 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +17 -3
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +4 -2
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +16 -12
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +11 -7
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +7 -4
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
- package/dist/browser/chunks/AgentScalarChatInterface-D7J_MHKY.js +27 -0
- package/dist/browser/chunks/ScalarTextInput.vue-Fb0snAee.js +27 -0
- package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
- package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
- package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
- package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
- package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
- package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
- package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
- package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
- package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
- package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
- package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
- package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
- package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
- package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
- package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
- package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
- package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
- package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
- package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
- package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
- package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
- package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
- package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
- package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
- package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
- package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
- package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
- package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
- package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
- package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
- package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
- package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
- package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
- package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
- package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
- package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
- package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
- package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
- package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
- package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
- package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
- package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
- package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
- package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
- package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
- package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
- package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
- package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
- package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
- package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
- package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
- package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
- package/dist/browser/chunks/{modal-CZI71Aau.js → modal-BLBi4S4R.js} +20 -20
- package/dist/browser/chunks/{modal-CKthJJWy.js → modal-BlpWsFBT.js} +2 -2
- package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
- package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
- package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
- package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
- package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
- package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
- package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
- package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
- package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
- package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
- package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
- package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
- package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
- package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
- package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
- package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
- package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
- package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
- package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
- package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
- package/dist/browser/chunks/vendor-DHN5fsxL.js +306 -0
- package/dist/browser/standalone.esm.js +20 -20
- package/dist/browser/standalone.js +293 -293
- package/dist/components/AgentScalar/AgentScalarButton.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +4 -2
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +4 -2
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +8 -6
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js.map +1 -1
- package/dist/components/Anchor/Anchor.vue.script.js +5 -3
- package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +1 -3
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js +6 -2
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue.js.map +1 -1
- package/dist/components/ApiReference.vue.script.js +172 -43
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +6 -2
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/Message.vue.script.js +1 -1
- package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.script.js +5 -2
- package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +1 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js.map +1 -1
- package/dist/components/Content/Content.vue.script.js +4 -1
- package/dist/components/Content/Content.vue.script.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js +9 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.script.js +100 -16
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js +9 -11
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js +4 -2
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js +5 -3
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +12 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +41 -9
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +8 -5
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +5 -3
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +48 -23
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts +27 -0
- package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/dynamic-scope.js +35 -0
- package/dist/components/Content/Schema/helpers/dynamic-scope.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +10 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +11 -2
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +9 -2
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +3 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.script.js +3 -1
- package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/GettingStarted.vue.js.map +1 -1
- package/dist/components/GettingStarted.vue.script.js +58 -21
- package/dist/components/GettingStarted.vue.script.js.map +1 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js.map +1 -1
- package/dist/components/MobileHeader.vue.script.js +3 -1
- package/dist/components/MobileHeader.vue.script.js.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.script.js +4 -2
- package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.js.map +1 -1
- package/dist/components/ShowMoreButton.vue.script.js +4 -2
- package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
- package/dist/features/Operation/Operation.vue.d.ts +3 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js.map +1 -1
- package/dist/features/Operation/Operation.vue.script.js +6 -1
- package/dist/features/Operation/Operation.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +4 -2
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js +8 -6
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.script.js +8 -6
- package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.script.js +10 -7
- package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js +21 -14
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +5 -3
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +11 -8
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +37 -17
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +22 -7
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.script.js +15 -8
- package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.js +1 -1
- package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.script.js +29 -10
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js +12 -8
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/features/Search/helpers/create-search-index.d.ts +8 -0
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-search-index.js +18 -9
- package/dist/features/Search/helpers/create-search-index.js.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.d.ts +7 -1
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.js +11 -2
- package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +10 -6
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
- package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -1
- package/dist/features/developer-tools/DeveloperTools.vue.script.js +10 -8
- package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +11 -11
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +15 -11
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts +1 -3
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +4 -6
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +6 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +23 -22
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +7 -5
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +9 -7
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +7 -4
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +8 -6
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +7 -4
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.script.js +5 -3
- package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.d.ts +9 -0
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.script.js +42 -23
- package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
- package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
- package/dist/features/info-object/Contact.vue.js.map +1 -1
- package/dist/features/info-object/Contact.vue.script.js +14 -11
- package/dist/features/info-object/Contact.vue.script.js.map +1 -1
- package/dist/features/info-object/InfoLink.vue.d.ts +8 -0
- package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -0
- package/dist/features/info-object/InfoLink.vue.js +7 -0
- package/dist/features/info-object/InfoLink.vue.js.map +1 -0
- package/dist/features/info-object/InfoLink.vue.script.js +30 -0
- package/dist/features/info-object/InfoLink.vue.script.js.map +1 -0
- package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.script.js +9 -6
- package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
- package/dist/features/info-object/index.d.ts +1 -0
- package/dist/features/info-object/index.d.ts.map +1 -1
- package/dist/features/localization/index.d.ts +2 -0
- package/dist/features/localization/index.d.ts.map +1 -0
- package/dist/features/localization/locales/ar.d.ts +227 -0
- package/dist/features/localization/locales/ar.d.ts.map +1 -0
- package/dist/features/localization/locales/ar.js +225 -0
- package/dist/features/localization/locales/ar.js.map +1 -0
- package/dist/features/localization/locales/de.d.ts +227 -0
- package/dist/features/localization/locales/de.d.ts.map +1 -0
- package/dist/features/localization/locales/de.js +225 -0
- package/dist/features/localization/locales/de.js.map +1 -0
- package/dist/features/localization/locales/en.d.ts +227 -0
- package/dist/features/localization/locales/en.d.ts.map +1 -0
- package/dist/features/localization/locales/en.js +225 -0
- package/dist/features/localization/locales/en.js.map +1 -0
- package/dist/features/localization/locales/es.d.ts +227 -0
- package/dist/features/localization/locales/es.d.ts.map +1 -0
- package/dist/features/localization/locales/es.js +225 -0
- package/dist/features/localization/locales/es.js.map +1 -0
- package/dist/features/localization/locales/fr.d.ts +227 -0
- package/dist/features/localization/locales/fr.d.ts.map +1 -0
- package/dist/features/localization/locales/fr.js +225 -0
- package/dist/features/localization/locales/fr.js.map +1 -0
- package/dist/features/localization/locales/ru.d.ts +227 -0
- package/dist/features/localization/locales/ru.d.ts.map +1 -0
- package/dist/features/localization/locales/ru.js +225 -0
- package/dist/features/localization/locales/ru.js.map +1 -0
- package/dist/features/localization/locales/zh-cn.d.ts +227 -0
- package/dist/features/localization/locales/zh-cn.d.ts.map +1 -0
- package/dist/features/localization/locales/zh-cn.js +225 -0
- package/dist/features/localization/locales/zh-cn.js.map +1 -0
- package/dist/features/localization/translations.d.ts +1588 -0
- package/dist/features/localization/translations.d.ts.map +1 -0
- package/dist/features/localization/translations.js +27 -0
- package/dist/features/localization/translations.js.map +1 -0
- package/dist/features/localization/use-localization.d.ts +18 -0
- package/dist/features/localization/use-localization.d.ts.map +1 -0
- package/dist/features/localization/use-localization.js +58 -0
- package/dist/features/localization/use-localization.js.map +1 -0
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.script.js +3 -1
- package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
- package/dist/helpers/is-introduction-entry.d.ts +16 -0
- package/dist/helpers/is-introduction-entry.d.ts.map +1 -0
- package/dist/helpers/is-introduction-entry.js +17 -0
- package/dist/helpers/is-introduction-entry.js.map +1 -0
- package/dist/helpers/load-from-perssistance.js +1 -1
- package/dist/helpers/load-from-perssistance.js.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.js +1 -1
- package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
- package/dist/helpers/storage.d.ts +14 -14
- package/dist/style.css +446 -434
- package/dist/styles/tailwind.config.css +1 -0
- package/dist/vue-styles.css +383 -380
- package/package.json +17 -16
- package/dist/browser/chunks/AgentScalarChatInterface-BhUn0w1j.js +0 -27
- package/dist/browser/chunks/ScalarTextInput.vue-BUzf4Z_k.js +0 -27
- package/dist/browser/chunks/vendor-BeJNu9KM.js +0 -306
- package/dist/features/Operation/helpers/get-first-server.d.ts +0 -9
- package/dist/features/Operation/helpers/get-first-server.d.ts.map +0 -1
- package/dist/features/Operation/helpers/get-first-server.js +0 -27
- package/dist/features/Operation/helpers/get-first-server.js.map +0 -1
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { useLocalization } from "../../localization/use-localization.js";
|
|
1
2
|
import ParameterListItem_default from "./ParameterListItem.vue.js";
|
|
2
|
-
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, renderList, unref } from "vue";
|
|
3
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, renderList, toDisplayString, unref } from "vue";
|
|
3
4
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
5
|
//#region src/features/Operation/components/OperationResponses.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
var _hoisted_1 = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "mt-6"
|
|
8
9
|
};
|
|
9
|
-
var _hoisted_2 = {
|
|
10
|
-
|
|
11
|
-
class: "mb-3 list-none p-0 text-sm"
|
|
12
|
-
};
|
|
10
|
+
var _hoisted_2 = { class: "text-c-1 mt-3 mb-3 leading-[1.45] font-medium" };
|
|
11
|
+
var _hoisted_3 = ["aria-label"];
|
|
13
12
|
var OperationResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
14
13
|
__name: "OperationResponses",
|
|
15
14
|
props: {
|
|
@@ -21,8 +20,12 @@ var OperationResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE_
|
|
|
21
20
|
options: {}
|
|
22
21
|
},
|
|
23
22
|
setup(__props) {
|
|
23
|
+
const { translate } = useLocalization();
|
|
24
24
|
return (_ctx, _cache) => {
|
|
25
|
-
return Object.keys(__props.responses ?? {}).length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
25
|
+
return Object.keys(__props.responses ?? {}).length ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, toDisplayString(unref(translate)("operation.responses")), 1), createElementVNode("ul", {
|
|
26
|
+
"aria-label": unref(translate)("operation.responses"),
|
|
27
|
+
class: "mb-3 list-none p-0 text-sm"
|
|
28
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.responses, (response, status) => {
|
|
26
29
|
return openBlock(), createBlock(ParameterListItem_default, {
|
|
27
30
|
key: status,
|
|
28
31
|
breadcrumb: __props.breadcrumb,
|
|
@@ -41,7 +44,7 @@ var OperationResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE_
|
|
|
41
44
|
"options",
|
|
42
45
|
"parameter"
|
|
43
46
|
]);
|
|
44
|
-
}), 128))])])) : createCommentVNode("", true);
|
|
47
|
+
}), 128))], 8, _hoisted_3)])) : createCommentVNode("", true);
|
|
45
48
|
};
|
|
46
49
|
}
|
|
47
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationResponses.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { responses } = defineProps<{\n responses: OperationObject['responses']\n breadcrumb?: string[]\n collapsableItems?: boolean\n eventBus: WorkspaceEventBus | null\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\n</script>\n<template>\n <div\n v-if=\"Object.keys(responses ?? {}).length\"\n class=\"mt-6\">\n <div class=\"text-c-1 mt-3 mb-3 leading-[1.45] font-medium\"
|
|
1
|
+
{"version":3,"file":"OperationResponses.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { useLocalization } from '@/features/localization'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { responses } = defineProps<{\n responses: OperationObject['responses']\n breadcrumb?: string[]\n collapsableItems?: boolean\n eventBus: WorkspaceEventBus | null\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\nconst { translate } = useLocalization()\n</script>\n<template>\n <div\n v-if=\"Object.keys(responses ?? {}).length\"\n class=\"mt-6\">\n <div class=\"text-c-1 mt-3 mb-3 leading-[1.45] font-medium\">\n {{ translate('operation.responses') }}\n </div>\n <ul\n :aria-label=\"translate('operation.responses')\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"(response, status) in responses\"\n :key=\"status\"\n :breadcrumb\n :collapsableItems\n :document\n :eventBus\n :name=\"status\"\n :options\n :parameter=\"getResolvedRef(response)\" />\n </ul>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EA4BA,MAAM,EAAE,cAAc,iBAAgB;;UAI5B,OAAO,KAAK,QAAA,aAAS,EAAA,CAAA,CAAQ,UAAA,WAAA,EADrC,mBAoBM,OApBN,YAoBM,CAjBJ,mBAEM,OAFN,YAEM,gBADD,MAAA,UAAS,CAAA,sBAAA,CAAA,EAAA,EAAA,EAEd,mBAaK,MAAA;IAZF,cAAY,MAAA,UAAS,CAAA,sBAAA;IACtB,OAAM;yBACN,mBAS0C,UAAA,MAAA,WARX,QAAA,YAArB,UAAU,WAAM;wBAD1B,YAS0C,2BAAA;KAPvC,KAAK;KACL,YAAA,QAAA;KACA,kBAAA,QAAA;KACA,UAAA,QAAA;KACA,UAAA,QAAA;KACA,MAAM;KACN,SAAA,QAAA;KACA,WAAW,MAAA,eAAc,CAAC,SAAQ"}
|
|
@@ -6,8 +6,8 @@ import { getParameterExamples } from "./helpers/get-parameter-examples.js";
|
|
|
6
6
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, resolveDynamicComponent, unref, withCtx } from "vue";
|
|
7
7
|
import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/vue";
|
|
8
8
|
import { ScalarIconCaretRight } from "@scalar/icons";
|
|
9
|
-
import { ScalarMarkdown, ScalarMarkdownSummary } from "@scalar/components/markdown";
|
|
10
9
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
10
|
+
import { ScalarMarkdown, ScalarMarkdownSummary } from "@scalar/components/markdown";
|
|
11
11
|
import { ScalarWrappingText } from "@scalar/components/wrapping-text";
|
|
12
12
|
//#region src/features/Operation/components/ParameterListItem.vue?vue&type=script&setup=true&lang.ts
|
|
13
13
|
var _hoisted_1 = { class: "parameter-item group/parameter-item" };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AA4SA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAgBrE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE;QACP,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;QACzD,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;QAC/B,yBAAyB,EAAE,OAAO,GAAG,SAAS,CAAA;KAC/C,CAAA;CACF,CAAC;AA+GF,KAAK,gBAAgB,GAAG;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAuRxD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK7C,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
|
|
|
2
2
|
import RequestBody_vue_vue_type_script_setup_true_lang_default from "./RequestBody.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/features/Operation/components/RequestBody.vue
|
|
5
|
-
var RequestBody_default = /* @__PURE__ */ _plugin_vue_export_helper_default(RequestBody_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var RequestBody_default = /* @__PURE__ */ _plugin_vue_export_helper_default(RequestBody_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-96399c9a"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { RequestBody_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n aria-label=\"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
+
import { useLocalization } from "../../localization/use-localization.js";
|
|
2
|
+
import { inferDiscriminatorMappingComposition } from "../../../components/Content/Schema/helpers/get-compositions-to-render.js";
|
|
1
3
|
import { isTypeObject } from "../../../components/Content/Schema/helpers/is-type-object.js";
|
|
2
|
-
import { reduceNamesToObject, sortPropertyNames } from "../../../components/Content/Schema/helpers/sort-property-names.js";
|
|
3
4
|
import { getModelNameFromSchema } from "../../../components/Content/Schema/helpers/schema-name.js";
|
|
5
|
+
import { reduceNamesToObject, sortPropertyNames } from "../../../components/Content/Schema/helpers/sort-property-names.js";
|
|
4
6
|
import LinkButton_default from "../../../components/Content/Schema/LinkButton.vue.js";
|
|
5
7
|
import Schema_default from "../../../components/Content/Schema/Schema.vue.js";
|
|
6
8
|
import ContentTypeSelect_default from "./ContentTypeSelect.vue.js";
|
|
7
9
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, renderSlot, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
8
|
-
import { ScalarMarkdown } from "@scalar/components/markdown";
|
|
9
10
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
11
|
+
import { ScalarMarkdown } from "@scalar/components/markdown";
|
|
10
12
|
//#region src/features/Operation/components/RequestBody.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var _hoisted_1 =
|
|
12
|
-
key: 0,
|
|
13
|
-
"aria-label": "Request Body",
|
|
14
|
-
class: "request-body",
|
|
15
|
-
role: "group"
|
|
16
|
-
};
|
|
13
|
+
var _hoisted_1 = ["aria-label"];
|
|
17
14
|
var _hoisted_2 = { class: "request-body-header" };
|
|
18
15
|
var _hoisted_3 = { class: "request-body-title" };
|
|
19
16
|
var _hoisted_4 = {
|
|
@@ -53,6 +50,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
53
50
|
}),
|
|
54
51
|
emits: ["update:selectedContentType"],
|
|
55
52
|
setup(__props) {
|
|
53
|
+
const { translate } = useLocalization();
|
|
56
54
|
/**
|
|
57
55
|
* The maximum number of properties to show in the request body schema.
|
|
58
56
|
*/
|
|
@@ -72,6 +70,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
72
70
|
*/
|
|
73
71
|
const partitionedSchema = computed(() => {
|
|
74
72
|
if (!schema.value || !isTypeObject(schema.value)) return null;
|
|
73
|
+
if (inferDiscriminatorMappingComposition(schema.value, __props.document)) return null;
|
|
75
74
|
const sortedNames = sortPropertyNames(schema.value, schema.value.discriminator, {
|
|
76
75
|
hideReadOnly: true,
|
|
77
76
|
orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy,
|
|
@@ -100,7 +99,12 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
100
99
|
*/
|
|
101
100
|
const shouldRenderRequestBody = computed(() => Object.keys(__props.requestBody?.content ?? {}).length > 0 || __props.requestBody?.description || __props.requestBody?.required);
|
|
102
101
|
return (_ctx, _cache) => {
|
|
103
|
-
return __props.requestBody && shouldRenderRequestBody.value ? (openBlock(), createElementBlock("div",
|
|
102
|
+
return __props.requestBody && shouldRenderRequestBody.value ? (openBlock(), createElementBlock("div", {
|
|
103
|
+
key: 0,
|
|
104
|
+
"aria-label": unref(translate)("operation.requestBody"),
|
|
105
|
+
class: "request-body",
|
|
106
|
+
role: "group"
|
|
107
|
+
}, [createElementVNode("div", _hoisted_2, [
|
|
104
108
|
createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "title", {}, void 0, true), modelLink.value ? (openBlock(), createElementBlock("span", _hoisted_4, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "text-c-3 mx-1.5" }, "·", -1)), __props.eventBus && modelLink.value.schemaKey ? (openBlock(), createBlock(LinkButton_default, {
|
|
105
109
|
key: 0,
|
|
106
110
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.eventBus.emit("scroll-to:model-by-name", { name: modelLink.value.schemaKey }))
|
|
@@ -108,7 +112,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
108
112
|
default: withCtx(() => [createTextVNode(toDisplayString(modelLink.value.label), 1)]),
|
|
109
113
|
_: 1
|
|
110
114
|
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(modelLink.value.label), 1)], 64))])) : createCommentVNode("", true)]),
|
|
111
|
-
createElementVNode("div", _hoisted_5, [__props.requestBody.required ? (openBlock(), createElementBlock("div", _hoisted_6, "
|
|
115
|
+
createElementVNode("div", _hoisted_5, [__props.requestBody.required ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(unref(translate)("common.required")), 1)) : createCommentVNode("", true), createVNode(ContentTypeSelect_default, {
|
|
112
116
|
modelValue: selectedContentType.value,
|
|
113
117
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedContentType.value = $event),
|
|
114
118
|
content: __props.requestBody.content
|
|
@@ -119,7 +123,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
119
123
|
compact: "",
|
|
120
124
|
compositionPath: ["requestBody"],
|
|
121
125
|
eventBus: __props.eventBus,
|
|
122
|
-
name: "
|
|
126
|
+
name: unref(translate)("operation.requestBody"),
|
|
123
127
|
noncollapsible: "",
|
|
124
128
|
options: {
|
|
125
129
|
hideReadOnly: true,
|
|
@@ -133,6 +137,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
133
137
|
}, null, 8, [
|
|
134
138
|
"breadcrumb",
|
|
135
139
|
"eventBus",
|
|
140
|
+
"name",
|
|
136
141
|
"options",
|
|
137
142
|
"schema"
|
|
138
143
|
]), createVNode(unref(Schema_default), {
|
|
@@ -142,7 +147,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
142
147
|
compositionPath: ["requestBody"],
|
|
143
148
|
eventBus: __props.eventBus,
|
|
144
149
|
hideDescription: "",
|
|
145
|
-
name: "
|
|
150
|
+
name: unref(translate)("operation.requestBody"),
|
|
146
151
|
options: {
|
|
147
152
|
hideReadOnly: true,
|
|
148
153
|
orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
|
|
@@ -155,6 +160,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
155
160
|
}, null, 8, [
|
|
156
161
|
"breadcrumb",
|
|
157
162
|
"eventBus",
|
|
163
|
+
"name",
|
|
158
164
|
"options",
|
|
159
165
|
"schema"
|
|
160
166
|
])])) : schema.value ? (openBlock(), createElementBlock("div", _hoisted_9, [createVNode(unref(Schema_default), {
|
|
@@ -163,7 +169,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
163
169
|
compositionPath: ["requestBody"],
|
|
164
170
|
eventBus: __props.eventBus,
|
|
165
171
|
hideReadOnly: true,
|
|
166
|
-
name: "
|
|
172
|
+
name: unref(translate)("operation.requestBody"),
|
|
167
173
|
noncollapsible: "",
|
|
168
174
|
options: {
|
|
169
175
|
hideReadOnly: true,
|
|
@@ -177,9 +183,10 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
177
183
|
}, null, 8, [
|
|
178
184
|
"breadcrumb",
|
|
179
185
|
"eventBus",
|
|
186
|
+
"name",
|
|
180
187
|
"options",
|
|
181
188
|
"schema"
|
|
182
|
-
])])) : createCommentVNode("", true)])) : createCommentVNode("", true);
|
|
189
|
+
])])) : createCommentVNode("", true)], 8, _hoisted_1)) : createCommentVNode("", true);
|
|
183
190
|
};
|
|
184
191
|
}
|
|
185
192
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n aria-label=\"Request Body\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n required\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n name=\"Request Body\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n name=\"Request Body\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n name=\"Request Body\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAE/B,MAAM,wBAAwB,eAC5B,OAAO,KAAK,QAAA,aAAa,WAAW,EAAE,CAAC,CACzC;EAEA,MAAM,sBAAsB,SAAmB,SAAC,sBAE/C;AAED,MAAI,QAAA,aAAa;OACX,sBAAsB,MAAM,GAC9B,qBAAoB,QAAQ,sBAAsB,MAAM;;;EAK5D,MAAM,YAAY,eACV,QAAA,aAAa,UAAU,oBAAoB,QAAQ,OAC3D;EAEA,MAAM,SAAS,eAAe,eAAe,UAAU,MAAM,CAAA;;EAG7D,MAAM,YAAY,gBACT,UAAU,SAAS,uBAAuB,UAAU,MAAM,KAAK,KACxE;;;;;EAMA,MAAM,oBAAoB,eAAe;AAEvC,OAAI,CAAC,OAAO,SAAS,CAAC,aAAa,OAAO,MAAM,CAC9C,QAAO;GAIT,MAAM,cAAc,kBAClB,OAAO,OACP,OAAO,MAAM,eACb;IACE,cAAc;IACd,yBAAyB,QAAA,QAAQ;IACjC,8BAA8B,QAAA,QAAQ;IACvC,CACH;AAEA,OAAI,YAAY,UAAU,uBACxB,QAAO;GAIT,MAAM,EAAE,YAAY,GAAG,mBAAmB,OAAO;AACjD,OAAI,CAAC,WACH,QAAO;AAGT,UAAO;IACL,mBAAmB;KACjB,GAAG;KACH,YAAY,oBACV,YAAY,MAAM,GAAG,uBAAuB,EAC5C,WACD;KACF;IACD,qBAAqB;KACnB,GAAG;KACH,YAAY,oBACV,YAAY,MAAM,uBAAuB,EACzC,WACD;KACF;IACH;IACD;;;;;;;;EASD,MAAM,0BAA0B,eAE5B,OAAO,KAAK,QAAA,aAAa,WAAW,EAAE,CAAC,CAAC,SAAS,KACjD,QAAA,aAAa,eACb,QAAA,aAAa,SACjB;;UAIU,QAAA,eAAe,wBAAA,SAAA,WAAA,EADvB,mBAwGM,OAxGN,YAwGM,CAnGJ,mBAmCM,OAnCN,YAmCM;IAlCJ,mBAkBM,OAlBN,YAkBM,CAjBJ,WAAqB,KAAA,QAAA,SAAA,EAAA,EAAA,KAAA,GAAA,KAAA,EAEb,UAAA,SAAA,WAAA,EADR,mBAeO,QAfP,YAeO,CAAA,OAAA,OAAA,OAAA,KAXL,mBAAsC,QAAA,EAAhC,OAAM,mBAAiB,EAAC,KAAC,GAAA,GAEvB,QAAA,YAAY,UAAA,MAAU,aAAA,WAAA,EAD9B,YAQa,oBAAA;;KANV,SAAK,OAAA,OAAA,OAAA,MAAA,WAAiB,QAAA,SAAS,KAAI,2BAAA,EAAA,MAAoD,UAAA,MAAU,WAAA,CAAA;;4BAK7E,CAAA,gBAAA,gBAAlB,UAAA,MAAU,MAAK,EAAA,EAAA,CAAA,CAAA;;wBAEpB,mBAAiD,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,gBAAA,gBAA7B,UAAA,MAAU,MAAK,EAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA;IAGvC,mBASM,OATN,YASM,CAPI,QAAA,YAAY,YAAA,WAAA,EADpB,mBAIM,OAJN,YAEgC,aAEhC,IAAA,mBAAA,IAAA,KAAA,EACA,YAEmC,2BAAA;iBADxB,oBAAA;sFAAmB,QAAA;KAC3B,SAAS,QAAA,YAAY;;IAGlB,QAAA,YAAY,eAAA,WAAA,EADpB,mBAIM,OAJN,YAIM,CADJ,YAAmD,MAAA,eAAA,EAAA,EAAlC,OAAO,QAAA,YAAY,aAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;OAMhC,kBAAA,SAAA,WAAA,EADR,mBAqCM,OArCN,YAqCM,CAlCJ,YAegC,MAAA,eAAA,EAAA;IAd7B,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,cAAe;IAChC,UAAU,QAAA;IACX,MAAK;IACL,gBAAA;IACC,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,kBAAA,MAAkB;IAC3B,eAAc;;;;;;OAEhB,YAgBgC,MAAA,eAAA,EAAA;IAf9B,sBAAA;IACC,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,cAAe;IAChC,UAAU,QAAA;IACX,iBAAA;IACA,MAAK;IACJ,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,kBAAA,MAAkB;IAC3B,eAAc;;;;;;WAKL,OAAA,SAAA,WAAA,EADb,mBAoBM,OApBN,YAoBM,CAjBJ,YAgBgC,MAAA,eAAA,EAAA;IAf7B,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,cAAe;IAChC,UAAU,QAAA;IACV,cAAc;IACf,MAAK;IACL,gBAAA;IACC,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,OAAA;IACT,eAAc"}
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityRequirementBadge.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SecurityRequirementBadge.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"names":[],"mappings":"AA2IA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAA;AAE1F,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAyPF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityRequirementBadge.vue.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'
|
|
1
|
+
{"version":3,"file":"SecurityRequirementBadge.vue.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\nconst { translate } = useLocalization()\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.required')\n : translate('authentication.optional'),\n)\n\nconst verb = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.requires')\n : translate('authentication.accepts'),\n)\n\n/** Single group, single scheme — shown inline in the header. */\nconst isSingleScheme = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n requiredSecurity.requirements[0]?.schemes.length === 1,\n)\n\n/** Single group with multiple schemes — all must be satisfied (AND). */\nconst isAndGroup = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n (requiredSecurity.requirements[0]?.schemes.length ?? 0) > 1,\n)\n\n/** Multiple groups — any one group satisfies authentication (OR). */\nconst isOrAlternatives = computed(\n () => requiredSecurity.requirements.length > 1,\n)\n</script>\n\n<template>\n <ScalarPopover\n v-if=\"requiredSecurity.state !== 'none'\"\n placement=\"bottom-end\">\n <button\n class=\"security-requirement-badge inline-flex w-fit shrink-0 items-center justify-center gap-1 text-sm\"\n :class=\"\n requiredSecurity.state === 'optional'\n ? 'text-c-2'\n : 'text-c-1 font-medium'\n \"\n type=\"button\"\n @click.stop>\n <ScalarIconLockSimple\n v-if=\"requiredSecurity.state === 'required'\"\n class=\"size-3\"\n weight=\"bold\" />\n <ScalarIconLockSimpleOpen\n v-else\n class=\"size-3\"\n weight=\"bold\" />\n <span v-if=\"!hideLabel\">{{ label }}</span>\n </button>\n <template #popover>\n <div class=\"flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm\">\n <div class=\"font-medium\">\n {{ verb }}\n <template v-if=\"isSingleScheme\">\n <SecurityRequirementBadgeScheme\n is=\"span\"\n class=\"contents\"\n :scheme=\"requiredSecurity.requirements[0]!.schemes[0]!\" />\n </template>\n <template v-else-if=\"isOrAlternatives\">\n {{ translate('authentication.oneOf') }}\n </template>\n <template v-else-if=\"isAndGroup\">\n {{ translate('authentication.allOf') }}\n </template>\n <template v-else>\n {{ translate('authentication.authentication') }}\n </template>\n </div>\n\n <!-- Multiple OR alternatives -->\n <ul\n v-if=\"isOrAlternatives\"\n class=\"contents\">\n <li\n v-for=\"(group, gi) in requiredSecurity.requirements\"\n :key=\"gi\"\n class=\"markdown\">\n <!-- Single scheme in this OR branch -->\n <SecurityRequirementBadgeScheme\n is=\"span\"\n v-if=\"group.schemes.length === 1\"\n class=\"contents\"\n :scheme=\"group.schemes[0]!\" />\n <!-- Multiple AND schemes in this OR branch -->\n <template v-else>\n <ul class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, si) in group.schemes\"\n :key=\"si\"\n :scheme />\n </ul>\n </template>\n </li>\n </ul>\n\n <!-- Single group, multiple AND schemes -->\n <ul\n v-else-if=\"isAndGroup\"\n class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, key) in requiredSecurity.requirements[0]!.schemes\"\n :key\n :scheme />\n </ul>\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocalization } from "../../localization/use-localization.js";
|
|
1
2
|
import SecurityRequirementBadgeScheme_default from "./SecurityRequirementBadgeScheme.vue.js";
|
|
2
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
3
4
|
import { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from "@scalar/icons";
|
|
@@ -28,8 +29,9 @@ var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /* @_
|
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
setup(__props) {
|
|
31
|
-
const
|
|
32
|
-
const
|
|
32
|
+
const { translate } = useLocalization();
|
|
33
|
+
const label = computed(() => __props.requiredSecurity.state === "required" ? translate("authentication.required") : translate("authentication.optional"));
|
|
34
|
+
const verb = computed(() => __props.requiredSecurity.state === "required" ? translate("authentication.requires") : translate("authentication.accepts"));
|
|
33
35
|
/** Single group, single scheme — shown inline in the header. */
|
|
34
36
|
const isSingleScheme = computed(() => __props.requiredSecurity.requirements.length === 1 && __props.requiredSecurity.requirements[0]?.schemes.length === 1);
|
|
35
37
|
/** Single group with multiple schemes — all must be satisfied (AND). */
|
|
@@ -46,7 +48,7 @@ var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /* @_
|
|
|
46
48
|
is: "span",
|
|
47
49
|
class: "contents",
|
|
48
50
|
scheme: __props.requiredSecurity.requirements[0].schemes[0]
|
|
49
|
-
}, null, 8, ["scheme"])) : isOrAlternatives.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode("
|
|
51
|
+
}, null, 8, ["scheme"])) : isOrAlternatives.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(translate)("authentication.oneOf")), 1)], 64)) : isAndGroup.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(unref(translate)("authentication.allOf")), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(unref(translate)("authentication.authentication")), 1)], 64))]), isOrAlternatives.value ? (openBlock(), createElementBlock("ul", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.requiredSecurity.requirements, (group, gi) => {
|
|
50
52
|
return openBlock(), createElementBlock("li", {
|
|
51
53
|
key: gi,
|
|
52
54
|
class: "markdown"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityRequirementBadge.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'
|
|
1
|
+
{"version":3,"file":"SecurityRequirementBadge.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\nconst { translate } = useLocalization()\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.required')\n : translate('authentication.optional'),\n)\n\nconst verb = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.requires')\n : translate('authentication.accepts'),\n)\n\n/** Single group, single scheme — shown inline in the header. */\nconst isSingleScheme = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n requiredSecurity.requirements[0]?.schemes.length === 1,\n)\n\n/** Single group with multiple schemes — all must be satisfied (AND). */\nconst isAndGroup = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n (requiredSecurity.requirements[0]?.schemes.length ?? 0) > 1,\n)\n\n/** Multiple groups — any one group satisfies authentication (OR). */\nconst isOrAlternatives = computed(\n () => requiredSecurity.requirements.length > 1,\n)\n</script>\n\n<template>\n <ScalarPopover\n v-if=\"requiredSecurity.state !== 'none'\"\n placement=\"bottom-end\">\n <button\n class=\"security-requirement-badge inline-flex w-fit shrink-0 items-center justify-center gap-1 text-sm\"\n :class=\"\n requiredSecurity.state === 'optional'\n ? 'text-c-2'\n : 'text-c-1 font-medium'\n \"\n type=\"button\"\n @click.stop>\n <ScalarIconLockSimple\n v-if=\"requiredSecurity.state === 'required'\"\n class=\"size-3\"\n weight=\"bold\" />\n <ScalarIconLockSimpleOpen\n v-else\n class=\"size-3\"\n weight=\"bold\" />\n <span v-if=\"!hideLabel\">{{ label }}</span>\n </button>\n <template #popover>\n <div class=\"flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm\">\n <div class=\"font-medium\">\n {{ verb }}\n <template v-if=\"isSingleScheme\">\n <SecurityRequirementBadgeScheme\n is=\"span\"\n class=\"contents\"\n :scheme=\"requiredSecurity.requirements[0]!.schemes[0]!\" />\n </template>\n <template v-else-if=\"isOrAlternatives\">\n {{ translate('authentication.oneOf') }}\n </template>\n <template v-else-if=\"isAndGroup\">\n {{ translate('authentication.allOf') }}\n </template>\n <template v-else>\n {{ translate('authentication.authentication') }}\n </template>\n </div>\n\n <!-- Multiple OR alternatives -->\n <ul\n v-if=\"isOrAlternatives\"\n class=\"contents\">\n <li\n v-for=\"(group, gi) in requiredSecurity.requirements\"\n :key=\"gi\"\n class=\"markdown\">\n <!-- Single scheme in this OR branch -->\n <SecurityRequirementBadgeScheme\n is=\"span\"\n v-if=\"group.schemes.length === 1\"\n class=\"contents\"\n :scheme=\"group.schemes[0]!\" />\n <!-- Multiple AND schemes in this OR branch -->\n <template v-else>\n <ul class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, si) in group.schemes\"\n :key=\"si\"\n :scheme />\n </ul>\n </template>\n </li>\n </ul>\n\n <!-- Single group, multiple AND schemes -->\n <ul\n v-else-if=\"isAndGroup\"\n class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, key) in requiredSecurity.requirements[0]!.schemes\"\n :key\n :scheme />\n </ul>\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAIrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,cAAc,CAAA;IACzB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACvB,YAAY,GACZ,8BAA8B,GAC9B,yBAAyB,GACzB,2BAA2B,CAC9B,CAAA;CACF,CAAC;AA6GF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callbacks.vue.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n CallbackObject,\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport Callback from './Callback.vue'\n\nconst { path, callbacks, options } = defineProps<{\n path: string\n callbacks: CallbackObject\n eventBus: WorkspaceEventBus | null\n /** The document the callbacks belong to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\n\ntype CallbackType = {\n name: string\n url: string\n method: HttpMethod\n callback: OperationObject\n}\n\n/** Extract the callbacks with method, url, and name */\nconst flattenedCallbacks = computed<CallbackType[]>(() => {\n const _callbacks: CallbackType[] = []\n\n // Loop over the name level\n objectEntries(callbacks).forEach(([name, pathItem]) => {\n // Loop over the url level\n objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {\n if (typeof methods !== 'object' || !methods) {\n return\n }\n\n // Loop over the method level\n objectEntries(methods).forEach(([callbackMethod, callback]) => {\n if (!isHttpMethod(callbackMethod)) {\n return\n }\n\n _callbacks.push({\n name,\n url,\n method: callbackMethod,\n callback: callback,\n })\n })\n })\n })\n\n return _callbacks\n})\n</script>\n\n<template>\n <div\n aria-label=\"
|
|
1
|
+
{"version":3,"file":"Callbacks.vue.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n CallbackObject,\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport Callback from './Callback.vue'\n\nconst { path, callbacks, options } = defineProps<{\n path: string\n callbacks: CallbackObject\n eventBus: WorkspaceEventBus | null\n /** The document the callbacks belong to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\nconst { translate } = useLocalization()\n\ntype CallbackType = {\n name: string\n url: string\n method: HttpMethod\n callback: OperationObject\n}\n\n/** Extract the callbacks with method, url, and name */\nconst flattenedCallbacks = computed<CallbackType[]>(() => {\n const _callbacks: CallbackType[] = []\n\n // Loop over the name level\n objectEntries(callbacks).forEach(([name, pathItem]) => {\n // Loop over the url level\n objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {\n if (typeof methods !== 'object' || !methods) {\n return\n }\n\n // Loop over the method level\n objectEntries(methods).forEach(([callbackMethod, callback]) => {\n if (!isHttpMethod(callbackMethod)) {\n return\n }\n\n _callbacks.push({\n name,\n url,\n method: callbackMethod,\n callback: callback,\n })\n })\n })\n })\n\n return _callbacks\n})\n</script>\n\n<template>\n <div\n :aria-label=\"translate('operation.callbacks')\"\n class=\"callbacks-list gap-3\"\n role=\"group\">\n <div class=\"callbacks-title text-c-1 my-3 text-lg font-medium\">\n {{ translate('operation.callbacks') }}\n </div>\n <Callback\n v-for=\"{ callback, method, name, url } in flattenedCallbacks\"\n :key=\"`${name}-${url}-${method}`\"\n :callback\n :document\n :eventBus\n :method\n :name\n :options\n :path\n :url />\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { useLocalization } from "../../../localization/use-localization.js";
|
|
1
2
|
import Callback_default from "./Callback.vue.js";
|
|
2
|
-
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, defineComponent, openBlock, renderList } from "vue";
|
|
3
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, defineComponent, openBlock, renderList, toDisplayString, unref } from "vue";
|
|
3
4
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
5
|
import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
|
|
5
6
|
import { objectEntries } from "@scalar/helpers/object/object-entries";
|
|
6
7
|
//#region src/features/Operation/components/callbacks/Callbacks.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var _hoisted_1 =
|
|
8
|
-
|
|
9
|
-
class: "callbacks-list gap-3",
|
|
10
|
-
role: "group"
|
|
11
|
-
};
|
|
8
|
+
var _hoisted_1 = ["aria-label"];
|
|
9
|
+
var _hoisted_2 = { class: "callbacks-title text-c-1 my-3 text-lg font-medium" };
|
|
12
10
|
/** Extract the callbacks with method, url, and name */
|
|
13
11
|
var Callbacks_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
14
12
|
__name: "Callbacks",
|
|
@@ -20,6 +18,7 @@ var Callbacks_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
20
18
|
options: {}
|
|
21
19
|
},
|
|
22
20
|
setup(__props) {
|
|
21
|
+
const { translate } = useLocalization();
|
|
23
22
|
const flattenedCallbacks = computed(() => {
|
|
24
23
|
const _callbacks = [];
|
|
25
24
|
objectEntries(__props.callbacks).forEach(([name, pathItem]) => {
|
|
@@ -39,7 +38,11 @@ var Callbacks_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
39
38
|
return _callbacks;
|
|
40
39
|
});
|
|
41
40
|
return (_ctx, _cache) => {
|
|
42
|
-
return openBlock(), createElementBlock("div",
|
|
41
|
+
return openBlock(), createElementBlock("div", {
|
|
42
|
+
"aria-label": unref(translate)("operation.callbacks"),
|
|
43
|
+
class: "callbacks-list gap-3",
|
|
44
|
+
role: "group"
|
|
45
|
+
}, [createElementVNode("div", _hoisted_2, toDisplayString(unref(translate)("operation.callbacks")), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(flattenedCallbacks.value, ({ callback, method, name, url }) => {
|
|
43
46
|
return openBlock(), createBlock(Callback_default, {
|
|
44
47
|
key: `${name}-${url}-${method}`,
|
|
45
48
|
callback,
|
|
@@ -60,7 +63,7 @@ var Callbacks_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
60
63
|
"path",
|
|
61
64
|
"url"
|
|
62
65
|
]);
|
|
63
|
-
}), 128))]);
|
|
66
|
+
}), 128))], 8, _hoisted_1);
|
|
64
67
|
};
|
|
65
68
|
}
|
|
66
69
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callbacks.vue.script.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n CallbackObject,\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport Callback from './Callback.vue'\n\nconst { path, callbacks, options } = defineProps<{\n path: string\n callbacks: CallbackObject\n eventBus: WorkspaceEventBus | null\n /** The document the callbacks belong to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\n\ntype CallbackType = {\n name: string\n url: string\n method: HttpMethod\n callback: OperationObject\n}\n\n/** Extract the callbacks with method, url, and name */\nconst flattenedCallbacks = computed<CallbackType[]>(() => {\n const _callbacks: CallbackType[] = []\n\n // Loop over the name level\n objectEntries(callbacks).forEach(([name, pathItem]) => {\n // Loop over the url level\n objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {\n if (typeof methods !== 'object' || !methods) {\n return\n }\n\n // Loop over the method level\n objectEntries(methods).forEach(([callbackMethod, callback]) => {\n if (!isHttpMethod(callbackMethod)) {\n return\n }\n\n _callbacks.push({\n name,\n url,\n method: callbackMethod,\n callback: callback,\n })\n })\n })\n })\n\n return _callbacks\n})\n</script>\n\n<template>\n <div\n aria-label=\"
|
|
1
|
+
{"version":3,"file":"Callbacks.vue.script.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n CallbackObject,\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport Callback from './Callback.vue'\n\nconst { path, callbacks, options } = defineProps<{\n path: string\n callbacks: CallbackObject\n eventBus: WorkspaceEventBus | null\n /** The document the callbacks belong to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\nconst { translate } = useLocalization()\n\ntype CallbackType = {\n name: string\n url: string\n method: HttpMethod\n callback: OperationObject\n}\n\n/** Extract the callbacks with method, url, and name */\nconst flattenedCallbacks = computed<CallbackType[]>(() => {\n const _callbacks: CallbackType[] = []\n\n // Loop over the name level\n objectEntries(callbacks).forEach(([name, pathItem]) => {\n // Loop over the url level\n objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {\n if (typeof methods !== 'object' || !methods) {\n return\n }\n\n // Loop over the method level\n objectEntries(methods).forEach(([callbackMethod, callback]) => {\n if (!isHttpMethod(callbackMethod)) {\n return\n }\n\n _callbacks.push({\n name,\n url,\n method: callbackMethod,\n callback: callback,\n })\n })\n })\n })\n\n return _callbacks\n})\n</script>\n\n<template>\n <div\n :aria-label=\"translate('operation.callbacks')\"\n class=\"callbacks-list gap-3\"\n role=\"group\">\n <div class=\"callbacks-title text-c-1 my-3 text-lg font-medium\">\n {{ translate('operation.callbacks') }}\n </div>\n <Callback\n v-for=\"{ callback, method, name, url } in flattenedCallbacks\"\n :key=\"`${name}-${url}-${method}`\"\n :callback\n :document\n :eventBus\n :method\n :name\n :options\n :path\n :url />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgCA,MAAM,EAAE,cAAc,iBAAgB;EAUtC,MAAM,qBAAqB,eAA+B;GACxD,MAAM,aAA6B,EAAC;AAGpC,iBAAc,QAAA,UAAU,CAAC,SAAS,CAAC,MAAM,cAAc;AAErD,kBAAc,eAAe,SAAS,CAAC,CAAC,SAAS,CAAC,KAAK,aAAa;AAClE,SAAI,OAAO,YAAY,YAAY,CAAC,QAClC;AAIF,mBAAc,QAAQ,CAAC,SAAS,CAAC,gBAAgB,cAAc;AAC7D,UAAI,CAAC,aAAa,eAAe,CAC/B;AAGF,iBAAW,KAAK;OACd;OACA;OACA,QAAQ;OACE;OACX,CAAA;OACF;MACF;KACF;AAED,UAAO;IACR;;uBAIC,mBAkBM,OAAA;IAjBH,cAAY,MAAA,UAAS,CAAA,sBAAA;IACtB,OAAM;IACN,MAAK;OACL,mBAEM,OAFN,YAEM,gBADD,MAAA,UAAS,CAAA,sBAAA,CAAA,EAAA,EAAA,GAAA,UAAA,KAAA,EAEd,mBAUS,UAAA,MAAA,WATmC,mBAAA,QAAkB,EAAnD,UAAU,QAAQ,MAAM,UAAG;wBADtC,YAUS,kBAAA;KARN,KAAG,GAAK,KAAI,GAAI,IAAG,GAAI;KACvB;KACA,UAAA,QAAA;KACA,UAAA,QAAA;KACA;KACA;KACA,SAAA,QAAA;KACA,MAAA,QAAA;KACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAsjBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAA;AACzF,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAgBrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAA;AAM1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAUxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACd,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,iBAAiB,GAAG,WAAW,CACtE,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,sEAAsE;IACtE,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,eAAe,CAAA;CAC3B,CAAC;AAyrBJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
|
|
|
2
2
|
import ClassicLayout_vue_vue_type_script_setup_true_lang_default from "./ClassicLayout.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/features/Operation/layouts/ClassicLayout.vue
|
|
5
|
-
var ClassicLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClassicLayout_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ClassicLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClassicLayout_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-9d937e58"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ClassicLayout_default as default };
|
|
8
8
|
|