@scalar/api-reference 1.31.3 → 1.31.4
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 +9287 -9267
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +69 -71
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +1 -1
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Description.vue.js +2 -2
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +81 -101
- 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 +114 -105
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +35 -35
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +17 -15
- package/dist/components/Content/Schema/helpers/schema-name.js +13 -21
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +10 -9
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +29 -28
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +35 -34
- package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/components/DocumentSelector/DocumentSelector.vue.js +21 -28
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -20
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +12 -13
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +6 -6
- 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.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +5 -5
- package/dist/esm.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +11 -11
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
- package/dist/features/DownloadLink/DownloadLink.vue2.js +21 -21
- 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 +1 -1
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/features/Search/SearchButton.vue2.js +16 -16
- 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.map +1 -1
- package/dist/features/Search/useSearchIndex.js +29 -28
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +26 -0
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts +23 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -0
- package/dist/features/sidebar/index.d.ts +2 -0
- package/dist/features/sidebar/index.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -0
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +8 -0
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/operation-id-params.js +8 -0
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts +9 -0
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts +16 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +11 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +6 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +9 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +6 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -0
- package/dist/features/traverse-schema/index.d.ts +4 -0
- package/dist/features/traverse-schema/index.d.ts.map +1 -0
- package/dist/features/traverse-schema/types.d.ts +51 -0
- package/dist/features/traverse-schema/types.d.ts.map +1 -0
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +16 -16
- package/dist/hooks/useNavState.d.ts +9 -4
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +31 -29
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +69 -68
- package/dist/index.js +1 -1
- package/dist/legacy/fixtures/httpRequestMethods.js +2 -6
- package/dist/stores/useHttpClientStore.js +9 -8
- package/dist/style.css +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -11
- package/dist/components/HttpMethod/constants.d.ts +0 -9
- package/dist/components/HttpMethod/constants.d.ts.map +0 -1
- package/dist/components/HttpMethod/constants.js +0 -36
- package/dist/components/HttpMethod/utils/isRequestMethod.d.ts +0 -4
- package/dist/components/HttpMethod/utils/isRequestMethod.d.ts.map +0 -1
- package/dist/components/HttpMethod/utils/isRequestMethod.js +0 -7
- package/dist/helpers/freeze-element.d.ts +0 -11
- package/dist/helpers/freeze-element.d.ts.map +0 -1
- package/dist/helpers/freeze-element.js +0 -20
- package/dist/helpers/is-mac-os.d.ts +0 -5
- package/dist/helpers/is-mac-os.d.ts.map +0 -1
- package/dist/helpers/is-mac-os.js +0 -4
- package/dist/helpers/measure.d.ts +0 -21
- package/dist/helpers/measure.d.ts.map +0 -1
- package/dist/helpers/measure.js +0 -7
- package/dist/helpers/scroll-to-id.d.ts +0 -7
- package/dist/helpers/scroll-to-id.d.ts.map +0 -1
- package/dist/helpers/scroll-to-id.js +0 -21
- package/dist/helpers/sleep.d.ts +0 -6
- package/dist/helpers/sleep.d.ts.map +0 -1
- package/dist/helpers/sleep.js +0 -4
- package/dist/legacy/helpers/index.d.ts +0 -2
- package/dist/legacy/helpers/index.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts +0 -6
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeRequestMethod.js +0 -10
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import { optimizeValueForDisplay as
|
|
1
|
+
import { defineComponent as _, computed as s, inject as x, createBlock as u, openBlock as t, resolveDynamicComponent as ee, normalizeClass as U, withCtx as y, createCommentVNode as l, createElementBlock as o, createVNode as m, createSlots as ne, createTextVNode as B, toDisplayString as h, unref as p, Fragment as f, renderList as M, createElementVNode as v } from "vue";
|
|
2
|
+
import { Disclosure as ie, DisclosurePanel as te, DisclosureButton as ae } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as j, ScalarIcon as oe } from "@scalar/components";
|
|
4
|
+
import { optimizeValueForDisplay as re, compositions as se } from "./helpers/optimizeValueForDisplay.js";
|
|
5
5
|
import { DISCRIMINATOR_CONTEXT as le } from "../../../hooks/useDiscriminator.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
6
|
+
import $ from "./Schema.vue.js";
|
|
7
|
+
import z from "./SchemaComposition.vue.js";
|
|
8
|
+
import me from "./SchemaDiscriminator.vue.js";
|
|
9
|
+
import pe from "./SchemaPropertyHeading.vue.js";
|
|
10
|
+
import de from "../../SpecificationExtension/SpecificationExtension.vue.js";
|
|
11
|
+
const ce = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "property-description"
|
|
14
|
-
},
|
|
14
|
+
}, ue = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "property-description"
|
|
17
|
-
},
|
|
17
|
+
}, ye = {
|
|
18
18
|
key: 3,
|
|
19
19
|
class: "property-enum"
|
|
20
|
-
},
|
|
20
|
+
}, he = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "property-list"
|
|
23
|
-
},
|
|
23
|
+
}, fe = { class: "property-heading" }, ge = { class: "property-name" }, ve = { class: "property-description" }, be = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "property-enum-values"
|
|
26
|
-
},
|
|
26
|
+
}, ke = { class: "property-enum-value-label" }, Ne = { class: "property-enum-value-label" }, Me = {
|
|
27
27
|
key: 4,
|
|
28
28
|
class: "children"
|
|
29
|
-
},
|
|
29
|
+
}, Se = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "children"
|
|
32
|
-
},
|
|
32
|
+
}, we = /* @__PURE__ */ _({
|
|
33
33
|
__name: "SchemaProperty",
|
|
34
34
|
props: {
|
|
35
35
|
is: {},
|
|
@@ -52,7 +52,7 @@ const pe = {
|
|
|
52
52
|
},
|
|
53
53
|
emits: ["update:modelValue"],
|
|
54
54
|
setup(L, { emit: Z }) {
|
|
55
|
-
const S = L, X = Z,
|
|
55
|
+
const S = L, X = Z, O = {
|
|
56
56
|
integer: {
|
|
57
57
|
_default: "Integer numbers.",
|
|
58
58
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -65,55 +65,64 @@ const pe = {
|
|
|
65
65
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
66
66
|
binary: "binary data, used to describe files"
|
|
67
67
|
}
|
|
68
|
-
}, D = (e,
|
|
69
|
-
var
|
|
70
|
-
return (e == null ? void 0 : e.enum) || ((
|
|
71
|
-
},
|
|
72
|
-
() => c(
|
|
73
|
-
),
|
|
74
|
-
() => c(
|
|
75
|
-
), J =
|
|
76
|
-
() => c(
|
|
77
|
-
),
|
|
68
|
+
}, D = (e, i) => i != null && i.properties || i != null && i.additionalProperties || i != null && i.patternProperties || i != null && i.allOf ? null : e || (i == null ? void 0 : i.description) || null, C = (e) => !e || !O[e.type] ? null : O[e.type][e.format || "_default"], c = (e) => {
|
|
69
|
+
var i;
|
|
70
|
+
return (e == null ? void 0 : e.enum) || ((i = e == null ? void 0 : e.items) == null ? void 0 : i.enum) || [];
|
|
71
|
+
}, E = s(
|
|
72
|
+
() => c(n.value).length > 9
|
|
73
|
+
), H = s(() => E.value ? 5 : 9), G = s(
|
|
74
|
+
() => c(n.value).slice(0, H.value)
|
|
75
|
+
), J = s(
|
|
76
|
+
() => c(n.value).slice(H.value)
|
|
77
|
+
), n = s(() => re(S.value)), d = x(le, null), r = s(() => {
|
|
78
78
|
var e;
|
|
79
|
-
return (e =
|
|
80
|
-
}), K =
|
|
79
|
+
return (e = d == null ? void 0 : d.value) != null && e.mergedSchema ? d.value.mergedSchema : n.value;
|
|
80
|
+
}), K = s(() => {
|
|
81
81
|
var e;
|
|
82
|
-
return ((e =
|
|
83
|
-
}), Q = (e,
|
|
82
|
+
return ((e = d == null ? void 0 : d.value) == null ? void 0 : e.selectedType) || (S.discriminatorMapping ? Object.keys(S.discriminatorMapping)[0] : "");
|
|
83
|
+
}), Q = (e, i, b, k, N) => i || b || k || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || N, P = (e) => {
|
|
84
84
|
X("update:modelValue", e);
|
|
85
|
-
}
|
|
86
|
-
|
|
85
|
+
}, V = s(() => {
|
|
86
|
+
const e = n.value;
|
|
87
|
+
if (!(e != null && e.items) || typeof e.items != "object")
|
|
88
|
+
return !1;
|
|
89
|
+
const i = e.items;
|
|
90
|
+
return "type" in i && ["object"].includes(i.type) || "$ref" in i || "discriminator" in i || "allOf" in i || "oneOf" in i || "anyOf" in i;
|
|
91
|
+
}), W = (e) => {
|
|
92
|
+
const i = n.value;
|
|
93
|
+
return !(i != null && i.items) || typeof i.items != "object" || !(e in i.items) ? !1 : !V.value;
|
|
94
|
+
}, Y = s(() => V.value);
|
|
95
|
+
return (e, i) => {
|
|
87
96
|
var b;
|
|
88
|
-
return
|
|
89
|
-
class:
|
|
90
|
-
(D(e.description,
|
|
97
|
+
return t(), u(ee(e.is ?? "li"), {
|
|
98
|
+
class: U(["property", [
|
|
99
|
+
(D(e.description, n.value), ""),
|
|
91
100
|
`property--level-${e.level}`,
|
|
92
101
|
{
|
|
93
102
|
"property--compact": e.compact,
|
|
94
|
-
"property--deprecated": (b =
|
|
103
|
+
"property--deprecated": (b = n.value) == null ? void 0 : b.deprecated
|
|
95
104
|
}
|
|
96
105
|
]])
|
|
97
106
|
}, {
|
|
98
107
|
default: y(() => {
|
|
99
|
-
var k, N,
|
|
108
|
+
var k, N, I, w, A, R, T;
|
|
100
109
|
return [
|
|
101
110
|
Q(
|
|
102
|
-
|
|
111
|
+
n.value,
|
|
103
112
|
e.name,
|
|
104
113
|
e.additional,
|
|
105
114
|
e.pattern,
|
|
106
115
|
e.required
|
|
107
|
-
) ? (
|
|
116
|
+
) ? (t(), u(pe, {
|
|
108
117
|
key: 0,
|
|
109
118
|
additional: e.additional,
|
|
110
|
-
enum: c(
|
|
119
|
+
enum: c(n.value).length > 0,
|
|
111
120
|
pattern: e.pattern,
|
|
112
121
|
required: e.required,
|
|
113
|
-
value:
|
|
122
|
+
value: n.value,
|
|
114
123
|
schemas: e.schemas,
|
|
115
124
|
hideModelNames: e.hideModelNames
|
|
116
|
-
},
|
|
125
|
+
}, ne({ _: 2 }, [
|
|
117
126
|
e.name ? {
|
|
118
127
|
name: "name",
|
|
119
128
|
fn: y(() => [
|
|
@@ -121,137 +130,137 @@ const pe = {
|
|
|
121
130
|
]),
|
|
122
131
|
key: "0"
|
|
123
132
|
} : void 0,
|
|
124
|
-
(k =
|
|
133
|
+
(k = n.value) != null && k.example ? {
|
|
125
134
|
name: "example",
|
|
126
135
|
fn: y(() => [
|
|
127
|
-
B(" Example: " + h(
|
|
136
|
+
B(" Example: " + h(n.value.example), 1)
|
|
128
137
|
]),
|
|
129
138
|
key: "1"
|
|
130
139
|
} : void 0
|
|
131
|
-
]), 1032, ["additional", "enum", "pattern", "required", "value", "schemas", "hideModelNames"])) :
|
|
132
|
-
D(e.description,
|
|
133
|
-
|
|
134
|
-
value: D(e.description,
|
|
140
|
+
]), 1032, ["additional", "enum", "pattern", "required", "value", "schemas", "hideModelNames"])) : l("", !0),
|
|
141
|
+
D(e.description, n.value) ? (t(), o("div", ce, [
|
|
142
|
+
m(p(j), {
|
|
143
|
+
value: D(e.description, n.value)
|
|
135
144
|
}, null, 8, ["value"])
|
|
136
|
-
])) :
|
|
137
|
-
|
|
138
|
-
value:
|
|
145
|
+
])) : C(n.value) ? (t(), o("div", ue, [
|
|
146
|
+
m(p(j), {
|
|
147
|
+
value: C(n.value) || ""
|
|
139
148
|
}, null, 8, ["value"])
|
|
140
|
-
])) :
|
|
141
|
-
((N = c(
|
|
142
|
-
Array.isArray((
|
|
143
|
-
(
|
|
144
|
-
key:
|
|
149
|
+
])) : l("", !0),
|
|
150
|
+
((N = c(n.value)) == null ? void 0 : N.length) > 0 ? (t(), o("div", ye, [
|
|
151
|
+
Array.isArray((I = n.value) == null ? void 0 : I["x-enumDescriptions"]) ? (t(), o("div", he, [
|
|
152
|
+
(t(!0), o(f, null, M(c(n.value), (a) => (t(), o("div", {
|
|
153
|
+
key: a,
|
|
145
154
|
class: "property"
|
|
146
155
|
}, [
|
|
147
|
-
|
|
148
|
-
|
|
156
|
+
v("div", fe, [
|
|
157
|
+
v("div", ge, h(a), 1)
|
|
149
158
|
]),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
value:
|
|
159
|
+
v("div", ve, [
|
|
160
|
+
m(p(j), {
|
|
161
|
+
value: n.value["x-enumDescriptions"][a]
|
|
153
162
|
}, null, 8, ["value"])
|
|
154
163
|
])
|
|
155
164
|
]))), 128))
|
|
156
|
-
])) : (
|
|
157
|
-
(
|
|
158
|
-
key:
|
|
165
|
+
])) : (t(), o("ul", be, [
|
|
166
|
+
(t(!0), o(f, null, M(G.value, (a) => (t(), o("li", {
|
|
167
|
+
key: a,
|
|
159
168
|
class: "property-enum-value"
|
|
160
169
|
}, [
|
|
161
|
-
|
|
170
|
+
v("span", ke, h(a), 1)
|
|
162
171
|
]))), 128)),
|
|
163
|
-
|
|
164
|
-
default: y(({ open:
|
|
165
|
-
|
|
172
|
+
E.value ? (t(), u(p(ie), { key: 0 }, {
|
|
173
|
+
default: y(({ open: a }) => [
|
|
174
|
+
m(p(te), null, {
|
|
166
175
|
default: y(() => [
|
|
167
|
-
(
|
|
168
|
-
key:
|
|
176
|
+
(t(!0), o(f, null, M(J.value, (g) => (t(), o("li", {
|
|
177
|
+
key: g,
|
|
169
178
|
class: "property-enum-value"
|
|
170
179
|
}, [
|
|
171
|
-
|
|
180
|
+
v("span", Ne, h(g), 1)
|
|
172
181
|
]))), 128))
|
|
173
182
|
]),
|
|
174
183
|
_: 1
|
|
175
184
|
}),
|
|
176
|
-
|
|
185
|
+
m(p(ae), { class: "enum-toggle-button" }, {
|
|
177
186
|
default: y(() => [
|
|
178
|
-
|
|
179
|
-
class:
|
|
187
|
+
m(p(oe), {
|
|
188
|
+
class: U(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": a }]),
|
|
180
189
|
icon: "Add",
|
|
181
190
|
size: "sm"
|
|
182
191
|
}, null, 8, ["class"]),
|
|
183
|
-
B(" " + h(
|
|
192
|
+
B(" " + h(a ? "Hide values" : "Show all values"), 1)
|
|
184
193
|
]),
|
|
185
194
|
_: 2
|
|
186
195
|
}, 1024)
|
|
187
196
|
]),
|
|
188
197
|
_: 1
|
|
189
|
-
})) :
|
|
198
|
+
})) : l("", !0)
|
|
190
199
|
]))
|
|
191
|
-
])) :
|
|
192
|
-
((w =
|
|
193
|
-
|
|
200
|
+
])) : l("", !0),
|
|
201
|
+
((w = n.value) == null ? void 0 : w.type) === "object" && ((A = n.value) != null && A.properties || (R = n.value) != null && R.additionalProperties) ? (t(), o("div", Me, [
|
|
202
|
+
m($, {
|
|
194
203
|
compact: e.compact,
|
|
195
204
|
level: e.level + 1,
|
|
196
205
|
name: e.name,
|
|
197
206
|
noncollapsible: e.noncollapsible,
|
|
198
|
-
value:
|
|
199
|
-
resolvedSchema:
|
|
207
|
+
value: r.value,
|
|
208
|
+
resolvedSchema: r.value,
|
|
200
209
|
discriminatorMapping: e.discriminatorMapping,
|
|
201
210
|
discriminatorPropertyName: e.discriminatorPropertyName,
|
|
202
211
|
schemas: e.schemas,
|
|
203
212
|
"onUpdate:modelValue": P
|
|
204
213
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "value", "resolvedSchema", "discriminatorMapping", "discriminatorPropertyName", "schemas"])
|
|
205
|
-
])) :
|
|
206
|
-
(
|
|
207
|
-
|
|
208
|
-
|
|
214
|
+
])) : l("", !0),
|
|
215
|
+
(T = n.value) != null && T.items && typeof n.value.items == "object" ? (t(), o(f, { key: 5 }, [
|
|
216
|
+
Y.value ? (t(), o("div", Se, [
|
|
217
|
+
m($, {
|
|
209
218
|
compact: e.compact,
|
|
210
219
|
level: e.level + 1,
|
|
211
220
|
name: e.name,
|
|
212
221
|
noncollapsible: e.noncollapsible,
|
|
213
|
-
value:
|
|
214
|
-
resolvedSchema:
|
|
222
|
+
value: r.value && typeof r.value == "object" && "items" in r.value ? r.value.items : n.value.items,
|
|
223
|
+
resolvedSchema: r.value && typeof r.value == "object" && "items" in r.value ? r.value.items : n.value.items,
|
|
215
224
|
discriminatorMapping: e.discriminatorMapping,
|
|
216
225
|
discriminatorPropertyName: e.discriminatorPropertyName,
|
|
217
226
|
schemas: e.schemas,
|
|
218
227
|
"onUpdate:modelValue": P
|
|
219
228
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "value", "resolvedSchema", "discriminatorMapping", "discriminatorPropertyName", "schemas"])
|
|
220
|
-
])) :
|
|
221
|
-
], 64)) :
|
|
222
|
-
(
|
|
223
|
-
var
|
|
224
|
-
return
|
|
225
|
-
(
|
|
229
|
+
])) : l("", !0)
|
|
230
|
+
], 64)) : l("", !0),
|
|
231
|
+
(t(!0), o(f, null, M(p(se), (a) => {
|
|
232
|
+
var g, q, F;
|
|
233
|
+
return t(), o(f, { key: a }, [
|
|
234
|
+
(g = n.value) != null && g[a] && !((q = n.value) != null && q.items && typeof a == "string" && typeof n.value.items == "object" && a in n.value.items) ? (t(), u(z, {
|
|
226
235
|
key: 0,
|
|
227
236
|
compact: e.compact,
|
|
228
|
-
composition:
|
|
237
|
+
composition: a,
|
|
229
238
|
hideHeading: e.hideHeading,
|
|
230
239
|
level: e.level,
|
|
231
240
|
name: e.name,
|
|
232
241
|
noncollapsible: e.noncollapsible,
|
|
233
242
|
schemas: e.schemas,
|
|
234
|
-
value:
|
|
235
|
-
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (
|
|
243
|
+
value: n.value
|
|
244
|
+
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : W(a) ? (t(), u(z, {
|
|
236
245
|
key: 1,
|
|
237
246
|
compact: e.compact,
|
|
238
|
-
composition:
|
|
247
|
+
composition: a,
|
|
239
248
|
hideHeading: e.hideHeading,
|
|
240
249
|
level: e.level,
|
|
241
250
|
name: e.name,
|
|
242
251
|
noncollapsible: e.noncollapsible,
|
|
243
252
|
schemas: e.schemas,
|
|
244
|
-
value:
|
|
245
|
-
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) :
|
|
253
|
+
value: (F = n.value) == null ? void 0 : F.items
|
|
254
|
+
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : l("", !0)
|
|
246
255
|
], 64);
|
|
247
256
|
}), 128)),
|
|
248
|
-
e.isDiscriminator && e.discriminatorMapping && e.compact ? (
|
|
257
|
+
e.isDiscriminator && e.discriminatorMapping && e.compact ? (t(), u(me, {
|
|
249
258
|
key: 6,
|
|
250
259
|
"discriminator-mapping": e.discriminatorMapping,
|
|
251
260
|
discriminator: K.value,
|
|
252
261
|
"onUpdate:modelValue": P
|
|
253
|
-
}, null, 8, ["discriminator-mapping", "discriminator"])) :
|
|
254
|
-
|
|
262
|
+
}, null, 8, ["discriminator-mapping", "discriminator"])) : l("", !0),
|
|
263
|
+
m(p(de), { value: n.value }, null, 8, ["value"])
|
|
255
264
|
];
|
|
256
265
|
}),
|
|
257
266
|
_: 1
|
|
@@ -260,5 +269,5 @@ const pe = {
|
|
|
260
269
|
}
|
|
261
270
|
});
|
|
262
271
|
export {
|
|
263
|
-
|
|
272
|
+
we as default
|
|
264
273
|
};
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
function o(f,
|
|
2
|
-
return
|
|
1
|
+
function o(f, e = 0) {
|
|
2
|
+
return e >= 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 i = o(r.allOf,
|
|
7
|
-
return o([p, i],
|
|
6
|
+
const i = o(r.allOf, e + 1);
|
|
7
|
+
return o([p, i], e + 1);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
if (r.properties && (
|
|
9
|
+
const t = typeof p == "object" ? { ...p } : {};
|
|
10
|
+
if (r.properties && (t.properties = n(t.properties || {}, r.properties, e + 1)), r.items) {
|
|
11
11
|
if (r.type === "array")
|
|
12
|
-
|
|
12
|
+
t.items = O(t.items || {}, r.items, e + 1);
|
|
13
13
|
else if (r.type === "object" && r.items.allOf) {
|
|
14
|
-
const i = o(r.items.allOf,
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const i = o(r.items.allOf, e + 1);
|
|
15
|
+
t.properties = n(
|
|
16
|
+
t.properties || {},
|
|
17
17
|
i.properties || {},
|
|
18
|
-
|
|
18
|
+
e + 1
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return m(t, r, e + 1);
|
|
23
23
|
}, {});
|
|
24
24
|
}
|
|
25
|
-
function n(f,
|
|
25
|
+
function n(f, e, p = 0) {
|
|
26
26
|
if (p >= 20)
|
|
27
27
|
return f;
|
|
28
28
|
const r = typeof f == "object" ? { ...f } : {};
|
|
29
|
-
return Object.entries(
|
|
29
|
+
return Object.entries(e).forEach(([t, i]) => {
|
|
30
30
|
var s;
|
|
31
31
|
if (!i || typeof i != "object") {
|
|
32
|
-
r[
|
|
32
|
+
r[t] = i;
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
if (!r[
|
|
36
|
-
i.type === "array" && ((s = i.items) != null && s.allOf) ? r[
|
|
35
|
+
if (!r[t]) {
|
|
36
|
+
i.type === "array" && ((s = i.items) != null && s.allOf) ? r[t] = {
|
|
37
37
|
...i,
|
|
38
38
|
items: o(i.items.allOf, p + 1)
|
|
39
|
-
} : i.allOf ? r[
|
|
39
|
+
} : i.allOf ? r[t] = o(i.allOf, p + 1) : r[t] = i;
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
if (i.allOf)
|
|
43
|
-
r[
|
|
43
|
+
r[t] = o([r[t], ...i.allOf], p + 1);
|
|
44
44
|
else if (i.type === "array" && i.items)
|
|
45
|
-
r[
|
|
46
|
-
...r[
|
|
45
|
+
r[t] = {
|
|
46
|
+
...r[t],
|
|
47
47
|
type: "array",
|
|
48
|
-
items: O(r[
|
|
48
|
+
items: O(r[t].items || {}, i.items, p + 1)
|
|
49
49
|
};
|
|
50
50
|
else {
|
|
51
|
-
const l = r[
|
|
52
|
-
r[
|
|
53
|
-
...r[
|
|
51
|
+
const l = r[t].properties || i.properties ? n(r[t].properties || {}, i.properties || {}, p + 1) : void 0;
|
|
52
|
+
r[t] = {
|
|
53
|
+
...r[t],
|
|
54
54
|
...i
|
|
55
|
-
}, l && (r[
|
|
55
|
+
}, l && (r[t].properties = l);
|
|
56
56
|
}
|
|
57
57
|
}), r;
|
|
58
58
|
}
|
|
59
|
-
function O(f,
|
|
59
|
+
function O(f, e, p = 0) {
|
|
60
60
|
if (p >= 20)
|
|
61
61
|
return f;
|
|
62
|
-
if (f.allOf ||
|
|
63
|
-
const
|
|
64
|
-
return o(
|
|
62
|
+
if (f.allOf || e.allOf) {
|
|
63
|
+
const t = [...f.allOf || [f], ...e.allOf || [e]];
|
|
64
|
+
return o(t, p + 1);
|
|
65
65
|
}
|
|
66
66
|
const r = {
|
|
67
67
|
...f,
|
|
68
|
-
...
|
|
68
|
+
...e
|
|
69
69
|
};
|
|
70
|
-
return (r.properties ||
|
|
70
|
+
return (r.properties || e.properties) && (r.properties = n(r.properties || {}, e.properties || {}, p + 1)), r;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const m = (f, e, p = 0) => {
|
|
73
73
|
if (p >= 20)
|
|
74
74
|
return f;
|
|
75
75
|
const r = typeof f == "object" ? { ...f } : {};
|
|
76
|
-
return
|
|
77
|
-
const i = t
|
|
76
|
+
return e.required && Array.isArray(e.required) && (r.required = [...f.required || [], ...e.required]), e.type && !f.type && (r.type = e.type), e.title && !f.title && (r.title = e.title), e.name && !f.name && (r.name = e.name), e.description && !f.description && (r.description = e.description), ["oneOf", "anyOf"].forEach((t) => {
|
|
77
|
+
const i = e[t];
|
|
78
78
|
i && i.forEach((s) => {
|
|
79
79
|
s.properties && (r.properties = n(r.properties || {}, s.properties, p + 1));
|
|
80
80
|
});
|
|
@@ -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;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,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;AAG9D,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,CA8DzG"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { mergeAllOfSchemas as p } from "./merge-all-of-schemas.js";
|
|
2
|
+
const y = ["oneOf", "anyOf", "allOf", "not"];
|
|
3
|
+
function m(i) {
|
|
4
|
+
var c;
|
|
4
5
|
if (!i || typeof i != "object")
|
|
5
6
|
return i;
|
|
6
|
-
let
|
|
7
|
-
const
|
|
8
|
-
if (!
|
|
9
|
-
return
|
|
10
|
-
const
|
|
11
|
-
if (!Array.isArray(
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
let r = { ...i };
|
|
8
|
+
const o = y.find((t) => r == null ? void 0 : r[t]);
|
|
9
|
+
if (!o || o === "not")
|
|
10
|
+
return r;
|
|
11
|
+
const n = r == null ? void 0 : r[o];
|
|
12
|
+
if (!Array.isArray(n))
|
|
13
|
+
return r;
|
|
14
|
+
const s = n.map((t) => t.allOf && Array.isArray(t.allOf) ? p(t.allOf) : t);
|
|
15
|
+
s.some((t) => t.type === "null") && (r.nullable = !0);
|
|
16
|
+
const f = s.filter((t) => t.type !== "null");
|
|
17
|
+
return f.length === 1 && (r != null && r[o]) ? (r = { ...r, ...f[0] }, r == null || delete r[o], r) : (Array.isArray(r == null ? void 0 : r[o]) && ((c = r == null ? void 0 : r[o]) == null ? void 0 : c.length) > 1 && (r[o] = f), r);
|
|
16
18
|
}
|
|
17
19
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
y as compositions,
|
|
21
|
+
m as optimizeValueForDisplay
|
|
20
22
|
};
|
|
@@ -1,40 +1,32 @@
|
|
|
1
|
-
import { stringify as
|
|
2
|
-
function
|
|
1
|
+
import { stringify as e } from "flatted";
|
|
2
|
+
function y(t, n) {
|
|
3
3
|
if (!t)
|
|
4
4
|
return null;
|
|
5
5
|
if ("title" in t && t.title)
|
|
6
6
|
return t.title;
|
|
7
7
|
if ("name" in t && t.name)
|
|
8
8
|
return t.name;
|
|
9
|
-
if (
|
|
10
|
-
for (const [
|
|
11
|
-
if (
|
|
12
|
-
return
|
|
9
|
+
if (n && typeof n == "object") {
|
|
10
|
+
for (const [r, i] of Object.entries(n))
|
|
11
|
+
if (e(i) === e(t))
|
|
12
|
+
return r;
|
|
13
13
|
}
|
|
14
14
|
if ("$ref" in t) {
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
15
|
+
const i = t.$ref.match(/\/([^\/]+)$/);
|
|
16
|
+
if (i)
|
|
17
|
+
return i[1];
|
|
18
18
|
}
|
|
19
19
|
if ("type" in t && t.type === "array" && "items" in t && t.items)
|
|
20
20
|
return `Array of ${"type" in t.items && t.items.type || "any"}`;
|
|
21
21
|
if ("type" in t && t.type)
|
|
22
22
|
return Array.isArray(t.type) ? t.type.join(" | ") : t.type;
|
|
23
23
|
if (typeof t == "object") {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
24
|
+
const r = Object.keys(t);
|
|
25
|
+
if (r.length > 0)
|
|
26
|
+
return r[0];
|
|
27
27
|
}
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
|
-
function y(t) {
|
|
31
|
-
return !t || ["anyOf", "oneOf", "allOf"].includes(t) ? !1 : /[A-Z]/.test(t) || /\s/.test(t) || /\(\d+\)/.test(t);
|
|
32
|
-
}
|
|
33
|
-
function N(t, r, i) {
|
|
34
|
-
return t.some((n) => "$ref" in n) || t.map((n) => f(n, i)).some((n) => y(n)) ? t : r.map((n) => f(n, i)).some((n) => y(n)) ? r : t;
|
|
35
|
-
}
|
|
36
30
|
export {
|
|
37
|
-
|
|
38
|
-
f as getModelNameFromSchema,
|
|
39
|
-
y as hasName
|
|
31
|
+
y as getModelNameFromSchema
|
|
40
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsList.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAY/C,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAkHF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./OperationsList.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-775f2c95"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|