@scalar/api-reference 1.35.4 → 1.35.6
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 +36 -0
- package/dist/browser/standalone.js +18154 -18461
- 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 +30 -34
- 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/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.js +16 -16
- 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 +1 -1
- 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.js +68 -75
- 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.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +46 -49
- 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.js +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +106 -119
- 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.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 +19 -19
- 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,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getCurrentIndex as
|
|
3
|
-
import { useNavState as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as S, computed as h, resolveComponent as T, createElementBlock as b, openBlock as i, Fragment as W, renderList as B, createBlock as t, unref as n, withCtx as v, createCommentVNode as g, createVNode as L } from "vue";
|
|
2
|
+
import { getCurrentIndex as E } from "./get-current-index.js";
|
|
3
|
+
import { useNavState as G } from "../../../hooks/useNavState.js";
|
|
4
|
+
import z from "../../Lazy/Lazy.vue2.js";
|
|
5
|
+
import N from "../../Section/SectionContainer.vue.js";
|
|
6
|
+
import $ from "../../../features/Operation/Operation.vue.js";
|
|
7
|
+
import w from "../Tags/Tag.vue.js";
|
|
8
|
+
const H = /* @__PURE__ */ S({
|
|
9
9
|
__name: "TraversedEntry",
|
|
10
10
|
props: {
|
|
11
11
|
level: { default: 0 },
|
|
@@ -18,26 +18,26 @@ const J = /* @__PURE__ */ T({
|
|
|
18
18
|
activeServer: {},
|
|
19
19
|
store: {}
|
|
20
20
|
},
|
|
21
|
-
setup(r, { expose:
|
|
22
|
-
const l = (e) => "isGroup" in e && e.isGroup, d = (e) => "tag" in e && !l(e),
|
|
23
|
-
return
|
|
21
|
+
setup(r, { expose: k }) {
|
|
22
|
+
const l = (e) => "isGroup" in e && e.isGroup, d = (e) => "tag" in e && !l(e), C = (e) => "operation" in e, s = (e) => "webhook" in e, O = (e) => "isWebhooks" in e && !!e.isWebhooks, m = h(() => r.level === 0), { hash: I } = G(), a = h(() => m.value ? r.rootIndex : E(I.value, r.entries)), c = (e, u) => l(e) ? null : u < a.value ? "prev" : u > a.value + 2 ? "after" : null;
|
|
23
|
+
return k({
|
|
24
24
|
currentIndex: a,
|
|
25
25
|
isLazy: c
|
|
26
26
|
}), (e, u) => {
|
|
27
|
-
const p =
|
|
28
|
-
return i(!0), W
|
|
27
|
+
const p = T("TraversedEntry", !0);
|
|
28
|
+
return i(!0), b(W, null, B(e.entries, (o, f) => (i(), t(n(z), {
|
|
29
29
|
id: o.id,
|
|
30
30
|
key: o.id,
|
|
31
31
|
isLazy: !!c(o, f),
|
|
32
32
|
prev: c(o, f) === "prev"
|
|
33
33
|
}, {
|
|
34
34
|
default: v(() => [
|
|
35
|
-
|
|
35
|
+
C(o) || s(o) ? (i(), t(n(N), {
|
|
36
36
|
key: 0,
|
|
37
37
|
omit: !m.value
|
|
38
38
|
}, {
|
|
39
39
|
default: v(() => [
|
|
40
|
-
|
|
40
|
+
L(n($), {
|
|
41
41
|
id: o.id,
|
|
42
42
|
clientOptions: e.clientOptions,
|
|
43
43
|
collection: e.activeCollection,
|
|
@@ -51,29 +51,26 @@ const J = /* @__PURE__ */ T({
|
|
|
51
51
|
}, null, 8, ["id", "clientOptions", "collection", "config", "document", "isWebhook", "method", "path", "server", "store"])
|
|
52
52
|
]),
|
|
53
53
|
_: 2
|
|
54
|
-
}, 1032, ["omit"])) :
|
|
54
|
+
}, 1032, ["omit"])) : O(o) || d(o) ? (i(), t(n(w), {
|
|
55
55
|
key: 1,
|
|
56
56
|
layout: e.config.layout,
|
|
57
57
|
moreThanOneTag: e.entries.filter(d).length > 1,
|
|
58
58
|
tag: o
|
|
59
59
|
}, {
|
|
60
|
-
default: v(() =>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : k("", !0)
|
|
75
|
-
];
|
|
76
|
-
}),
|
|
60
|
+
default: v(() => [
|
|
61
|
+
"children" in o && o.children?.length ? (i(), t(p, {
|
|
62
|
+
key: 0,
|
|
63
|
+
activeCollection: e.activeCollection,
|
|
64
|
+
activeServer: e.activeServer,
|
|
65
|
+
clientOptions: e.clientOptions,
|
|
66
|
+
config: e.config,
|
|
67
|
+
document: e.document,
|
|
68
|
+
entries: o.children,
|
|
69
|
+
level: e.level + 1,
|
|
70
|
+
rootIndex: e.rootIndex,
|
|
71
|
+
store: e.store
|
|
72
|
+
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : g("", !0)
|
|
73
|
+
]),
|
|
77
74
|
_: 2
|
|
78
75
|
}, 1032, ["layout", "moreThanOneTag", "tag"])) : l(o) ? (i(), t(p, {
|
|
79
76
|
key: 2,
|
|
@@ -86,7 +83,7 @@ const J = /* @__PURE__ */ T({
|
|
|
86
83
|
level: e.level + 1,
|
|
87
84
|
rootIndex: e.rootIndex,
|
|
88
85
|
store: e.store
|
|
89
|
-
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) :
|
|
86
|
+
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : g("", !0)
|
|
90
87
|
]),
|
|
91
88
|
_: 2
|
|
92
89
|
}, 1032, ["id", "isLazy", "prev"]))), 128);
|
|
@@ -94,5 +91,5 @@ const J = /* @__PURE__ */ T({
|
|
|
94
91
|
}
|
|
95
92
|
});
|
|
96
93
|
export {
|
|
97
|
-
|
|
94
|
+
H as default
|
|
98
95
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { getSlugUid as
|
|
4
|
-
import { getCurrentIndex as
|
|
5
|
-
import { useNavState as
|
|
6
|
-
import
|
|
7
|
-
import { useSidebar as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as m, computed as r, createElementBlock as d, createCommentVNode as f, unref as c, openBlock as p, createVNode as g } from "vue";
|
|
2
|
+
import { useWorkspace as C, useActiveEntities as S } from "@scalar/api-client/store";
|
|
3
|
+
import { getSlugUid as h } from "@scalar/oas-utils/transforms";
|
|
4
|
+
import { getCurrentIndex as _ } from "./get-current-index.js";
|
|
5
|
+
import { useNavState as k } from "../../../hooks/useNavState.js";
|
|
6
|
+
import I from "./TraversedEntry.vue.js";
|
|
7
|
+
import { useSidebar as O } from "../../../features/sidebar/hooks/useSidebar.js";
|
|
8
|
+
const E = { key: 0 }, T = /* @__PURE__ */ m({
|
|
9
9
|
__name: "TraversedEntryContainer",
|
|
10
10
|
props: {
|
|
11
11
|
config: {},
|
|
@@ -13,39 +13,38 @@ const N = { key: 0 }, T = /* @__PURE__ */ d({
|
|
|
13
13
|
document: {},
|
|
14
14
|
store: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const { collections:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return r;
|
|
16
|
+
setup(n) {
|
|
17
|
+
const { collections: s, servers: i } = C(), { activeCollection: l } = S(), t = r(() => {
|
|
18
|
+
if (n.config?.slug) {
|
|
19
|
+
const e = s[h(n.config.slug)];
|
|
20
|
+
if (e)
|
|
21
|
+
return e;
|
|
23
22
|
}
|
|
24
|
-
return
|
|
25
|
-
}),
|
|
23
|
+
return l.value;
|
|
24
|
+
}), u = r(() => {
|
|
26
25
|
if (t.value) {
|
|
27
26
|
if (t.value.selectedServerUid) {
|
|
28
|
-
const e =
|
|
27
|
+
const e = i[t.value.selectedServerUid];
|
|
29
28
|
if (e)
|
|
30
29
|
return e;
|
|
31
30
|
}
|
|
32
|
-
return
|
|
31
|
+
return i[t.value.servers[0]];
|
|
33
32
|
}
|
|
34
|
-
}), { items: o } =
|
|
35
|
-
() =>
|
|
33
|
+
}), { items: o } = O(), { hash: a } = k(), v = r(
|
|
34
|
+
() => _(a.value, o.value.entries)
|
|
36
35
|
);
|
|
37
|
-
return (e,
|
|
38
|
-
|
|
36
|
+
return (e, N) => c(o).entries.length && t.value ? (p(), d("div", E, [
|
|
37
|
+
g(I, {
|
|
39
38
|
activeCollection: t.value,
|
|
40
|
-
activeServer:
|
|
39
|
+
activeServer: u.value,
|
|
41
40
|
clientOptions: e.clientOptions,
|
|
42
41
|
config: e.config,
|
|
43
42
|
document: e.document,
|
|
44
|
-
entries:
|
|
45
|
-
rootIndex:
|
|
43
|
+
entries: c(o).entries,
|
|
44
|
+
rootIndex: v.value,
|
|
46
45
|
store: e.store
|
|
47
46
|
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "rootIndex", "store"])
|
|
48
|
-
])) :
|
|
47
|
+
])) : f("", !0);
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import { isTypeObject as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as N, computed as O, createBlock as d, createCommentVNode as n, openBlock as l, unref as i, withCtx as s, createElementVNode as k, normalizeClass as c, createElementBlock as r, createVNode as o, withDirectives as g, createTextVNode as m, toDisplayString as u, vShow as B, normalizeStyle as H, Fragment as h } from "vue";
|
|
2
|
+
import { Disclosure as P, DisclosureButton as S, DisclosurePanel as R } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as M, ScalarIcon as y } from "@scalar/components";
|
|
4
|
+
import C from "../../ScreenReader.vue.js";
|
|
5
|
+
import { isTypeObject as w } from "./helpers/is-type-object.js";
|
|
6
|
+
import W from "./SchemaHeading.vue.js";
|
|
7
|
+
import D from "./SchemaObjectProperties.vue.js";
|
|
8
|
+
import z from "./SchemaProperty.vue.js";
|
|
9
|
+
const A = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "schema-card-description"
|
|
12
|
-
},
|
|
12
|
+
}, V = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "schema-properties"
|
|
15
|
-
},
|
|
15
|
+
}, J = /* @__PURE__ */ N({
|
|
16
16
|
__name: "Schema",
|
|
17
17
|
props: {
|
|
18
18
|
schema: {},
|
|
@@ -29,46 +29,43 @@ const T = {
|
|
|
29
29
|
breadcrumb: {}
|
|
30
30
|
},
|
|
31
31
|
setup(a) {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
return (e = a.schema) != null && e.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !((c = a.schema) != null && c.description) || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description;
|
|
35
|
-
}), b = (e) => a.noncollapsible && e.stopPropagation();
|
|
36
|
-
return (e, c) => typeof e.schema == "object" && Object.keys(e.schema).length ? (l(), d(i(w), {
|
|
32
|
+
const p = O(() => !a.noncollapsible && a.level > 0), f = O(() => a.schema?.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !a.schema?.description || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description), v = (e) => a.noncollapsible && e.stopPropagation();
|
|
33
|
+
return (e, b) => typeof e.schema == "object" && Object.keys(e.schema).length ? (l(), d(i(P), {
|
|
37
34
|
key: 0,
|
|
38
35
|
defaultOpen: e.noncollapsible
|
|
39
36
|
}, {
|
|
40
37
|
default: s(({ open: t }) => [
|
|
41
|
-
|
|
42
|
-
class:
|
|
38
|
+
k("div", {
|
|
39
|
+
class: c(["schema-card", [
|
|
43
40
|
`schema-card--level-${e.level}`,
|
|
44
41
|
{ "schema-card--compact": e.compact, "schema-card--open": t },
|
|
45
42
|
{ "border-t": e.additionalProperties && t }
|
|
46
43
|
]])
|
|
47
44
|
}, [
|
|
48
|
-
|
|
49
|
-
o(i(
|
|
45
|
+
f.value ? (l(), r("div", A, [
|
|
46
|
+
o(i(M), { value: f.value }, null, 8, ["value"])
|
|
50
47
|
])) : n("", !0),
|
|
51
|
-
|
|
52
|
-
class:
|
|
48
|
+
k("div", {
|
|
49
|
+
class: c(["schema-properties", {
|
|
53
50
|
"schema-properties-open": t
|
|
54
51
|
}])
|
|
55
52
|
}, [
|
|
56
|
-
e.additionalProperties ?
|
|
57
|
-
o(i(
|
|
53
|
+
e.additionalProperties ? g((l(), r("div", V, [
|
|
54
|
+
o(i(S), {
|
|
58
55
|
as: "button",
|
|
59
56
|
class: "schema-card-title schema-card-title--compact",
|
|
60
|
-
onClickCapture:
|
|
57
|
+
onClickCapture: v
|
|
61
58
|
}, {
|
|
62
59
|
default: s(() => [
|
|
63
|
-
o(i(
|
|
60
|
+
o(i(y), {
|
|
64
61
|
class: "schema-card-title-icon",
|
|
65
62
|
icon: "Add",
|
|
66
63
|
size: "sm"
|
|
67
64
|
}),
|
|
68
|
-
|
|
69
|
-
e.name ? (l(), d(
|
|
65
|
+
b[0] || (b[0] = m(" Show additional properties ")),
|
|
66
|
+
e.name ? (l(), d(C, { key: 0 }, {
|
|
70
67
|
default: s(() => [
|
|
71
|
-
|
|
68
|
+
m("for " + u(e.name), 1)
|
|
72
69
|
]),
|
|
73
70
|
_: 1
|
|
74
71
|
})) : n("", !0)
|
|
@@ -77,60 +74,57 @@ const T = {
|
|
|
77
74
|
__: [0]
|
|
78
75
|
})
|
|
79
76
|
], 512)), [
|
|
80
|
-
[
|
|
81
|
-
]) :
|
|
77
|
+
[B, !t]
|
|
78
|
+
]) : p.value ? g((l(), d(i(S), {
|
|
82
79
|
key: 1,
|
|
83
80
|
as: e.noncollapsible ? "div" : "button",
|
|
84
|
-
class:
|
|
85
|
-
style:
|
|
81
|
+
class: c(["schema-card-title", { "schema-card-title--compact": e.compact }]),
|
|
82
|
+
style: H({
|
|
86
83
|
top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
|
|
87
84
|
}),
|
|
88
|
-
onClickCapture:
|
|
85
|
+
onClickCapture: v
|
|
89
86
|
}, {
|
|
90
|
-
default: s(() =>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
], 64))
|
|
121
|
-
];
|
|
122
|
-
}),
|
|
87
|
+
default: s(() => [
|
|
88
|
+
e.compact ? (l(), r(h, { key: 0 }, [
|
|
89
|
+
o(i(y), {
|
|
90
|
+
class: c(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
|
|
91
|
+
icon: "Add",
|
|
92
|
+
size: "sm"
|
|
93
|
+
}, null, 8, ["class"]),
|
|
94
|
+
t ? (l(), r(h, { key: 0 }, [
|
|
95
|
+
m(" Hide " + u(e.schema?.title ?? "Child Attributes"), 1)
|
|
96
|
+
], 64)) : (l(), r(h, { key: 1 }, [
|
|
97
|
+
m(" Show " + u(e.schema?.title ?? "Child Attributes"), 1)
|
|
98
|
+
], 64)),
|
|
99
|
+
e.name ? (l(), d(C, { key: 2 }, {
|
|
100
|
+
default: s(() => [
|
|
101
|
+
m("for " + u(e.name), 1)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
})) : n("", !0)
|
|
105
|
+
], 64)) : (l(), r(h, { key: 1 }, [
|
|
106
|
+
o(i(y), {
|
|
107
|
+
class: c(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
|
|
108
|
+
icon: "Add",
|
|
109
|
+
size: "sm"
|
|
110
|
+
}, null, 8, ["class"]),
|
|
111
|
+
o(W, {
|
|
112
|
+
name: e.schema?.title ?? e.name,
|
|
113
|
+
value: e.schema
|
|
114
|
+
}, null, 8, ["name", "value"])
|
|
115
|
+
], 64))
|
|
116
|
+
]),
|
|
123
117
|
_: 2
|
|
124
118
|
}, 1032, ["as", "class", "style"])), [
|
|
125
|
-
[
|
|
119
|
+
[B, !e.hideHeading && !(e.noncollapsible && e.compact)]
|
|
126
120
|
]) : n("", !0),
|
|
127
|
-
!e.additionalProperties || t ? (l(), d(i(
|
|
121
|
+
!e.additionalProperties || t ? (l(), d(i(R), {
|
|
128
122
|
key: 2,
|
|
129
123
|
as: "ul",
|
|
130
|
-
static: !
|
|
124
|
+
static: !p.value
|
|
131
125
|
}, {
|
|
132
126
|
default: s(() => [
|
|
133
|
-
i(
|
|
127
|
+
i(w)(e.schema) ? (l(), d(D, {
|
|
134
128
|
key: 0,
|
|
135
129
|
breadcrumb: e.breadcrumb,
|
|
136
130
|
compact: e.compact,
|
|
@@ -141,8 +135,8 @@ const T = {
|
|
|
141
135
|
hideWriteOnly: e.hideWriteOnly,
|
|
142
136
|
level: e.level + 1,
|
|
143
137
|
schema: e.schema
|
|
144
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "schema"])) : (l(), r(
|
|
145
|
-
e.schema ? (l(), d(
|
|
138
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "schema"])) : (l(), r(h, { key: 1 }, [
|
|
139
|
+
e.schema ? (l(), d(z, {
|
|
146
140
|
key: 0,
|
|
147
141
|
breadcrumb: e.breadcrumb,
|
|
148
142
|
compact: e.compact,
|
|
@@ -165,5 +159,5 @@ const T = {
|
|
|
165
159
|
}
|
|
166
160
|
});
|
|
167
161
|
export {
|
|
168
|
-
|
|
162
|
+
J as default
|
|
169
163
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import { ScalarIconCaretDown as
|
|
5
|
-
import { getResolvedRef as
|
|
6
|
-
import { getSchemaType as
|
|
7
|
-
import { mergeAllOfSchemas as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as y, computed as n, ref as g, createElementBlock as d, openBlock as l, createBlock as O, unref as m, Fragment as C, createVNode as s, createElementVNode as t, withCtx as S, createCommentVNode as R, toDisplayString as u, normalizeClass as B } from "vue";
|
|
2
|
+
import { ScalarListbox as H } from "@scalar/components";
|
|
3
|
+
import { isDefined as W } from "@scalar/helpers/array/is-defined";
|
|
4
|
+
import { ScalarIconCaretDown as k } from "@scalar/icons";
|
|
5
|
+
import { getResolvedRef as V } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
+
import { getSchemaType as w } from "./helpers/get-schema-type.js";
|
|
7
|
+
import { mergeAllOfSchemas as N } from "./helpers/merge-all-of-schemas.js";
|
|
8
|
+
import h from "./Schema.vue.js";
|
|
9
|
+
const z = { class: "property-rule" }, D = {
|
|
10
10
|
class: "composition-selector bg-b-1.5 hover:bg-b-2 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border border-b-0 px-2 py-1.25 pr-3 text-left",
|
|
11
11
|
type: "button"
|
|
12
|
-
},
|
|
12
|
+
}, U = { class: "text-c-2" }, A = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "text-red"
|
|
15
|
-
},
|
|
15
|
+
}, E = { class: "composition-panel" }, G = /* @__PURE__ */ y({
|
|
16
16
|
__name: "SchemaComposition",
|
|
17
17
|
props: {
|
|
18
18
|
composition: {},
|
|
@@ -26,19 +26,19 @@ const U = { class: "property-rule" }, A = {
|
|
|
26
26
|
hideWriteOnly: { type: Boolean },
|
|
27
27
|
breadcrumb: {}
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const a =
|
|
31
|
-
() => [a.value[a.composition]].flat().map((e) => ({ value:
|
|
32
|
-
),
|
|
33
|
-
() =>
|
|
29
|
+
setup(b) {
|
|
30
|
+
const a = b, c = n(
|
|
31
|
+
() => [a.value[a.composition]].flat().map((e) => ({ value: V(e), original: e })).filter((e) => W(e.value))
|
|
32
|
+
), p = n(
|
|
33
|
+
() => c.value.map((e, o) => ({
|
|
34
34
|
id: String(o),
|
|
35
|
-
label:
|
|
35
|
+
label: w(e.original) || "Schema"
|
|
36
36
|
}))
|
|
37
|
-
), i =
|
|
38
|
-
() =>
|
|
37
|
+
), i = g(p.value[0]), v = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (o) => o.toUpperCase()).toLowerCase().replace(/^(\w)/, (o) => o.toUpperCase()), r = n(
|
|
38
|
+
() => c.value[Number(i.value.id)].value
|
|
39
39
|
);
|
|
40
|
-
return (e, o) => (
|
|
41
|
-
a.composition === "allOf" ? (
|
|
40
|
+
return (e, o) => (l(), d("div", z, [
|
|
41
|
+
a.composition === "allOf" ? (l(), O(h, {
|
|
42
42
|
key: 0,
|
|
43
43
|
breadcrumb: e.breadcrumb,
|
|
44
44
|
compact: e.compact,
|
|
@@ -49,33 +49,30 @@ const U = { class: "property-rule" }, A = {
|
|
|
49
49
|
level: e.level,
|
|
50
50
|
name: e.name,
|
|
51
51
|
noncollapsible: !0,
|
|
52
|
-
schema:
|
|
53
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "schema"])) : (
|
|
54
|
-
|
|
52
|
+
schema: m(N)(a.value)
|
|
53
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "schema"])) : (l(), d(C, { key: 1 }, [
|
|
54
|
+
s(m(H), {
|
|
55
55
|
modelValue: i.value,
|
|
56
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
57
|
-
options:
|
|
56
|
+
"onUpdate:modelValue": o[0] || (o[0] = (f) => i.value = f),
|
|
57
|
+
options: p.value,
|
|
58
58
|
resize: ""
|
|
59
59
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
])
|
|
73
|
-
];
|
|
74
|
-
}),
|
|
60
|
+
default: S(() => [
|
|
61
|
+
t("button", D, [
|
|
62
|
+
t("span", U, u(v(a.composition)), 1),
|
|
63
|
+
t("span", {
|
|
64
|
+
class: B(["composition-selector-label text-c-1", {
|
|
65
|
+
"line-through": r.value?.deprecated
|
|
66
|
+
}])
|
|
67
|
+
}, u(i.value?.label || "Schema"), 3),
|
|
68
|
+
r.value?.deprecated ? (l(), d("div", A, " deprecated ")) : R("", !0),
|
|
69
|
+
s(m(k))
|
|
70
|
+
])
|
|
71
|
+
]),
|
|
75
72
|
_: 1
|
|
76
73
|
}, 8, ["modelValue", "options"]),
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
t("div", E, [
|
|
75
|
+
s(h, {
|
|
79
76
|
breadcrumb: e.breadcrumb,
|
|
80
77
|
compact: e.compact,
|
|
81
78
|
discriminator: e.discriminator,
|
|
@@ -85,7 +82,7 @@ const U = { class: "property-rule" }, A = {
|
|
|
85
82
|
level: e.level + 1,
|
|
86
83
|
name: e.name,
|
|
87
84
|
noncollapsible: !0,
|
|
88
|
-
schema:
|
|
85
|
+
schema: r.value
|
|
89
86
|
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "schema"])
|
|
90
87
|
])
|
|
91
88
|
], 64))
|
|
@@ -93,5 +90,5 @@ const U = { class: "property-rule" }, A = {
|
|
|
93
90
|
}
|
|
94
91
|
});
|
|
95
92
|
export {
|
|
96
|
-
|
|
93
|
+
G as default
|
|
97
94
|
};
|