@scalar/api-reference 1.35.5 → 1.35.7
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 +53 -0
- package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
- package/dist/browser/standalone.js +19316 -19449
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +8 -11
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +4 -4
- package/dist/components/ApiReferenceLayout.vue2.js +247 -268
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/ClassicHeader.vue.js +1 -1
- package/dist/components/Content/Content.vue.js +145 -169
- package/dist/components/Content/Content.vue3.js +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue2.js +32 -35
- package/dist/components/Content/Models/Models.vue.js +27 -31
- package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +32 -35
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +26 -27
- package/dist/components/Content/Operations/get-current-index.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue2.js +68 -74
- package/dist/components/Content/Schema/SchemaComposition.vue.js +42 -45
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +45 -50
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +41 -48
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +142 -157
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +160 -164
- package/dist/components/Content/Schema/helpers/get-schema-type.js +15 -17
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +74 -77
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +10 -11
- package/dist/components/Content/Tags/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue2.js +36 -39
- package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue2.js +31 -35
- package/dist/components/Content/Tags/TagSection.vue.js +86 -92
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
- package/dist/components/Lazy/Lazy.vue2.js +2 -2
- package/dist/components/LinkList/LinkList.vue.js +1 -1
- package/dist/components/LoadingSkeleton.vue.js +1 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/MobileHeader.vue2.js +13 -12
- package/dist/components/OperationPath.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue2.js +45 -51
- package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
- package/dist/components/ScreenReader.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/Section.vue2.js +13 -14
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +29 -30
- package/dist/components/Section/SectionColumn.vue.js +1 -1
- package/dist/components/Section/SectionColumns.vue.js +1 -1
- package/dist/components/Section/SectionContainer.vue.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
- package/dist/components/Section/SectionContent.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
- package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue2.js +12 -13
- package/dist/features/Operation/Operation.vue.js +31 -36
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +8 -11
- package/dist/features/Operation/components/ParameterList.vue.js +21 -24
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -37
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +45 -52
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +32 -35
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +114 -119
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +87 -89
- package/dist/features/Search/components/SearchButton.vue.js +23 -25
- package/dist/features/Search/components/SearchModal.vue.js +1 -1
- package/dist/features/Search/components/SearchModal.vue2.js +53 -54
- package/dist/features/api-client-modal/ApiClientModal.vue.js +31 -38
- package/dist/features/document-source/hooks/useDocumentFetcher.js +17 -18
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.js +21 -20
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue2.js +23 -26
- package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +128 -153
- package/dist/features/info-object/Contact.vue.js +24 -27
- package/dist/features/info-object/License.vue.js +26 -29
- package/dist/features/multiple-documents/DocumentSelector.vue.js +22 -31
- package/dist/features/multiple-documents/useMultipleDocuments.js +52 -56
- package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
- package/dist/features/sidebar/components/Sidebar.vue2.js +74 -79
- package/dist/features/sidebar/components/SidebarElement.vue.js +3 -3
- package/dist/features/sidebar/components/SidebarElement.vue2.js +52 -53
- package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +28 -31
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue2.js +1 -2
- package/dist/features/traverse-schema/helpers/traverse-description.js +13 -14
- package/dist/features/traverse-schema/helpers/traverse-document.js +14 -15
- package/dist/features/traverse-schema/helpers/traverse-paths.js +20 -23
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +13 -15
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +8 -10
- package/dist/hooks/useFreezing.js +14 -14
- package/dist/hooks/useNavState.js +37 -39
- package/dist/index.js +2 -2
- package/dist/libs/openapi.js +28 -31
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +102 -103
- package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +116 -135
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +40 -47
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +45 -46
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +109 -125
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +84 -84
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +12 -13
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +1 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +77 -82
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +56 -50
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +74 -89
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +24 -27
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +2 -2
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +111 -118
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +11 -12
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +3 -3
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +11 -14
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +45 -48
- package/dist/v2/helpers/get-document-name.js +10 -10
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/dist/v2/helpers/map-configuration.js +48 -51
- package/dist/v2/hooks/use-legacy-store-events.js +44 -48
- package/dist/v2/hooks/use-workspace-store-events.js +23 -26
- package/package.json +24 -23
- package/dist/components/ApiReferenceLayout.vue3.js +0 -4
- package/dist/components/ApiReferenceLayout.vue4.js +0 -4
- package/dist/components/ApiReferenceLayout.vue5.js +0 -4
- package/dist/components/ApiReferenceLayout.vue6.js +0 -4
- package/dist/components/Badge/Badge.vue3.js +0 -4
- package/dist/components/ClassicHeader.vue2.js +0 -4
- package/dist/components/Content/Content.vue2.js +0 -4
- package/dist/components/Content/Models/ClassicLayout.vue3.js +0 -4
- package/dist/components/Content/Models/ModernLayout.vue3.js +0 -4
- package/dist/components/Content/Schema/Schema.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaHeading.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaProperty.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +0 -4
- package/dist/components/Content/Tags/ClassicLayout.vue3.js +0 -4
- package/dist/components/Content/Tags/ModernLayout.vue3.js +0 -4
- package/dist/components/GettingStarted.vue3.js +0 -4
- package/dist/components/LinkList/LinkList.vue3.js +0 -4
- package/dist/components/LoadingSkeleton.vue3.js +0 -4
- package/dist/components/MobileHeader.vue3.js +0 -4
- package/dist/components/OperationPath.vue3.js +0 -4
- package/dist/components/OperationsList/OperationsList.vue3.js +0 -4
- package/dist/components/OperationsList/OperationsListItem.vue3.js +0 -4
- package/dist/components/ScreenReader.vue3.js +0 -4
- package/dist/components/Section/CompactSection.vue3.js +0 -4
- package/dist/components/Section/Section.vue3.js +0 -4
- package/dist/components/Section/SectionAccordion.vue3.js +0 -4
- package/dist/components/Section/SectionColumn.vue2.js +0 -4
- package/dist/components/Section/SectionColumns.vue2.js +0 -4
- package/dist/components/Section/SectionContainer.vue3.js +0 -4
- package/dist/components/Section/SectionContainerAccordion.vue3.js +0 -4
- package/dist/components/Section/SectionContent.vue3.js +0 -4
- package/dist/components/Section/SectionHeader.vue3.js +0 -4
- package/dist/components/Section/SectionHeaderTag.vue3.js +0 -4
- package/dist/components/SectionFlare/SectionFlare.vue2.js +0 -4
- package/dist/components/ShowMoreButton.vue3.js +0 -4
- package/dist/features/Operation/components/Headers.vue3.js +0 -4
- package/dist/features/Operation/components/ParameterListItem.vue3.js +0 -4
- package/dist/features/Operation/components/RequestBody.vue3.js +0 -4
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +0 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +0 -4
- package/dist/features/Operation/layouts/ModernLayout.vue3.js +0 -4
- package/dist/features/Search/components/SearchModal.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponse.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponseTab.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponseTabList.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponses.vue3.js +0 -4
- package/dist/features/sidebar/components/Sidebar.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarElement.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarGroup.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +0 -4
- package/dist/features/test-request-button/TestRequestButton.vue3.js +0 -4
- package/dist/v2/ApiReferenceWorkspace.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js +0 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js +0 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +0 -4
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as c, openBlock as e, createStaticVNode as t } from "vue";
|
|
2
|
-
|
|
2
|
+
/* empty css */
|
|
3
3
|
import i from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const s = {}, d = { class: "section-flare" };
|
|
5
5
|
function o(v, a) {
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconCaretDown as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useSidebar as
|
|
5
|
-
const h = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as c, createElementBlock as i, openBlock as s, createTextVNode as a, createVNode as m, unref as l } from "vue";
|
|
2
|
+
import { ScalarIconCaretDown as d } from "@scalar/icons";
|
|
3
|
+
import { useConfig as u } from "../hooks/useConfig.js";
|
|
4
|
+
import { useSidebar as f } from "../features/sidebar/hooks/useSidebar.js";
|
|
5
|
+
const h = /* @__PURE__ */ c({
|
|
6
6
|
__name: "ShowMoreButton",
|
|
7
7
|
props: {
|
|
8
8
|
id: {}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const { setCollapsedSidebarItem:
|
|
12
|
-
|
|
13
|
-
r(t.id, !0), (e = (o = n.value).onShowMore) == null || e.call(o, t.id);
|
|
10
|
+
setup(e) {
|
|
11
|
+
const { setCollapsedSidebarItem: t } = f(), r = u(), n = () => {
|
|
12
|
+
t(e.id, !0), r.value.onShowMore?.(e.id);
|
|
14
13
|
};
|
|
15
|
-
return (
|
|
14
|
+
return (p, o) => (s(), i("button", {
|
|
16
15
|
class: "show-more",
|
|
17
16
|
type: "button",
|
|
18
|
-
onClick:
|
|
17
|
+
onClick: n
|
|
19
18
|
}, [
|
|
20
|
-
|
|
21
|
-
l(d
|
|
19
|
+
o[0] || (o[0] = a(" Show More ")),
|
|
20
|
+
m(l(d), {
|
|
22
21
|
weight: "bold",
|
|
23
22
|
class: "text-c-2 mt-0.25 size-3"
|
|
24
23
|
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { filterSecurityRequirements as
|
|
4
|
-
import { getResolvedRef as
|
|
5
|
-
import { combineParams as
|
|
6
|
-
import { convertSecurityScheme as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as l, computed as r, createElementBlock as u, createCommentVNode as h, openBlock as i, Fragment as p, createBlock as m } from "vue";
|
|
2
|
+
import { useWorkspace as d } from "@scalar/api-client/store";
|
|
3
|
+
import { filterSecurityRequirements as f } from "@scalar/api-client/views/Request/RequestSection";
|
|
4
|
+
import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
|
+
import { combineParams as v } from "./helpers/combine-params.js";
|
|
6
|
+
import { convertSecurityScheme as k } from "../../helpers/convert-security-scheme.js";
|
|
7
|
+
import S from "./layouts/ClassicLayout.vue.js";
|
|
8
|
+
import b from "./layouts/ModernLayout.vue.js";
|
|
9
|
+
const w = /* @__PURE__ */ l({
|
|
10
10
|
__name: "Operation",
|
|
11
11
|
props: {
|
|
12
12
|
path: {},
|
|
@@ -21,59 +21,54 @@ const F = /* @__PURE__ */ h({
|
|
|
21
21
|
collection: {}
|
|
22
22
|
},
|
|
23
23
|
setup(o) {
|
|
24
|
-
const
|
|
25
|
-
var t;
|
|
24
|
+
const s = r(() => {
|
|
26
25
|
const e = o.isWebhook ? "webhooks" : "paths";
|
|
27
|
-
return
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
const e = k((m = n.value) == null ? void 0 : m[o.method]);
|
|
26
|
+
return o.document[e]?.[o.path];
|
|
27
|
+
}), t = r(() => {
|
|
28
|
+
const e = y(s.value?.[o.method]);
|
|
31
29
|
if (!e)
|
|
32
30
|
return null;
|
|
33
|
-
const
|
|
34
|
-
|
|
31
|
+
const c = v(
|
|
32
|
+
s.value?.parameters,
|
|
35
33
|
e.parameters
|
|
36
34
|
);
|
|
37
|
-
return { ...e, parameters:
|
|
38
|
-
}), { securitySchemes:
|
|
39
|
-
() =>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
u
|
|
45
|
-
).map(b);
|
|
46
|
-
}
|
|
35
|
+
return { ...e, parameters: c };
|
|
36
|
+
}), { securitySchemes: a } = d(), n = r(
|
|
37
|
+
() => f(
|
|
38
|
+
t.value?.security || o.document.security || [],
|
|
39
|
+
o.collection.selectedSecuritySchemeUids,
|
|
40
|
+
a
|
|
41
|
+
).map(k)
|
|
47
42
|
);
|
|
48
|
-
return (e,
|
|
49
|
-
e.config.layout === "classic" ? (
|
|
43
|
+
return (e, c) => t.value ? (i(), u(p, { key: 0 }, [
|
|
44
|
+
e.config.layout === "classic" ? (i(), m(S, {
|
|
50
45
|
key: 0,
|
|
51
46
|
id: e.id,
|
|
52
47
|
clientOptions: e.clientOptions,
|
|
53
48
|
config: e.config,
|
|
54
49
|
isWebhook: e.isWebhook,
|
|
55
50
|
method: e.method,
|
|
56
|
-
operation:
|
|
51
|
+
operation: t.value,
|
|
57
52
|
path: e.path,
|
|
58
|
-
securitySchemes:
|
|
53
|
+
securitySchemes: n.value,
|
|
59
54
|
server: e.server,
|
|
60
55
|
store: e.store
|
|
61
|
-
}, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"])) : (
|
|
56
|
+
}, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"])) : (i(), m(b, {
|
|
62
57
|
key: 1,
|
|
63
58
|
id: e.id,
|
|
64
59
|
clientOptions: e.clientOptions,
|
|
65
60
|
config: e.config,
|
|
66
61
|
isWebhook: e.isWebhook,
|
|
67
62
|
method: e.method,
|
|
68
|
-
operation:
|
|
63
|
+
operation: t.value,
|
|
69
64
|
path: e.path,
|
|
70
|
-
securitySchemes:
|
|
65
|
+
securitySchemes: n.value,
|
|
71
66
|
server: e.server,
|
|
72
67
|
store: e.store
|
|
73
68
|
}, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"]))
|
|
74
|
-
], 64)) :
|
|
69
|
+
], 64)) : h("", !0);
|
|
75
70
|
}
|
|
76
71
|
});
|
|
77
72
|
export {
|
|
78
|
-
|
|
73
|
+
w as default
|
|
79
74
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as s, createElementBlock as i, openBlock as o, Fragment as p, createVNode as b, createBlock as n, createCommentVNode as l, withCtx as a, createTextVNode as m } from "vue";
|
|
2
2
|
import d from "./ParameterList.vue.js";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import y from "./RequestBody.vue.js";
|
|
4
|
+
const k = /* @__PURE__ */ s({
|
|
5
5
|
__name: "OperationParameters",
|
|
6
6
|
props: {
|
|
7
7
|
breadcrumb: {},
|
|
@@ -9,11 +9,8 @@ const c = /* @__PURE__ */ i({
|
|
|
9
9
|
requestBody: {}
|
|
10
10
|
},
|
|
11
11
|
setup(u) {
|
|
12
|
-
const t = (e) =>
|
|
13
|
-
|
|
14
|
-
return ((r = u.parameters) == null ? void 0 : r.filter((s) => s.in === e)) ?? [];
|
|
15
|
-
};
|
|
16
|
-
return (e, r) => (o(), p(n, null, [
|
|
12
|
+
const t = (e) => u.parameters?.filter((r) => r.in === e) ?? [];
|
|
13
|
+
return (e, r) => (o(), i(p, null, [
|
|
17
14
|
b(d, {
|
|
18
15
|
breadcrumb: e.breadcrumb ? [...e.breadcrumb, "path"] : void 0,
|
|
19
16
|
parameters: t("path")
|
|
@@ -50,7 +47,7 @@ const c = /* @__PURE__ */ i({
|
|
|
50
47
|
])),
|
|
51
48
|
_: 1
|
|
52
49
|
}, 8, ["breadcrumb", "parameters"]),
|
|
53
|
-
e.requestBody ? (o(),
|
|
50
|
+
e.requestBody ? (o(), n(y, {
|
|
54
51
|
key: 0,
|
|
55
52
|
breadcrumb: e.breadcrumb ? [...e.breadcrumb, "body"] : void 0,
|
|
56
53
|
requestBody: e.requestBody
|
|
@@ -59,10 +56,10 @@ const c = /* @__PURE__ */ i({
|
|
|
59
56
|
m("Body")
|
|
60
57
|
])),
|
|
61
58
|
_: 1
|
|
62
|
-
}, 8, ["breadcrumb", "requestBody"])) :
|
|
59
|
+
}, 8, ["breadcrumb", "requestBody"])) : l("", !0)
|
|
63
60
|
], 64));
|
|
64
61
|
}
|
|
65
62
|
});
|
|
66
63
|
export {
|
|
67
|
-
|
|
64
|
+
k as default
|
|
68
65
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as m, createElementBlock as r, createCommentVNode as s, openBlock as a, createElementVNode as l, renderSlot as o, Fragment as n, renderList as p, createBlock as c } from "vue";
|
|
2
|
+
import d from "./ParameterListItem.vue.js";
|
|
3
|
+
const i = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "mt-6"
|
|
6
|
-
},
|
|
6
|
+
}, u = { class: "text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium" }, b = { class: "mb-3 list-none p-0 text-sm" }, k = /* @__PURE__ */ m({
|
|
7
7
|
__name: "ParameterList",
|
|
8
8
|
props: {
|
|
9
9
|
parameters: {},
|
|
@@ -11,27 +11,24 @@ const u = {
|
|
|
11
11
|
withExamples: { type: Boolean, default: !0 },
|
|
12
12
|
breadcrumb: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
return (e,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
])
|
|
31
|
-
])) : o("", !0);
|
|
32
|
-
};
|
|
14
|
+
setup(f) {
|
|
15
|
+
return (e, h) => e.parameters?.length ? (a(), r("div", i, [
|
|
16
|
+
l("div", u, [
|
|
17
|
+
o(e.$slots, "title")
|
|
18
|
+
]),
|
|
19
|
+
l("ul", b, [
|
|
20
|
+
(a(!0), r(n, null, p(e.parameters, (t) => (a(), c(d, {
|
|
21
|
+
key: t.name,
|
|
22
|
+
breadcrumb: e.breadcrumb,
|
|
23
|
+
collapsableItems: e.collapsableItems,
|
|
24
|
+
name: t.name,
|
|
25
|
+
parameter: t,
|
|
26
|
+
withExamples: e.withExamples
|
|
27
|
+
}, null, 8, ["breadcrumb", "collapsableItems", "name", "parameter", "withExamples"]))), 128))
|
|
28
|
+
])
|
|
29
|
+
])) : s("", !0);
|
|
33
30
|
}
|
|
34
31
|
});
|
|
35
32
|
export {
|
|
36
|
-
|
|
33
|
+
k as default
|
|
37
34
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import { isDefined as
|
|
5
|
-
import { ScalarIconCaretRight as
|
|
6
|
-
import { getResolvedRef as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as m, ref as E, createElementBlock as B, openBlock as n, createVNode as c, createElementVNode as p, unref as o, withCtx as f, createBlock as d, createCommentVNode as v, normalizeClass as b, toDisplayString as C } from "vue";
|
|
2
|
+
import { Disclosure as V, DisclosureButton as D, DisclosurePanel as S } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as q } from "@scalar/components";
|
|
4
|
+
import { isDefined as I } from "@scalar/helpers/array/is-defined";
|
|
5
|
+
import { ScalarIconCaretRight as N } from "@scalar/icons";
|
|
6
|
+
import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
7
|
+
import O from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
8
|
+
import P from "./ContentTypeSelect.vue.js";
|
|
9
|
+
import R from "./Headers.vue.js";
|
|
10
|
+
const j = { class: "parameter-item group/parameter-item relative" }, z = { class: "parameter-item-name" }, H = { class: "parameter-item-type" }, L = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, Q = /* @__PURE__ */ x({
|
|
11
11
|
__name: "ParameterListItem",
|
|
12
12
|
props: {
|
|
13
13
|
parameter: {},
|
|
@@ -18,43 +18,42 @@ const U = { class: "parameter-item group/parameter-item relative" }, W = { class
|
|
|
18
18
|
},
|
|
19
19
|
setup(e) {
|
|
20
20
|
const s = m(
|
|
21
|
-
() => "schema" in e.parameter && e.parameter.schema ?
|
|
21
|
+
() => "schema" in e.parameter && e.parameter.schema ? y(e.parameter.schema) : null
|
|
22
22
|
), t = m(
|
|
23
23
|
() => "content" in e.parameter && e.parameter.content ? e.parameter.content : null
|
|
24
|
-
), i =
|
|
24
|
+
), i = E(Object.keys(t.value || {})[0]), h = m(
|
|
25
25
|
() => "headers" in e.parameter && e.parameter.headers ? e.parameter.headers : null
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
-
const a = t.value ? (y = (b = t.value) == null ? void 0 : b[i.value]) == null ? void 0 : y.schema : s.value, u = "deprecated" in e.parameter ? e.parameter.deprecated : (g = s.value) == null ? void 0 : g.deprecated, r = "examples" in e.parameter ? e.parameter.examples : {}, V = ((k = s.value) == null ? void 0 : k.examples) ?? [], D = [...Object.values({
|
|
26
|
+
), g = m(() => {
|
|
27
|
+
const a = t.value ? t.value?.[i.value]?.schema : s.value, u = "deprecated" in e.parameter ? e.parameter.deprecated : s.value?.deprecated, r = "examples" in e.parameter ? e.parameter.examples : {}, k = s.value?.examples ?? [], w = [...Object.values({
|
|
29
28
|
...r,
|
|
30
|
-
...
|
|
31
|
-
}), ...
|
|
29
|
+
...t.value?.[i.value]?.examples
|
|
30
|
+
}), ...k];
|
|
32
31
|
return {
|
|
33
|
-
...
|
|
32
|
+
...y(a),
|
|
34
33
|
deprecated: u,
|
|
35
|
-
..."example" in e.parameter &&
|
|
36
|
-
examples:
|
|
34
|
+
..."example" in e.parameter && I(e.parameter.example) && { example: e.parameter.example },
|
|
35
|
+
examples: w
|
|
37
36
|
};
|
|
38
37
|
}), l = m(
|
|
39
38
|
() => !!(e.collapsableItems && (t.value || h.value || s.value))
|
|
40
39
|
);
|
|
41
|
-
return (a, u) => (n(),
|
|
42
|
-
c(o(
|
|
40
|
+
return (a, u) => (n(), B("li", j, [
|
|
41
|
+
c(o(V), null, {
|
|
43
42
|
default: f(({ open: r }) => [
|
|
44
|
-
l.value ? (n(), d(o(
|
|
43
|
+
l.value ? (n(), d(o(D), {
|
|
45
44
|
key: 0,
|
|
46
|
-
class:
|
|
45
|
+
class: b(["parameter-item-trigger", { "parameter-item-trigger-open": r }])
|
|
47
46
|
}, {
|
|
48
47
|
default: f(() => [
|
|
49
|
-
p("span",
|
|
50
|
-
c(o(
|
|
51
|
-
class:
|
|
48
|
+
p("span", z, [
|
|
49
|
+
c(o(N), {
|
|
50
|
+
class: b(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": r }]),
|
|
52
51
|
weight: "bold"
|
|
53
52
|
}, null, 8, ["class"]),
|
|
54
|
-
p("span", null,
|
|
53
|
+
p("span", null, C(a.name), 1)
|
|
55
54
|
]),
|
|
56
|
-
p("span",
|
|
57
|
-
a.parameter.description ? (n(), d(o(
|
|
55
|
+
p("span", H, [
|
|
56
|
+
a.parameter.description ? (n(), d(o(q), {
|
|
58
57
|
key: 0,
|
|
59
58
|
class: "markdown",
|
|
60
59
|
value: a.parameter.description
|
|
@@ -63,17 +62,17 @@ const U = { class: "parameter-item group/parameter-item relative" }, W = { class
|
|
|
63
62
|
]),
|
|
64
63
|
_: 2
|
|
65
64
|
}, 1032, ["class"])) : v("", !0),
|
|
66
|
-
c(o(
|
|
65
|
+
c(o(S), {
|
|
67
66
|
class: "parameter-item-container parameter-item-container-markdown",
|
|
68
67
|
static: !l.value
|
|
69
68
|
}, {
|
|
70
69
|
default: f(() => [
|
|
71
|
-
h.value ? (n(), d(
|
|
70
|
+
h.value ? (n(), d(R, {
|
|
72
71
|
key: 0,
|
|
73
72
|
breadcrumb: a.breadcrumb,
|
|
74
73
|
headers: h.value
|
|
75
74
|
}, null, 8, ["breadcrumb", "headers"])) : v("", !0),
|
|
76
|
-
c(
|
|
75
|
+
c(O, {
|
|
77
76
|
is: "div",
|
|
78
77
|
breadcrumb: a.breadcrumb,
|
|
79
78
|
compact: "",
|
|
@@ -82,7 +81,7 @@ const U = { class: "parameter-item group/parameter-item relative" }, W = { class
|
|
|
82
81
|
name: l.value ? "" : a.name,
|
|
83
82
|
noncollapsible: !0,
|
|
84
83
|
required: "required" in a.parameter && a.parameter.required,
|
|
85
|
-
value:
|
|
84
|
+
value: g.value,
|
|
86
85
|
withExamples: a.withExamples
|
|
87
86
|
}, null, 8, ["breadcrumb", "description", "name", "required", "value", "withExamples"])
|
|
88
87
|
]),
|
|
@@ -91,8 +90,8 @@ const U = { class: "parameter-item group/parameter-item relative" }, W = { class
|
|
|
91
90
|
]),
|
|
92
91
|
_: 1
|
|
93
92
|
}),
|
|
94
|
-
p("div",
|
|
95
|
-
l.value && t.value ? (n(), d(
|
|
93
|
+
p("div", L, [
|
|
94
|
+
l.value && t.value ? (n(), d(P, {
|
|
96
95
|
key: 0,
|
|
97
96
|
modelValue: i.value,
|
|
98
97
|
"onUpdate:modelValue": u[0] || (u[0] = (r) => i.value = r),
|
|
@@ -104,5 +103,5 @@ const U = { class: "parameter-item group/parameter-item relative" }, W = { class
|
|
|
104
103
|
}
|
|
105
104
|
});
|
|
106
105
|
export {
|
|
107
|
-
|
|
106
|
+
Q as default
|
|
108
107
|
};
|
|
@@ -1,113 +1,106 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { getResolvedRef as
|
|
4
|
-
import { isTypeObject as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as h, computed as m, ref as q, createElementBlock as r, createCommentVNode as l, openBlock as o, createElementVNode as v, createVNode as s, renderSlot as f, unref as d } from "vue";
|
|
2
|
+
import { ScalarMarkdown as B } from "@scalar/components";
|
|
3
|
+
import { getResolvedRef as R } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
+
import { isTypeObject as k } from "../../../components/Content/Schema/helpers/is-type-object.js";
|
|
5
|
+
import O from "./ContentTypeSelect.vue.js";
|
|
6
6
|
import p from "../../../components/Content/Schema/Schema.vue.js";
|
|
7
|
-
const
|
|
7
|
+
const _ = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "request-body"
|
|
10
|
-
},
|
|
10
|
+
}, E = { class: "request-body-header" }, P = { class: "request-body-title" }, V = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "request-body-required"
|
|
13
|
-
},
|
|
13
|
+
}, j = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "request-body-description"
|
|
16
|
-
},
|
|
16
|
+
}, S = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "request-body-schema"
|
|
19
|
-
},
|
|
19
|
+
}, C = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "request-body-schema"
|
|
22
|
-
}, b = 12,
|
|
22
|
+
}, b = 12, w = /* @__PURE__ */ h({
|
|
23
23
|
__name: "RequestBody",
|
|
24
24
|
props: {
|
|
25
25
|
breadcrumb: {},
|
|
26
26
|
requestBody: {}
|
|
27
27
|
},
|
|
28
|
-
setup(
|
|
29
|
-
var v;
|
|
28
|
+
setup(u) {
|
|
30
29
|
const y = m(
|
|
31
|
-
() => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
() => {
|
|
39
|
-
var e, o, t;
|
|
40
|
-
return k((t = (o = (e = c.requestBody) == null ? void 0 : e.content) == null ? void 0 : o[l.value]) == null ? void 0 : t.schema);
|
|
41
|
-
}
|
|
42
|
-
), i = m(() => {
|
|
43
|
-
if (!r.value || !O(r.value))
|
|
30
|
+
() => Object.keys(u.requestBody?.content ?? {})
|
|
31
|
+
), a = q("application/json");
|
|
32
|
+
u.requestBody?.content && y.value.length > 0 && (a.value = y.value[0]);
|
|
33
|
+
const t = m(
|
|
34
|
+
() => R(u.requestBody?.content?.[a.value]?.schema)
|
|
35
|
+
), c = m(() => {
|
|
36
|
+
if (!t.value || !k(t.value))
|
|
44
37
|
return null;
|
|
45
|
-
const e = Object.entries(
|
|
38
|
+
const e = Object.entries(t.value.properties ?? {});
|
|
46
39
|
if (e.length <= b)
|
|
47
40
|
return null;
|
|
48
|
-
const { properties:
|
|
41
|
+
const { properties: i, ...n } = t.value;
|
|
49
42
|
return {
|
|
50
43
|
visibleProperties: {
|
|
51
|
-
...
|
|
44
|
+
...n,
|
|
52
45
|
properties: Object.fromEntries(
|
|
53
46
|
e.slice(0, b)
|
|
54
47
|
)
|
|
55
48
|
},
|
|
56
49
|
collapsedProperties: {
|
|
57
|
-
...
|
|
50
|
+
...n,
|
|
58
51
|
properties: Object.fromEntries(
|
|
59
52
|
e.slice(b)
|
|
60
53
|
)
|
|
61
54
|
}
|
|
62
55
|
};
|
|
63
56
|
});
|
|
64
|
-
return (e,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
e.requestBody.required ? (
|
|
57
|
+
return (e, i) => e.requestBody ? (o(), r("div", _, [
|
|
58
|
+
v("div", E, [
|
|
59
|
+
v("span", P, [
|
|
60
|
+
f(e.$slots, "title", {}, void 0, !0),
|
|
61
|
+
e.requestBody.required ? (o(), r("div", V, " required ")) : l("", !0)
|
|
69
62
|
]),
|
|
70
|
-
|
|
71
|
-
modelValue:
|
|
72
|
-
"onUpdate:modelValue":
|
|
63
|
+
s(O, {
|
|
64
|
+
modelValue: a.value,
|
|
65
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => a.value = n),
|
|
73
66
|
content: e.requestBody.content
|
|
74
67
|
}, null, 8, ["modelValue", "content"]),
|
|
75
|
-
e.requestBody.description ? (
|
|
76
|
-
|
|
68
|
+
e.requestBody.description ? (o(), r("div", j, [
|
|
69
|
+
s(d(B), {
|
|
77
70
|
value: e.requestBody.description
|
|
78
71
|
}, null, 8, ["value"])
|
|
79
|
-
])) :
|
|
72
|
+
])) : l("", !0)
|
|
80
73
|
]),
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
c.value ? (o(), r("div", S, [
|
|
75
|
+
s(d(p), {
|
|
83
76
|
breadcrumb: e.breadcrumb,
|
|
84
77
|
compact: "",
|
|
85
78
|
hideReadOnly: !0,
|
|
86
79
|
name: "Request Body",
|
|
87
80
|
noncollapsible: "",
|
|
88
|
-
schema:
|
|
81
|
+
schema: c.value.visibleProperties
|
|
89
82
|
}, null, 8, ["breadcrumb", "schema"]),
|
|
90
|
-
|
|
83
|
+
s(d(p), {
|
|
91
84
|
additionalProperties: "",
|
|
92
85
|
breadcrumb: e.breadcrumb,
|
|
93
86
|
compact: "",
|
|
94
87
|
hideReadOnly: !0,
|
|
95
88
|
name: "Request Body",
|
|
96
|
-
schema:
|
|
89
|
+
schema: c.value.collapsedProperties
|
|
97
90
|
}, null, 8, ["breadcrumb", "schema"])
|
|
98
|
-
])) :
|
|
99
|
-
|
|
91
|
+
])) : t.value ? (o(), r("div", C, [
|
|
92
|
+
s(d(p), {
|
|
100
93
|
breadcrumb: e.breadcrumb,
|
|
101
94
|
compact: "",
|
|
102
95
|
hideReadOnly: !0,
|
|
103
96
|
name: "Request Body",
|
|
104
97
|
noncollapsible: "",
|
|
105
|
-
schema:
|
|
98
|
+
schema: t.value
|
|
106
99
|
}, null, 8, ["breadcrumb", "schema"])
|
|
107
|
-
])) :
|
|
108
|
-
])) :
|
|
100
|
+
])) : l("", !0)
|
|
101
|
+
])) : l("", !0);
|
|
109
102
|
}
|
|
110
103
|
});
|
|
111
104
|
export {
|
|
112
|
-
|
|
105
|
+
w as default
|
|
113
106
|
};
|