@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,138 +1,135 @@
|
|
|
1
|
-
import { objectKeys as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import { isArraySchema as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
if (!((i = e == null ? void 0 : e.allOf) != null && i.length) || !Array.isArray(e.allOf))
|
|
1
|
+
import { objectKeys as m } from "@scalar/helpers/object/object-keys";
|
|
2
|
+
import { getResolvedRef as p } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { isArraySchema as O } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
4
|
+
const l = (e, f) => {
|
|
5
|
+
if (!e?.allOf?.length || !Array.isArray(e.allOf))
|
|
7
6
|
return f || {};
|
|
8
|
-
const
|
|
7
|
+
const s = {}, { allOf: r, ...i } = e;
|
|
9
8
|
for (const o of e.allOf) {
|
|
10
9
|
if (!o || typeof o != "object")
|
|
11
10
|
continue;
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
const
|
|
15
|
-
|
|
11
|
+
const t = p(o);
|
|
12
|
+
if (t.allOf) {
|
|
13
|
+
const n = l(t);
|
|
14
|
+
c(s, n);
|
|
16
15
|
continue;
|
|
17
16
|
}
|
|
18
|
-
|
|
17
|
+
c(s, t);
|
|
19
18
|
}
|
|
20
|
-
if (Object.keys(
|
|
19
|
+
if (Object.keys(i).length > 0 && c(s, i, !0), f && typeof f == "object")
|
|
21
20
|
if (f.allOf) {
|
|
22
|
-
const o =
|
|
23
|
-
|
|
21
|
+
const o = l(f);
|
|
22
|
+
c(s, o, !0);
|
|
24
23
|
} else
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const o = s(f[i]);
|
|
24
|
+
c(s, f, !0);
|
|
25
|
+
return s;
|
|
26
|
+
}, c = (e, f, s = !1) => {
|
|
27
|
+
const r = m(f);
|
|
28
|
+
if (r.length !== 0)
|
|
29
|
+
for (const i of r) {
|
|
30
|
+
const o = p(f[i]);
|
|
33
31
|
if (o !== void 0)
|
|
34
32
|
if (i === "required")
|
|
35
|
-
Array.isArray(o) && o.length > 0 && (
|
|
33
|
+
Array.isArray(o) && o.length > 0 && (e.required?.length ? e.required = [.../* @__PURE__ */ new Set([...e.required, ...o])] : e.required = o.slice());
|
|
36
34
|
else if (i === "properties")
|
|
37
|
-
o && typeof o == "object" && (e.properties || (e.properties = {}),
|
|
35
|
+
o && typeof o == "object" && (e.properties || (e.properties = {}), a(e.properties, o));
|
|
38
36
|
else if (i === "items") {
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
if (
|
|
42
|
-
if (e.items || (e.items = {}),
|
|
43
|
-
const
|
|
44
|
-
Object.assign(e.items,
|
|
37
|
+
const t = p(o);
|
|
38
|
+
if (t)
|
|
39
|
+
if (O(f))
|
|
40
|
+
if (e.items || (e.items = {}), t.allOf) {
|
|
41
|
+
const n = l(t);
|
|
42
|
+
Object.assign(e.items, n);
|
|
45
43
|
} else
|
|
46
|
-
|
|
47
|
-
else if (
|
|
48
|
-
const
|
|
49
|
-
"properties" in
|
|
50
|
-
} else "items" in e || (e.items =
|
|
44
|
+
y(p(e.items), t);
|
|
45
|
+
else if (t.allOf) {
|
|
46
|
+
const n = l(t);
|
|
47
|
+
"properties" in n && ("properties" in e || (e.properties = {}), "properties" in e && a(e.properties, n.properties));
|
|
48
|
+
} else "items" in e || (e.items = t);
|
|
51
49
|
} else if (i === "enum")
|
|
52
50
|
Array.isArray(o) && o.length > 0 && (e.enum = [.../* @__PURE__ */ new Set([...e.enum || [], ...o])]);
|
|
53
51
|
else if (i === "oneOf" || i === "anyOf") {
|
|
54
52
|
if (Array.isArray(o)) {
|
|
55
53
|
"properties" in e || (e.properties = {});
|
|
56
|
-
for (const
|
|
57
|
-
const
|
|
58
|
-
|
|
54
|
+
for (const t of o) {
|
|
55
|
+
const n = p(t);
|
|
56
|
+
n.properties && "properties" in e && a(e.properties, n.properties);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
} else {
|
|
62
60
|
if (i === "allOf")
|
|
63
61
|
continue;
|
|
64
|
-
(
|
|
62
|
+
(s || e[i] === void 0) && (e[i] = o);
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const i = s(f[r]);
|
|
65
|
+
}, a = (e, f) => {
|
|
66
|
+
const s = Object.keys(f ?? {});
|
|
67
|
+
if (!(!f || !e || s.length === 0))
|
|
68
|
+
for (const r of s) {
|
|
69
|
+
const i = p(f[r]);
|
|
73
70
|
if (!i || typeof i != "object") {
|
|
74
71
|
e[r] = i;
|
|
75
72
|
continue;
|
|
76
73
|
}
|
|
77
74
|
if (!e[r]) {
|
|
78
|
-
i.allOf ? e[r] =
|
|
75
|
+
i.allOf ? e[r] = l(i) : "type" in i && i.type === "array" && p(i.items)?.allOf ? e[r] = {
|
|
79
76
|
...i,
|
|
80
|
-
items:
|
|
77
|
+
items: l(p(i.items))
|
|
81
78
|
} : e[r] = f[r];
|
|
82
79
|
continue;
|
|
83
80
|
}
|
|
84
|
-
const o =
|
|
81
|
+
const o = p(e[r]);
|
|
85
82
|
if (i.allOf)
|
|
86
|
-
e[r] =
|
|
87
|
-
else if (
|
|
88
|
-
const
|
|
83
|
+
e[r] = l({ allOf: [o, ...i.allOf] });
|
|
84
|
+
else if (O(i) && O(o) && i.items) {
|
|
85
|
+
const t = p(o.items);
|
|
89
86
|
e[r] = {
|
|
90
87
|
...o,
|
|
91
88
|
type: "array",
|
|
92
|
-
items:
|
|
89
|
+
items: t ? h(t, p(i.items)) : p(i.items)
|
|
93
90
|
};
|
|
94
91
|
} else if ("properties" in o && "properties" in i) {
|
|
95
|
-
const
|
|
96
|
-
|
|
92
|
+
const t = { ...o, ...i };
|
|
93
|
+
t.properties = { ...o.properties }, a(t.properties, i.properties), e[r] = t;
|
|
97
94
|
} else
|
|
98
95
|
e[r] = { ...i, ...o };
|
|
99
96
|
}
|
|
100
|
-
},
|
|
97
|
+
}, y = (e, f) => {
|
|
101
98
|
if (f.allOf || e.allOf) {
|
|
102
|
-
const
|
|
99
|
+
const s = [];
|
|
103
100
|
if (e.allOf)
|
|
104
|
-
for (const
|
|
105
|
-
|
|
101
|
+
for (const i of e.allOf)
|
|
102
|
+
s.push(p(i));
|
|
106
103
|
else
|
|
107
|
-
|
|
104
|
+
s.push(e);
|
|
108
105
|
if (f.allOf)
|
|
109
|
-
for (const
|
|
110
|
-
|
|
106
|
+
for (const i of f.allOf)
|
|
107
|
+
s.push(p(i));
|
|
111
108
|
else
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
Object.assign(e,
|
|
109
|
+
s.push(f);
|
|
110
|
+
const r = l({ allOf: s });
|
|
111
|
+
Object.assign(e, r);
|
|
115
112
|
return;
|
|
116
113
|
}
|
|
117
|
-
Object.assign(e, f), "properties" in e && "properties" in f &&
|
|
114
|
+
Object.assign(e, f), "properties" in e && "properties" in f && a(e.properties, f.properties);
|
|
118
115
|
}, h = (e, f) => {
|
|
119
116
|
if (e.allOf || f.allOf) {
|
|
120
|
-
const
|
|
117
|
+
const r = [];
|
|
121
118
|
if (e.allOf)
|
|
122
|
-
for (const
|
|
123
|
-
|
|
119
|
+
for (const i of e.allOf)
|
|
120
|
+
r.push(p(i));
|
|
124
121
|
else
|
|
125
|
-
|
|
122
|
+
r.push(e);
|
|
126
123
|
if (f.allOf)
|
|
127
|
-
for (const
|
|
128
|
-
|
|
124
|
+
for (const i of f.allOf)
|
|
125
|
+
r.push(p(i));
|
|
129
126
|
else
|
|
130
|
-
|
|
131
|
-
return
|
|
127
|
+
r.push(f);
|
|
128
|
+
return l({ allOf: r });
|
|
132
129
|
}
|
|
133
|
-
const
|
|
134
|
-
return "properties" in e && "properties" in f && (
|
|
130
|
+
const s = { ...e, ...f };
|
|
131
|
+
return "properties" in e && "properties" in f && (s.properties = { ...e.properties }, a(s.properties, f.properties)), s;
|
|
135
132
|
};
|
|
136
133
|
export {
|
|
137
|
-
|
|
134
|
+
l as mergeAllOfSchemas
|
|
138
135
|
};
|
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
-
import { compositions as
|
|
3
|
-
function
|
|
2
|
+
import { compositions as d } from "./schema-composition.js";
|
|
3
|
+
function N(t) {
|
|
4
4
|
if (!t || typeof t != "object")
|
|
5
5
|
return t;
|
|
6
|
-
const r =
|
|
6
|
+
const r = d.find((e) => e in t && e !== "not");
|
|
7
7
|
if (!r)
|
|
8
8
|
return { ...t };
|
|
9
9
|
const i = t[r];
|
|
10
10
|
if (!Array.isArray(i))
|
|
11
11
|
return { ...t };
|
|
12
|
-
const { [r]:
|
|
12
|
+
const { [r]: b, nullable: u, ...n } = t, m = Object.keys(n).length > 0, { filteredSchemas: o, hasNullSchema: a } = i.reduce(
|
|
13
13
|
(e, l) => {
|
|
14
14
|
const s = h(l);
|
|
15
15
|
return "type" in s && s.type === "null" ? e.hasNullSchema = !0 : e.filteredSchemas.push(s), e;
|
|
16
16
|
},
|
|
17
17
|
{ filteredSchemas: [], hasNullSchema: !1 }
|
|
18
|
-
), c =
|
|
18
|
+
), c = a || u === !0;
|
|
19
19
|
if (o.length === 1) {
|
|
20
20
|
const e = { ...n, ...o[0] };
|
|
21
21
|
return c && (e.nullable = !0), e;
|
|
22
22
|
}
|
|
23
|
-
if ((r === "oneOf" || r === "anyOf") && (
|
|
23
|
+
if ((r === "oneOf" || r === "anyOf") && (m || o.some((e) => e.allOf))) {
|
|
24
24
|
const e = o.map((s) => {
|
|
25
|
-
var u;
|
|
26
25
|
const f = h(s);
|
|
27
|
-
if (
|
|
28
|
-
const { allOf:
|
|
29
|
-
return { ...n, ...
|
|
26
|
+
if (f.allOf?.length === 1) {
|
|
27
|
+
const { allOf: p, ...g } = f;
|
|
28
|
+
return { ...n, ...g, ...h(p[0]) };
|
|
30
29
|
}
|
|
31
30
|
return { ...n, ...f };
|
|
32
31
|
}), l = { [r]: e };
|
|
@@ -39,5 +38,5 @@ function P(t) {
|
|
|
39
38
|
return { ...t };
|
|
40
39
|
}
|
|
41
40
|
export {
|
|
42
|
-
|
|
41
|
+
N as optimizeValueForDisplay
|
|
43
42
|
};
|
|
@@ -1,51 +1,48 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as r, createBlock as i, openBlock as n, unref as e, withCtx as t, renderSlot as l, createVNode as o, createTextVNode as s, toDisplayString as c } from "vue";
|
|
2
|
+
import { ScalarMarkdown as d } from "@scalar/components";
|
|
3
|
+
import m from "../../Section/SectionContainerAccordion.vue.js";
|
|
4
|
+
import p from "../../Section/SectionHeader.vue.js";
|
|
5
|
+
import f from "../../Anchor/Anchor.vue.js";
|
|
6
|
+
import u from "../../Section/SectionHeaderTag.vue.js";
|
|
7
|
+
const y = /* @__PURE__ */ r({
|
|
8
8
|
__name: "ClassicLayout",
|
|
9
9
|
props: {
|
|
10
10
|
tag: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
return (a,
|
|
14
|
-
title: t(() =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, null, 8, ["value"])
|
|
40
|
-
];
|
|
41
|
-
}),
|
|
12
|
+
setup(g) {
|
|
13
|
+
return (a, _) => (n(), i(e(m), { class: "tag-section" }, {
|
|
14
|
+
title: t(() => [
|
|
15
|
+
o(e(p), { class: "tag-name" }, {
|
|
16
|
+
default: t(() => [
|
|
17
|
+
o(e(f), {
|
|
18
|
+
id: a.tag.id
|
|
19
|
+
}, {
|
|
20
|
+
default: t(() => [
|
|
21
|
+
o(e(u), { level: 2 }, {
|
|
22
|
+
default: t(() => [
|
|
23
|
+
s(c(a.tag.title), 1)
|
|
24
|
+
]),
|
|
25
|
+
_: 1
|
|
26
|
+
})
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
}, 8, ["id"])
|
|
30
|
+
]),
|
|
31
|
+
_: 1
|
|
32
|
+
}),
|
|
33
|
+
o(e(d), {
|
|
34
|
+
class: "tag-description",
|
|
35
|
+
value: a.tag.tag?.description,
|
|
36
|
+
withImages: ""
|
|
37
|
+
}, null, 8, ["value"])
|
|
38
|
+
]),
|
|
42
39
|
default: t(() => [
|
|
43
|
-
|
|
40
|
+
l(a.$slots, "default", {}, void 0, !0)
|
|
44
41
|
]),
|
|
45
42
|
_: 3
|
|
46
43
|
}));
|
|
47
44
|
}
|
|
48
45
|
});
|
|
49
46
|
export {
|
|
50
|
-
|
|
47
|
+
y as default
|
|
51
48
|
};
|
|
@@ -1,63 +1,59 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useNavState as
|
|
4
|
-
import
|
|
5
|
-
import { useSidebar as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const E = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as h, ref as f, useId as y, computed as C, createBlock as i, openBlock as a, unref as t, withCtx as m, createVNode as T, createElementBlock as k, createCommentVNode as l, renderSlot as b, nextTick as S } from "vue";
|
|
2
|
+
import B from "../../ShowMoreButton.vue.js";
|
|
3
|
+
import { useNavState as v } from "../../../hooks/useNavState.js";
|
|
4
|
+
import I from "./TagSection.vue.js";
|
|
5
|
+
import { useSidebar as O } from "../../../features/sidebar/hooks/useSidebar.js";
|
|
6
|
+
import $ from "../../Section/SectionContainer.vue.js";
|
|
7
|
+
import w from "../../Lazy/Lazy.vue2.js";
|
|
8
|
+
const E = /* @__PURE__ */ h({
|
|
9
9
|
__name: "ModernLayout",
|
|
10
10
|
props: {
|
|
11
11
|
tag: {},
|
|
12
12
|
moreThanOneTag: { type: Boolean }
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
() =>
|
|
17
|
-
var e, a;
|
|
18
|
-
return n.moreThanOneTag || ((e = n.tag) == null ? void 0 : e.title) !== "default" || ((a = n.tag) == null ? void 0 : a.tag.description) !== "";
|
|
19
|
-
}
|
|
14
|
+
setup(o) {
|
|
15
|
+
const u = f(), s = f(), d = y(), { collapsedSidebarItems: c } = O(), { hash: n } = v(), g = C(
|
|
16
|
+
() => o.moreThanOneTag || o.tag?.title !== "default" || o.tag?.tag.description !== ""
|
|
20
17
|
);
|
|
21
|
-
async function
|
|
22
|
-
|
|
23
|
-
await B(), (a = (e = d.value) == null ? void 0 : e.querySelector("button")) == null || a.focus();
|
|
18
|
+
async function p() {
|
|
19
|
+
await S(), s.value?.querySelector("button")?.focus();
|
|
24
20
|
}
|
|
25
|
-
const
|
|
26
|
-
return (e,
|
|
21
|
+
const r = (e) => !c[e];
|
|
22
|
+
return (e, R) => (a(), i(t($), {
|
|
27
23
|
ref_key: "sectionContainerRef",
|
|
28
|
-
ref:
|
|
29
|
-
"aria-labelledby": t(
|
|
24
|
+
ref: u,
|
|
25
|
+
"aria-labelledby": t(d),
|
|
30
26
|
class: "tag-section-container",
|
|
31
27
|
role: "region"
|
|
32
28
|
}, {
|
|
33
|
-
default:
|
|
34
|
-
|
|
29
|
+
default: m(() => [
|
|
30
|
+
T(t(w), {
|
|
35
31
|
id: `modern-tag-${e.tag.id}`,
|
|
36
|
-
isLazy: !!t(
|
|
32
|
+
isLazy: !!t(n) && t(n) !== e.tag.id && t(n).startsWith(e.tag.id)
|
|
37
33
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
|
|
34
|
+
default: m(() => [
|
|
35
|
+
g.value ? (a(), i(I, {
|
|
40
36
|
key: 0,
|
|
41
|
-
headerId: t(
|
|
42
|
-
isCollapsed:
|
|
37
|
+
headerId: t(d),
|
|
38
|
+
isCollapsed: r(e.tag.id),
|
|
43
39
|
tag: e.tag
|
|
44
|
-
}, null, 8, ["headerId", "isCollapsed", "tag"])) :
|
|
45
|
-
|
|
40
|
+
}, null, 8, ["headerId", "isCollapsed", "tag"])) : l("", !0),
|
|
41
|
+
r(e.tag.id) && e.moreThanOneTag ? (a(), i(B, {
|
|
46
42
|
key: 1,
|
|
47
43
|
id: e.tag.id,
|
|
48
44
|
"aria-label": `Show all ${e.tag.title} endpoints`,
|
|
49
|
-
onClick:
|
|
50
|
-
}, null, 8, ["id", "aria-label"])) :
|
|
45
|
+
onClick: p
|
|
46
|
+
}, null, 8, ["id", "aria-label"])) : l("", !0)
|
|
51
47
|
]),
|
|
52
48
|
_: 1
|
|
53
49
|
}, 8, ["id", "isLazy"]),
|
|
54
|
-
|
|
50
|
+
r(e.tag.id) && e.moreThanOneTag ? l("", !0) : (a(), k("div", {
|
|
55
51
|
key: 0,
|
|
56
52
|
ref_key: "contentsRef",
|
|
57
|
-
ref:
|
|
53
|
+
ref: s,
|
|
58
54
|
class: "contents"
|
|
59
55
|
}, [
|
|
60
|
-
|
|
56
|
+
b(e.$slots, "default", {}, void 0, !0)
|
|
61
57
|
], 512))
|
|
62
58
|
]),
|
|
63
59
|
_: 3
|