@scalar/api-reference 1.28.33 → 1.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/dist/browser/standalone.js +12818 -13331
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +2 -2
- package/dist/components/Anchor/Anchor.vue2.js +24 -22
- package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +50 -50
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +5 -5
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +31 -32
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +21 -21
- package/dist/components/Content/Lazy/Loading.vue.js +22 -22
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +17 -17
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +14 -14
- package/dist/components/Content/Schema/Schema.preview.d.ts +98 -15
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +2 -1
- package/dist/components/Content/Schema/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts} +3 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.js +187 -0
- package/dist/components/Content/Schema/SchemaComposition.vue2.js +4 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +31 -30
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +0 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +8 -9
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +165 -146
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +50 -40
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +3 -2
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +13 -13
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts +12 -0
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js +8 -0
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +4 -0
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
- package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
- package/dist/components/Content/Tag/TagAccordion.vue2.js +10 -10
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +8 -8
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +8 -8
- package/dist/components/GettingStarted.vue.d.ts +2 -2
- package/dist/components/Layouts/Layouts.vue.d.ts +3 -0
- package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
- package/dist/components/Layouts/Layouts.vue.js +14 -23
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue2.js +51 -45
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +4 -4
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
- package/dist/components/SingleApiReference.vue.d.ts +1 -0
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/components/SingleApiReference.vue.js +25 -22
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +3 -3
- package/dist/features/ApiClientModal/index.d.ts +1 -1
- package/dist/features/ApiClientModal/index.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +186 -146
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +11 -10
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue2.js +17 -17
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +12 -12
- package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
- package/dist/features/Operation/Webhooks.vue.js +2 -2
- package/dist/features/Operation/Webhooks.vue2.js +13 -13
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +18 -18
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +38 -32
- package/dist/features/Operation/hooks/useResponses.d.ts +1 -0
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +13 -12
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/features/Search/SearchButton.vue2.js +1 -1
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +1 -1
- package/dist/features/Search/useSearchIndex.d.ts +1 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +20 -21
- package/dist/helpers/{isMacOs.d.ts → is-mac-os.d.ts} +1 -1
- package/dist/helpers/is-mac-os.d.ts.map +1 -0
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +1 -1
- package/dist/helpers/{scrollToId.d.ts → scroll-to-id.d.ts} +1 -1
- package/dist/helpers/scroll-to-id.d.ts.map +1 -0
- package/dist/helpers/sleep.d.ts +0 -2
- package/dist/helpers/sleep.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +28 -28
- package/dist/hooks/useReactiveSpec.js +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +45 -49
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -43
- package/dist/legacy/fixtures/index.d.ts +1 -1
- package/dist/legacy/fixtures/index.d.ts.map +1 -1
- package/dist/legacy/helpers/index.d.ts +1 -1
- package/dist/legacy/helpers/index.d.ts.map +1 -1
- package/dist/libs/download.d.ts +9 -0
- package/dist/libs/download.d.ts.map +1 -0
- package/dist/libs/download.js +19 -0
- package/dist/{helpers/getLowestHeadingLevel.d.ts → libs/markdown.d.ts} +5 -1
- package/dist/libs/markdown.d.ts.map +1 -0
- package/dist/libs/markdown.js +18 -0
- package/dist/libs/openapi.d.ts +56 -0
- package/dist/libs/openapi.d.ts.map +1 -0
- package/dist/libs/openapi.js +102 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -45
- package/dist/types.d.ts.map +1 -1
- package/package.json +22 -27
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -167
- package/dist/esm.js +0 -34
- package/dist/helpers/createEmptySpecification.d.ts +0 -8
- package/dist/helpers/createEmptySpecification.d.ts.map +0 -1
- package/dist/helpers/createEmptySpecification.js +0 -27
- package/dist/helpers/deepMerge.d.ts +0 -5
- package/dist/helpers/deepMerge.d.ts.map +0 -1
- package/dist/helpers/deepMerge.js +0 -8
- package/dist/helpers/generateParameters.d.ts +0 -6
- package/dist/helpers/generateParameters.d.ts.map +0 -1
- package/dist/helpers/get-request.d.ts +0 -59
- package/dist/helpers/get-request.d.ts.map +0 -1
- package/dist/helpers/getHeadingsFromMarkdown.d.ts +0 -6
- package/dist/helpers/getHeadingsFromMarkdown.d.ts.map +0 -1
- package/dist/helpers/getHeadingsFromMarkdown.js +0 -13
- package/dist/helpers/getLowestHeadingLevel.d.ts.map +0 -1
- package/dist/helpers/getLowestHeadingLevel.js +0 -7
- package/dist/helpers/getModels.d.ts +0 -7
- package/dist/helpers/getModels.d.ts.map +0 -1
- package/dist/helpers/getModels.js +0 -22
- package/dist/helpers/getVariableNames.d.ts +0 -5
- package/dist/helpers/getVariableNames.d.ts.map +0 -1
- package/dist/helpers/hasModels.d.ts +0 -3
- package/dist/helpers/hasModels.d.ts.map +0 -1
- package/dist/helpers/hasModels.js +0 -5
- package/dist/helpers/hasSecuritySchemes.d.ts +0 -3
- package/dist/helpers/hasSecuritySchemes.d.ts.map +0 -1
- package/dist/helpers/hasWebhooks.d.ts +0 -3
- package/dist/helpers/hasWebhooks.d.ts.map +0 -1
- package/dist/helpers/hasWebhooks.js +0 -4
- package/dist/helpers/index.d.ts +0 -17
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/isMacOs.d.ts.map +0 -1
- package/dist/helpers/mapFromObject.d.ts +0 -8
- package/dist/helpers/mapFromObject.d.ts.map +0 -1
- package/dist/helpers/mergeAllObjects.d.ts +0 -5
- package/dist/helpers/mergeAllObjects.d.ts.map +0 -1
- package/dist/helpers/scrollToId.d.ts.map +0 -1
- package/dist/helpers/specDownloads.d.ts +0 -7
- package/dist/helpers/specDownloads.d.ts.map +0 -1
- package/dist/helpers/specDownloads.js +0 -19
- package/dist/helpers/specHelpers.d.ts +0 -16
- package/dist/helpers/specHelpers.d.ts.map +0 -1
- package/dist/helpers/specHelpers.js +0 -36
- package/dist/helpers/waitFor.d.ts +0 -5
- package/dist/helpers/waitFor.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/legacy/helpers/encodeStringAsBase64.d.ts +0 -5
- package/dist/legacy/helpers/encodeStringAsBase64.d.ts.map +0 -1
- package/dist/legacy/index.d.ts +0 -5
- package/dist/legacy/index.d.ts.map +0 -1
- package/dist/legacy/types.d.ts +0 -94
- package/dist/legacy/types.d.ts.map +0 -1
- package/dist/libs/operation.d.ts +0 -15
- package/dist/libs/operation.d.ts.map +0 -1
- package/dist/libs/operation.js +0 -16
- package/dist/stores/index.d.ts +0 -2
- package/dist/stores/index.d.ts.map +0 -1
- /package/dist/helpers/{isMacOs.js → is-mac-os.js} +0 -0
- /package/dist/helpers/{scrollToId.js → scroll-to-id.js} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isDefined as
|
|
3
|
-
import { stringify as
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent as z, computed as D, createElementBlock as m, openBlock as l, createCommentVNode as i, createBlock as d, normalizeClass as H, renderSlot as E, Fragment as y, createTextVNode as u, withCtx as a, createVNode as v, toDisplayString as n, unref as g } from "vue";
|
|
2
|
+
import { isDefined as B } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { stringify as L } from "flatted";
|
|
4
|
+
import { compositions as J } from "./helpers/schema-composition.js";
|
|
5
5
|
import R from "./SchemaPropertyExamples.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import b from "../../ScreenReader.vue.js";
|
|
7
|
+
import o from "./SchemaPropertyDetail.vue.js";
|
|
8
|
+
import O from "../../Badge/Badge.vue.js";
|
|
9
9
|
const G = { class: "property-heading" }, K = {
|
|
10
|
-
key:
|
|
10
|
+
key: 2,
|
|
11
11
|
class: "property-additional"
|
|
12
12
|
}, Q = {
|
|
13
|
-
key:
|
|
13
|
+
key: 3,
|
|
14
14
|
class: "property-pattern"
|
|
15
15
|
}, U = {
|
|
16
|
-
key:
|
|
16
|
+
key: 4,
|
|
17
17
|
class: "property-deprecated"
|
|
18
18
|
}, W = {
|
|
19
|
-
key:
|
|
19
|
+
key: 5,
|
|
20
20
|
class: "property-const"
|
|
21
21
|
}, X = {
|
|
22
22
|
key: 7,
|
|
@@ -27,7 +27,7 @@ const G = { class: "property-heading" }, K = {
|
|
|
27
27
|
}, Z = {
|
|
28
28
|
key: 9,
|
|
29
29
|
class: "property-required"
|
|
30
|
-
}, ae = /* @__PURE__ */
|
|
30
|
+
}, ae = /* @__PURE__ */ z({
|
|
31
31
|
__name: "SchemaPropertyHeading",
|
|
32
32
|
props: {
|
|
33
33
|
value: {},
|
|
@@ -38,213 +38,232 @@ const G = { class: "property-heading" }, K = {
|
|
|
38
38
|
withExamples: { type: Boolean, default: !0 },
|
|
39
39
|
schemas: {}
|
|
40
40
|
},
|
|
41
|
-
setup(
|
|
42
|
-
|
|
41
|
+
setup(r) {
|
|
42
|
+
J.find((e) => !r.value || typeof r.value != "object" ? !1 : e in r.value || r.value.items && typeof r.value.items == "object" && e in r.value.items);
|
|
43
|
+
const $ = (e) => (e == null ? void 0 : e.default) === null ? "null" : Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : typeof (e == null ? void 0 : e.default) == "string" ? JSON.stringify(e.default) : e == null ? void 0 : e.default, F = (e) => {
|
|
43
44
|
if (!e)
|
|
44
45
|
return null;
|
|
46
|
+
if (e.title)
|
|
47
|
+
return e.title;
|
|
45
48
|
if (e.name)
|
|
46
49
|
return e.name;
|
|
47
|
-
if (
|
|
48
|
-
for (const [t,
|
|
49
|
-
if (
|
|
50
|
+
if (r.schemas && typeof r.schemas == "object") {
|
|
51
|
+
for (const [t, s] of Object.entries(r.schemas))
|
|
52
|
+
if (L(s) === L(e))
|
|
50
53
|
return t;
|
|
51
54
|
}
|
|
52
55
|
return null;
|
|
53
|
-
}
|
|
56
|
+
}, N = D(() => {
|
|
57
|
+
var e, t, s, f, p, k;
|
|
58
|
+
if (B((e = r.value) == null ? void 0 : e.const))
|
|
59
|
+
return (t = r.value) == null ? void 0 : t.const;
|
|
60
|
+
if (((f = (s = r.value) == null ? void 0 : s.enum) == null ? void 0 : f.length) === 1)
|
|
61
|
+
return r.value.enum[0];
|
|
62
|
+
if ((p = r.value) != null && p.items) {
|
|
63
|
+
if (B(r.value.items.const))
|
|
64
|
+
return r.value.items.const;
|
|
65
|
+
if (((k = r.value.items.enum) == null ? void 0 : k.length) === 1)
|
|
66
|
+
return r.value.items.enum[0];
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}), T = D(() => {
|
|
70
|
+
var e, t, s, f;
|
|
71
|
+
return Array.isArray((e = r.value) == null ? void 0 : e.type) ? r.value.type.join(" | ") : (t = r.value) != null && t.title ? r.value.title : (s = r.value) != null && s.name ? r.value.name : ((f = r.value) == null ? void 0 : f.type) ?? "";
|
|
72
|
+
});
|
|
54
73
|
return (e, t) => {
|
|
55
|
-
var
|
|
56
|
-
return l(),
|
|
57
|
-
e.$slots.name ? (l(),
|
|
74
|
+
var s, f, p, k, S, q, w, P, V, j, I;
|
|
75
|
+
return l(), m("div", G, [
|
|
76
|
+
e.$slots.name ? (l(), m("div", {
|
|
58
77
|
key: 0,
|
|
59
|
-
class:
|
|
78
|
+
class: H(["property-name", { deprecated: (s = e.value) == null ? void 0 : s.deprecated }])
|
|
60
79
|
}, [
|
|
61
|
-
e.pattern ? (l(),
|
|
62
|
-
t[0] || (t[0] =
|
|
63
|
-
|
|
64
|
-
t[1] || (t[1] =
|
|
65
|
-
], 64)) :
|
|
66
|
-
], 2)) :
|
|
67
|
-
e.
|
|
68
|
-
(
|
|
69
|
-
r(n(e.value["x-additionalPropertiesName"]), 1)
|
|
70
|
-
], 64)) : (l(), i(s, { key: 1 }, [
|
|
71
|
-
r("additional properties")
|
|
72
|
-
], 64))
|
|
73
|
-
])) : u("", !0),
|
|
74
|
-
e.pattern ? (l(), i("div", Q, [
|
|
75
|
-
p(g(L), null, {
|
|
76
|
-
default: a(() => t[2] || (t[2] = [
|
|
77
|
-
r("pattern")
|
|
78
|
-
])),
|
|
79
|
-
_: 1
|
|
80
|
-
})
|
|
81
|
-
])) : u("", !0),
|
|
82
|
-
(N = e.value) != null && N.deprecated ? (l(), i("div", U, [
|
|
83
|
-
p(g(L), null, {
|
|
84
|
-
default: a(() => t[3] || (t[3] = [
|
|
85
|
-
r("deprecated")
|
|
86
|
-
])),
|
|
87
|
-
_: 1
|
|
88
|
-
})
|
|
89
|
-
])) : u("", !0),
|
|
90
|
-
g(H)((S = e.value) == null ? void 0 : S.const) || (q = e.value) != null && q.enum && e.value.enum.length === 1 ? (l(), i("div", W, [
|
|
91
|
-
p(m, { truncate: "" }, {
|
|
92
|
-
prefix: a(() => t[4] || (t[4] = [
|
|
93
|
-
r("const:")
|
|
94
|
-
])),
|
|
95
|
-
default: a(() => {
|
|
96
|
-
var y, f, v;
|
|
97
|
-
return [
|
|
98
|
-
r(" " + n(((y = e.value) == null ? void 0 : y.const) ?? ((v = (f = e.value) == null ? void 0 : f.enum) == null ? void 0 : v[0])), 1)
|
|
99
|
-
];
|
|
100
|
-
}),
|
|
101
|
-
_: 1
|
|
102
|
-
})
|
|
103
|
-
])) : (w = e.value) != null && w.type ? (l(), i(s, { key: 5 }, [
|
|
104
|
-
p(m, null, {
|
|
80
|
+
e.pattern ? (l(), m(y, { key: 1 }, [
|
|
81
|
+
t[0] || (t[0] = u("/")),
|
|
82
|
+
E(e.$slots, "name", {}, void 0, !0),
|
|
83
|
+
t[1] || (t[1] = u("/"))
|
|
84
|
+
], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
|
|
85
|
+
], 2)) : i("", !0),
|
|
86
|
+
e.value ? (l(), m(y, { key: 1 }, [
|
|
87
|
+
(f = e.value) != null && f.type ? (l(), d(o, { key: 0 }, {
|
|
105
88
|
default: a(() => {
|
|
106
|
-
var
|
|
89
|
+
var M, A, C;
|
|
107
90
|
return [
|
|
108
|
-
|
|
109
|
-
default: a(() => t[
|
|
110
|
-
|
|
91
|
+
v(b, null, {
|
|
92
|
+
default: a(() => t[2] || (t[2] = [
|
|
93
|
+
u("Type:")
|
|
111
94
|
])),
|
|
112
95
|
_: 1
|
|
113
96
|
}),
|
|
114
|
-
(
|
|
115
|
-
|
|
116
|
-
], 64)) : (l(),
|
|
117
|
-
|
|
118
|
-
], 64))
|
|
119
|
-
e.value.minItems || e.value.maxItems ? (l(), i(s, { key: 2 }, [
|
|
120
|
-
r(n(e.value.minItems) + "…" + n(e.value.maxItems), 1)
|
|
121
|
-
], 64)) : u("", !0)
|
|
97
|
+
(A = (M = e.value) == null ? void 0 : M.items) != null && A.type ? (l(), m(y, { key: 0 }, [
|
|
98
|
+
u(n(e.value.type) + " " + n(F(e.value.items) || e.value.items.type) + "[] ", 1)
|
|
99
|
+
], 64)) : (l(), m(y, { key: 1 }, [
|
|
100
|
+
u(n(T.value) + " " + n((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
|
|
101
|
+
], 64))
|
|
122
102
|
];
|
|
123
103
|
}),
|
|
124
104
|
_: 1
|
|
125
|
-
}),
|
|
126
|
-
e.value.
|
|
127
|
-
|
|
128
|
-
|
|
105
|
+
})) : i("", !0),
|
|
106
|
+
e.value.minItems || e.value.maxItems ? (l(), d(o, { key: 1 }, {
|
|
107
|
+
default: a(() => [
|
|
108
|
+
u(n(e.value.minItems) + "…" + n(e.value.maxItems), 1)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
})) : i("", !0),
|
|
112
|
+
e.value.minLength ? (l(), d(o, { key: 2 }, {
|
|
113
|
+
prefix: a(() => t[3] || (t[3] = [
|
|
114
|
+
u("min:")
|
|
129
115
|
])),
|
|
130
116
|
default: a(() => [
|
|
131
|
-
|
|
117
|
+
u(" " + n(e.value.minLength), 1)
|
|
132
118
|
]),
|
|
133
119
|
_: 1
|
|
134
|
-
})) :
|
|
135
|
-
e.value.maxLength ? (l(), o
|
|
136
|
-
prefix: a(() => t[
|
|
137
|
-
|
|
120
|
+
})) : i("", !0),
|
|
121
|
+
e.value.maxLength ? (l(), d(o, { key: 3 }, {
|
|
122
|
+
prefix: a(() => t[4] || (t[4] = [
|
|
123
|
+
u("max:")
|
|
138
124
|
])),
|
|
139
125
|
default: a(() => [
|
|
140
|
-
|
|
126
|
+
u(" " + n(e.value.maxLength), 1)
|
|
141
127
|
]),
|
|
142
128
|
_: 1
|
|
143
|
-
})) :
|
|
144
|
-
e.value.uniqueItems ? (l(), o
|
|
145
|
-
default: a(() => t[
|
|
146
|
-
|
|
129
|
+
})) : i("", !0),
|
|
130
|
+
e.value.uniqueItems ? (l(), d(o, { key: 4 }, {
|
|
131
|
+
default: a(() => t[5] || (t[5] = [
|
|
132
|
+
u(" unique! ")
|
|
147
133
|
])),
|
|
148
134
|
_: 1
|
|
149
|
-
})) :
|
|
150
|
-
e.value.format ? (l(), o
|
|
135
|
+
})) : i("", !0),
|
|
136
|
+
e.value.format ? (l(), d(o, { key: 5 }, {
|
|
151
137
|
default: a(() => [
|
|
152
|
-
|
|
153
|
-
default: a(() => t[
|
|
154
|
-
|
|
138
|
+
v(b, null, {
|
|
139
|
+
default: a(() => t[6] || (t[6] = [
|
|
140
|
+
u("Format:")
|
|
155
141
|
])),
|
|
156
142
|
_: 1
|
|
157
143
|
}),
|
|
158
|
-
|
|
144
|
+
u(" " + n(e.value.format), 1)
|
|
159
145
|
]),
|
|
160
146
|
_: 1
|
|
161
|
-
})) :
|
|
162
|
-
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (l(), o
|
|
163
|
-
prefix: a(() => t[
|
|
164
|
-
|
|
147
|
+
})) : i("", !0),
|
|
148
|
+
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (l(), d(o, { key: 6 }, {
|
|
149
|
+
prefix: a(() => t[7] || (t[7] = [
|
|
150
|
+
u("greater than:")
|
|
165
151
|
])),
|
|
166
152
|
default: a(() => [
|
|
167
|
-
|
|
153
|
+
u(" " + n(e.value.minimum), 1)
|
|
168
154
|
]),
|
|
169
155
|
_: 1
|
|
170
|
-
})) :
|
|
171
|
-
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (l(), o
|
|
172
|
-
prefix: a(() => t[
|
|
173
|
-
|
|
156
|
+
})) : i("", !0),
|
|
157
|
+
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (l(), d(o, { key: 7 }, {
|
|
158
|
+
prefix: a(() => t[8] || (t[8] = [
|
|
159
|
+
u("min:")
|
|
174
160
|
])),
|
|
175
161
|
default: a(() => [
|
|
176
|
-
|
|
162
|
+
u(" " + n(e.value.minimum), 1)
|
|
177
163
|
]),
|
|
178
164
|
_: 1
|
|
179
|
-
})) :
|
|
180
|
-
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (l(), o
|
|
181
|
-
prefix: a(() => t[
|
|
182
|
-
|
|
165
|
+
})) : i("", !0),
|
|
166
|
+
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (l(), d(o, { key: 8 }, {
|
|
167
|
+
prefix: a(() => t[9] || (t[9] = [
|
|
168
|
+
u("less than:")
|
|
183
169
|
])),
|
|
184
170
|
default: a(() => [
|
|
185
|
-
|
|
171
|
+
u(" " + n(e.value.maximum), 1)
|
|
186
172
|
]),
|
|
187
173
|
_: 1
|
|
188
|
-
})) :
|
|
189
|
-
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (l(), o
|
|
190
|
-
prefix: a(() => t[
|
|
191
|
-
|
|
174
|
+
})) : i("", !0),
|
|
175
|
+
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (l(), d(o, { key: 9 }, {
|
|
176
|
+
prefix: a(() => t[10] || (t[10] = [
|
|
177
|
+
u("max:")
|
|
192
178
|
])),
|
|
193
179
|
default: a(() => [
|
|
194
|
-
|
|
180
|
+
u(" " + n(e.value.maximum), 1)
|
|
195
181
|
]),
|
|
196
182
|
_: 1
|
|
197
|
-
})) :
|
|
198
|
-
e.value.pattern ? (l(), o
|
|
199
|
-
key:
|
|
183
|
+
})) : i("", !0),
|
|
184
|
+
e.value.pattern ? (l(), d(o, {
|
|
185
|
+
key: 10,
|
|
200
186
|
code: "",
|
|
201
187
|
truncate: ""
|
|
202
188
|
}, {
|
|
203
189
|
default: a(() => [
|
|
204
|
-
|
|
205
|
-
default: a(() => t[
|
|
206
|
-
|
|
190
|
+
v(b, null, {
|
|
191
|
+
default: a(() => t[11] || (t[11] = [
|
|
192
|
+
u("Pattern:")
|
|
207
193
|
])),
|
|
208
194
|
_: 1
|
|
209
195
|
}),
|
|
210
|
-
|
|
196
|
+
u(" " + n(e.value.pattern), 1)
|
|
211
197
|
]),
|
|
212
198
|
_: 1
|
|
213
|
-
})) :
|
|
214
|
-
e.$props.enum ? (l(), o
|
|
215
|
-
default: a(() => t[
|
|
216
|
-
|
|
199
|
+
})) : i("", !0),
|
|
200
|
+
e.$props.enum ? (l(), d(o, { key: 11 }, {
|
|
201
|
+
default: a(() => t[12] || (t[12] = [
|
|
202
|
+
u("enum")
|
|
217
203
|
])),
|
|
218
204
|
_: 1
|
|
219
|
-
})) :
|
|
220
|
-
e.value.default !== void 0 ? (l(), o
|
|
221
|
-
key:
|
|
205
|
+
})) : i("", !0),
|
|
206
|
+
e.value.default !== void 0 ? (l(), d(o, {
|
|
207
|
+
key: 12,
|
|
222
208
|
truncate: ""
|
|
223
209
|
}, {
|
|
210
|
+
prefix: a(() => t[13] || (t[13] = [
|
|
211
|
+
u("default:")
|
|
212
|
+
])),
|
|
213
|
+
default: a(() => [
|
|
214
|
+
u(" " + n($(e.value)), 1)
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
})) : i("", !0)
|
|
218
|
+
], 64)) : i("", !0),
|
|
219
|
+
e.additional ? (l(), m("div", K, [
|
|
220
|
+
(p = e.value) != null && p["x-additionalPropertiesName"] ? (l(), m(y, { key: 0 }, [
|
|
221
|
+
u(n(e.value["x-additionalPropertiesName"]), 1)
|
|
222
|
+
], 64)) : (l(), m(y, { key: 1 }, [
|
|
223
|
+
u("additional properties")
|
|
224
|
+
], 64))
|
|
225
|
+
])) : i("", !0),
|
|
226
|
+
e.pattern ? (l(), m("div", Q, [
|
|
227
|
+
v(g(O), null, {
|
|
228
|
+
default: a(() => t[14] || (t[14] = [
|
|
229
|
+
u("pattern")
|
|
230
|
+
])),
|
|
231
|
+
_: 1
|
|
232
|
+
})
|
|
233
|
+
])) : i("", !0),
|
|
234
|
+
(k = e.value) != null && k.deprecated ? (l(), m("div", U, [
|
|
235
|
+
v(g(O), null, {
|
|
236
|
+
default: a(() => t[15] || (t[15] = [
|
|
237
|
+
u("deprecated")
|
|
238
|
+
])),
|
|
239
|
+
_: 1
|
|
240
|
+
})
|
|
241
|
+
])) : i("", !0),
|
|
242
|
+
g(B)(N.value) ? (l(), m("div", W, [
|
|
243
|
+
v(o, { truncate: "" }, {
|
|
224
244
|
prefix: a(() => t[16] || (t[16] = [
|
|
225
|
-
|
|
245
|
+
u("const:")
|
|
226
246
|
])),
|
|
227
247
|
default: a(() => [
|
|
228
|
-
|
|
248
|
+
u(" " + n(N.value), 1)
|
|
229
249
|
]),
|
|
230
250
|
_: 1
|
|
231
|
-
})
|
|
232
|
-
]
|
|
233
|
-
((
|
|
251
|
+
})
|
|
252
|
+
])) : (l(), m(y, { key: 6 }, [
|
|
253
|
+
((S = e.value) == null ? void 0 : S.nullable) === !0 ? (l(), d(o, { key: 0 }, {
|
|
234
254
|
default: a(() => t[17] || (t[17] = [
|
|
235
|
-
|
|
255
|
+
u(" nullable ")
|
|
236
256
|
])),
|
|
237
257
|
_: 1
|
|
238
|
-
})) :
|
|
258
|
+
})) : i("", !0)
|
|
239
259
|
], 64)),
|
|
240
|
-
(
|
|
241
|
-
e.required ? (l(),
|
|
242
|
-
e.withExamples ? (l(),
|
|
260
|
+
(q = e.value) != null && q.writeOnly ? (l(), m("div", X, " write-only ")) : (w = e.value) != null && w.readOnly ? (l(), m("div", Y, " read-only ")) : i("", !0),
|
|
261
|
+
e.required ? (l(), m("div", Z, " required ")) : i("", !0),
|
|
262
|
+
e.withExamples ? (l(), d(R, {
|
|
243
263
|
key: 10,
|
|
244
|
-
examples: (
|
|
245
|
-
example: ((V = e.value) == null ? void 0 : V.example) || ((
|
|
246
|
-
|
|
247
|
-
}, null, 8, ["examples", "example", "discriminator-type"])) : u("", !0)
|
|
264
|
+
examples: (P = e.value) == null ? void 0 : P.examples,
|
|
265
|
+
example: ((V = e.value) == null ? void 0 : V.example) || ((I = (j = e.value) == null ? void 0 : j.items) == null ? void 0 : I.example)
|
|
266
|
+
}, null, 8, ["examples", "example"])) : i("", !0)
|
|
248
267
|
]);
|
|
249
268
|
};
|
|
250
269
|
}
|
|
@@ -7,6 +7,6 @@ type SchemaObject = OpenAPI.SchemaObject;
|
|
|
7
7
|
* @param schemas - Array of OpenAPI schema objects to merge
|
|
8
8
|
* @returns Merged schema object
|
|
9
9
|
*/
|
|
10
|
-
export declare function mergeAllOfSchemas(schemas: SchemaObject[]): SchemaObject;
|
|
10
|
+
export declare function mergeAllOfSchemas(schemas: SchemaObject[], depth?: number): SchemaObject;
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=merge-all-of-schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-all-of-schemas.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/merge-all-of-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"merge-all-of-schemas.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/merge-all-of-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;AAQxC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,SAAI,GAAG,YAAY,CA4ClF"}
|
|
@@ -1,75 +1,85 @@
|
|
|
1
|
-
function f
|
|
2
|
-
return !Array.isArray(
|
|
1
|
+
function o(f, t = 0) {
|
|
2
|
+
return t >= 20 || !Array.isArray(f) || f.length === 0 ? {} : f.reduce((p, r) => {
|
|
3
3
|
if (!r || typeof r != "object")
|
|
4
4
|
return p;
|
|
5
5
|
if (r.allOf) {
|
|
6
|
-
const
|
|
7
|
-
return
|
|
6
|
+
const i = o(r.allOf, t + 1);
|
|
7
|
+
return o([p, i], t + 1);
|
|
8
8
|
}
|
|
9
9
|
const e = typeof p == "object" ? { ...p } : {};
|
|
10
|
-
if (r.properties && (e.properties =
|
|
10
|
+
if (r.properties && (e.properties = n(e.properties || {}, r.properties, t + 1)), r.items) {
|
|
11
11
|
if (r.type === "array")
|
|
12
|
-
e.items =
|
|
12
|
+
e.items = O(e.items || {}, r.items, t + 1);
|
|
13
13
|
else if (r.type === "object" && r.items.allOf) {
|
|
14
|
-
const
|
|
15
|
-
e.properties =
|
|
14
|
+
const i = o(r.items.allOf, t + 1);
|
|
15
|
+
e.properties = n(
|
|
16
|
+
e.properties || {},
|
|
17
|
+
i.properties || {},
|
|
18
|
+
t + 1
|
|
19
|
+
);
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
return
|
|
22
|
+
return A(e, r, t + 1);
|
|
19
23
|
}, {});
|
|
20
24
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
function n(f, t, p = 0) {
|
|
26
|
+
if (p >= 20)
|
|
27
|
+
return f;
|
|
28
|
+
const r = typeof f == "object" ? { ...f } : {};
|
|
29
|
+
return Object.entries(t).forEach(([e, i]) => {
|
|
30
|
+
var s;
|
|
31
|
+
if (!i || typeof i != "object") {
|
|
32
|
+
r[e] = i;
|
|
27
33
|
return;
|
|
28
34
|
}
|
|
29
35
|
if (!r[e]) {
|
|
30
|
-
|
|
31
|
-
...
|
|
32
|
-
items:
|
|
33
|
-
} :
|
|
36
|
+
i.type === "array" && ((s = i.items) != null && s.allOf) ? r[e] = {
|
|
37
|
+
...i,
|
|
38
|
+
items: o(i.items.allOf, p + 1)
|
|
39
|
+
} : i.allOf ? r[e] = o(i.allOf, p + 1) : r[e] = i;
|
|
34
40
|
return;
|
|
35
41
|
}
|
|
36
|
-
if (
|
|
37
|
-
r[e] =
|
|
38
|
-
else if (
|
|
42
|
+
if (i.allOf)
|
|
43
|
+
r[e] = o([r[e], ...i.allOf], p + 1);
|
|
44
|
+
else if (i.type === "array" && i.items)
|
|
39
45
|
r[e] = {
|
|
40
46
|
...r[e],
|
|
41
47
|
type: "array",
|
|
42
|
-
items:
|
|
48
|
+
items: O(r[e].items || {}, i.items, p + 1)
|
|
43
49
|
};
|
|
44
50
|
else {
|
|
45
|
-
const
|
|
51
|
+
const l = r[e].properties || i.properties ? n(r[e].properties || {}, i.properties || {}, p + 1) : void 0;
|
|
46
52
|
r[e] = {
|
|
47
53
|
...r[e],
|
|
48
|
-
...
|
|
49
|
-
},
|
|
54
|
+
...i
|
|
55
|
+
}, l && (r[e].properties = l);
|
|
50
56
|
}
|
|
51
57
|
}), r;
|
|
52
58
|
}
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
function O(f, t, p = 0) {
|
|
60
|
+
if (p >= 20)
|
|
61
|
+
return f;
|
|
62
|
+
if (f.allOf || t.allOf) {
|
|
63
|
+
const e = [...f.allOf || [f], ...t.allOf || [t]];
|
|
64
|
+
return o(e, p + 1);
|
|
57
65
|
}
|
|
58
66
|
const r = {
|
|
59
|
-
...
|
|
60
|
-
...
|
|
67
|
+
...f,
|
|
68
|
+
...t
|
|
61
69
|
};
|
|
62
|
-
return (r.properties ||
|
|
70
|
+
return (r.properties || t.properties) && (r.properties = n(r.properties || {}, t.properties || {}, p + 1)), r;
|
|
63
71
|
}
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
const A = (f, t, p = 0) => {
|
|
73
|
+
if (p >= 20)
|
|
74
|
+
return f;
|
|
75
|
+
const r = typeof f == "object" ? { ...f } : {};
|
|
76
|
+
return t.required && Array.isArray(t.required) && (r.required = [...f.required || [], ...t.required]), t.type && !f.type && (r.type = t.type), t.description && !f.description && (r.description = t.description), ["oneOf", "anyOf"].forEach((e) => {
|
|
77
|
+
const i = t[e];
|
|
78
|
+
i && i.forEach((s) => {
|
|
79
|
+
s.properties && (r.properties = n(r.properties || {}, s.properties, p + 1));
|
|
70
80
|
});
|
|
71
81
|
}), r;
|
|
72
82
|
};
|
|
73
83
|
export {
|
|
74
|
-
|
|
84
|
+
o as mergeAllOfSchemas
|
|
75
85
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { UnknownObject } from '@scalar/types/utils';
|
|
2
|
-
|
|
2
|
+
import type { CompositionKeyword } from './schema-composition.js';
|
|
3
|
+
export declare const compositions: CompositionKeyword[];
|
|
3
4
|
/**
|
|
4
|
-
* Optimize the value by removing nulls from
|
|
5
|
+
* Optimize the value by removing nulls from compositions.
|
|
5
6
|
*/
|
|
6
7
|
export declare function optimizeValueForDisplay(value: UnknownObject | undefined): Record<string, any> | undefined;
|
|
7
8
|
//# sourceMappingURL=optimizeValueForDisplay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAqDzG"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
const c = ["oneOf", "anyOf", "allOf", "not"];
|
|
2
|
-
function y(
|
|
2
|
+
function y(i) {
|
|
3
3
|
var s;
|
|
4
|
-
if (!
|
|
5
|
-
return
|
|
6
|
-
let
|
|
7
|
-
const
|
|
8
|
-
if (!
|
|
9
|
-
return
|
|
10
|
-
const f =
|
|
4
|
+
if (!i || typeof i != "object")
|
|
5
|
+
return i;
|
|
6
|
+
let t = { ...i };
|
|
7
|
+
const r = c.find((o) => t == null ? void 0 : t[o]);
|
|
8
|
+
if (!r || r === "not")
|
|
9
|
+
return t;
|
|
10
|
+
const f = t == null ? void 0 : t[r];
|
|
11
11
|
if (!Array.isArray(f))
|
|
12
|
-
return
|
|
13
|
-
f.some((
|
|
14
|
-
const n = f.filter((
|
|
15
|
-
return n.length === 1 && (
|
|
12
|
+
return t;
|
|
13
|
+
f.some((o) => o.type === "null") && (t.nullable = !0);
|
|
14
|
+
const n = f.filter((o) => o.type !== "null");
|
|
15
|
+
return n.length === 1 && (t != null && t[r]) ? (t = { ...t, ...n[0] }, t == null || delete t[r], t) : (Array.isArray(t == null ? void 0 : t[r]) && ((s = t == null ? void 0 : t[r]) == null ? void 0 : s.length) > 1 && (t[r] = n), t);
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
|
-
c as
|
|
18
|
+
c as compositions,
|
|
19
19
|
y as optimizeValueForDisplay
|
|
20
20
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
export type CompositionMapping = {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
};
|
|
5
|
+
/** Composition */
|
|
6
|
+
export type CompositionKeyword = 'oneOf' | 'anyOf' | 'allOf' | 'not';
|
|
7
|
+
export declare const compositions: CompositionKeyword[];
|
|
8
|
+
/** Get composition mapping from schema - used in testing */
|
|
9
|
+
export declare function getCompositionSchemaMapping(schema: OpenAPIV3_1.SchemaObject, composition: CompositionKeyword): CompositionMapping | undefined;
|
|
10
|
+
/** Check if schema has a composition keyword */
|
|
11
|
+
export declare function hasComposition(schema: OpenAPIV3_1.SchemaObject): boolean;
|
|
12
|
+
//# sourceMappingURL=schema-composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-composition.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,CAAA;AAED,kBAAkB;AAClB,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAA;AAEpE,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF,4DAA4D;AAC5D,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,WAAW,CAAC,YAAY,EAChC,WAAW,EAAE,kBAAkB,GAC9B,kBAAkB,GAAG,SAAS,CAuBhC;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,OAAO,CAExE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-discriminator.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-discriminator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,kDAAkD;AAClD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,MAAM,GAAG,SAAS,CAEjG"}
|