@scalar/api-reference 1.29.3 → 1.30.0
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 +16 -0
- package/README.md +13 -114
- package/dist/browser/standalone.js +1864 -1773
- package/dist/browser/webpack-stats.json +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 +118 -84
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +13 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +49 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +4 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +123 -119
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +9 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.js +45 -0
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +2 -2
- package/dist/features/ApiClientModal/useApiClient.d.ts +28 -8
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +14 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.js +7 -0
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +62 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +10 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +30 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +4 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +86 -74
- package/dist/features/Operation/types/schemas.d.ts +3 -0
- package/dist/features/Operation/types/schemas.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -8
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as H, computed as b, createElementBlock as n, openBlock as r, createCommentVNode as i, createBlock as d, normalizeClass as J, renderSlot as E, Fragment as y, createTextVNode as l, withCtx as a, createVNode as v, toDisplayString as m, unref as N } from "vue";
|
|
2
2
|
import { isDefined as B } from "@scalar/oas-utils/helpers";
|
|
3
3
|
import { stringify as g } from "flatted";
|
|
4
|
-
import { compositions as
|
|
5
|
-
import
|
|
4
|
+
import { compositions as R } from "./helpers/schema-composition.js";
|
|
5
|
+
import W from "./SchemaPropertyExamples.vue.js";
|
|
6
6
|
import j from "../../ScreenReader.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
key:
|
|
11
|
-
class: "property-
|
|
12
|
-
}, K = {
|
|
13
|
-
key: 3,
|
|
14
|
-
class: "property-pattern"
|
|
7
|
+
import s from "./SchemaPropertyDetail.vue.js";
|
|
8
|
+
import L from "../../Badge/Badge.vue.js";
|
|
9
|
+
const G = { class: "property-heading" }, K = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "property-discriminator"
|
|
15
12
|
}, Q = {
|
|
16
|
-
key:
|
|
17
|
-
class: "property-
|
|
13
|
+
key: 3,
|
|
14
|
+
class: "property-additional"
|
|
18
15
|
}, U = {
|
|
19
|
-
key:
|
|
20
|
-
class: "property-
|
|
16
|
+
key: 4,
|
|
17
|
+
class: "property-pattern"
|
|
21
18
|
}, X = {
|
|
22
|
-
key:
|
|
23
|
-
class: "property-
|
|
19
|
+
key: 5,
|
|
20
|
+
class: "property-deprecated"
|
|
24
21
|
}, Y = {
|
|
25
|
-
key:
|
|
26
|
-
class: "property-
|
|
22
|
+
key: 6,
|
|
23
|
+
class: "property-const"
|
|
27
24
|
}, Z = {
|
|
25
|
+
key: 8,
|
|
26
|
+
class: "property-write-only"
|
|
27
|
+
}, h = {
|
|
28
28
|
key: 9,
|
|
29
|
+
class: "property-read-only"
|
|
30
|
+
}, x = {
|
|
31
|
+
key: 10,
|
|
29
32
|
class: "property-required"
|
|
30
|
-
},
|
|
33
|
+
}, ie = /* @__PURE__ */ H({
|
|
31
34
|
__name: "SchemaPropertyHeading",
|
|
32
35
|
props: {
|
|
33
36
|
value: {},
|
|
@@ -39,8 +42,8 @@ const W = { class: "property-heading" }, G = {
|
|
|
39
42
|
schemas: {}
|
|
40
43
|
},
|
|
41
44
|
setup(u) {
|
|
42
|
-
|
|
43
|
-
const
|
|
45
|
+
R.find((e) => !u.value || typeof u.value != "object" ? !1 : e in u.value || u.value.items && typeof u.value.items == "object" && e in u.value.items);
|
|
46
|
+
const T = (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, M = (e) => {
|
|
44
47
|
if (!e)
|
|
45
48
|
return null;
|
|
46
49
|
if (e.title)
|
|
@@ -59,10 +62,10 @@ const W = { class: "property-heading" }, G = {
|
|
|
59
62
|
}
|
|
60
63
|
return null;
|
|
61
64
|
}, S = b(() => {
|
|
62
|
-
var e, t, o,
|
|
65
|
+
var e, t, o, f, p, k;
|
|
63
66
|
if (B((e = u.value) == null ? void 0 : e.const))
|
|
64
67
|
return (t = u.value) == null ? void 0 : t.const;
|
|
65
|
-
if (((
|
|
68
|
+
if (((f = (o = u.value) == null ? void 0 : o.enum) == null ? void 0 : f.length) === 1)
|
|
66
69
|
return u.value.enum[0];
|
|
67
70
|
if ((p = u.value) != null && p.items) {
|
|
68
71
|
if (B(u.value.items.const))
|
|
@@ -71,87 +74,88 @@ const W = { class: "property-heading" }, G = {
|
|
|
71
74
|
return u.value.items.enum[0];
|
|
72
75
|
}
|
|
73
76
|
return null;
|
|
74
|
-
}),
|
|
75
|
-
var e, t, o,
|
|
76
|
-
return Array.isArray((e = u.value) == null ? void 0 : e.type) ? u.value.type.join(" | ") : (t = u.value) != null && t.title ? u.value.title : (o = u.value) != null && o.name ? u.value.name : ((
|
|
77
|
-
}),
|
|
77
|
+
}), F = b(() => {
|
|
78
|
+
var e, t, o, f;
|
|
79
|
+
return Array.isArray((e = u.value) == null ? void 0 : e.type) ? u.value.type.join(" | ") : (t = u.value) != null && t.title ? u.value.title : (o = u.value) != null && o.name ? u.value.name : ((f = u.value) == null ? void 0 : f.type) ?? "";
|
|
80
|
+
}), z = (e, t) => e === "array" ? `${e} ${t}[]` : `${e} ${t}`, $ = b(() => {
|
|
78
81
|
var t, o;
|
|
79
82
|
if (!((t = u.value) != null && t.type))
|
|
80
83
|
return null;
|
|
81
84
|
if (u.value.type === "array" && ((o = u.value.items) != null && o.type)) {
|
|
82
|
-
const
|
|
83
|
-
return
|
|
85
|
+
const f = M(u.value.items) || u.value.items.type;
|
|
86
|
+
return z(u.value.type, f);
|
|
84
87
|
}
|
|
85
88
|
const e = M(u.value);
|
|
86
89
|
return e || null;
|
|
87
90
|
});
|
|
88
91
|
return (e, t) => {
|
|
89
|
-
var o,
|
|
90
|
-
return
|
|
91
|
-
e.$slots.name ? (
|
|
92
|
+
var o, f, p, k, V, q, w, D, P, I, O, A;
|
|
93
|
+
return r(), n("div", G, [
|
|
94
|
+
e.$slots.name ? (r(), n("div", {
|
|
92
95
|
key: 0,
|
|
93
|
-
class:
|
|
96
|
+
class: J(["property-name", { deprecated: (o = e.value) == null ? void 0 : o.deprecated }])
|
|
94
97
|
}, [
|
|
95
|
-
e.pattern ? (
|
|
98
|
+
e.pattern ? (r(), n(y, { key: 1 }, [
|
|
96
99
|
t[0] || (t[0] = l("/")),
|
|
97
|
-
|
|
100
|
+
E(e.$slots, "name", {}, void 0, !0),
|
|
98
101
|
t[1] || (t[1] = l("/"))
|
|
99
|
-
], 64)) :
|
|
100
|
-
], 2)) :
|
|
101
|
-
e.value ? (
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
|
|
103
|
+
], 2)) : i("", !0),
|
|
104
|
+
(f = e.value) != null && f.isDiscriminator ? (r(), n("div", K, " Discriminator ")) : i("", !0),
|
|
105
|
+
e.value ? (r(), n(y, { key: 2 }, [
|
|
106
|
+
(p = e.value) != null && p.type ? (r(), d(s, { key: 0 }, {
|
|
107
|
+
default: a(() => {
|
|
104
108
|
var C;
|
|
105
109
|
return [
|
|
106
110
|
v(j, null, {
|
|
107
|
-
default:
|
|
111
|
+
default: a(() => t[2] || (t[2] = [
|
|
108
112
|
l("Type:")
|
|
109
113
|
])),
|
|
110
114
|
_: 1
|
|
111
115
|
}),
|
|
112
|
-
$.value ? (
|
|
116
|
+
$.value ? (r(), n(y, { key: 0 }, [
|
|
113
117
|
l(m($.value), 1)
|
|
114
|
-
], 64)) : (
|
|
115
|
-
l(m(
|
|
118
|
+
], 64)) : (r(), n(y, { key: 1 }, [
|
|
119
|
+
l(m(F.value) + " " + m((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
|
|
116
120
|
], 64))
|
|
117
121
|
];
|
|
118
122
|
}),
|
|
119
123
|
_: 1
|
|
120
|
-
})) :
|
|
121
|
-
e.value.minItems || e.value.maxItems ? (
|
|
122
|
-
default:
|
|
124
|
+
})) : i("", !0),
|
|
125
|
+
e.value.minItems || e.value.maxItems ? (r(), d(s, { key: 1 }, {
|
|
126
|
+
default: a(() => [
|
|
123
127
|
l(m(e.value.minItems) + "…" + m(e.value.maxItems), 1)
|
|
124
128
|
]),
|
|
125
129
|
_: 1
|
|
126
|
-
})) :
|
|
127
|
-
e.value.minLength ? (
|
|
128
|
-
prefix:
|
|
130
|
+
})) : i("", !0),
|
|
131
|
+
e.value.minLength ? (r(), d(s, { key: 2 }, {
|
|
132
|
+
prefix: a(() => t[3] || (t[3] = [
|
|
129
133
|
l("min:")
|
|
130
134
|
])),
|
|
131
|
-
default:
|
|
135
|
+
default: a(() => [
|
|
132
136
|
l(" " + m(e.value.minLength), 1)
|
|
133
137
|
]),
|
|
134
138
|
_: 1
|
|
135
|
-
})) :
|
|
136
|
-
e.value.maxLength ? (
|
|
137
|
-
prefix:
|
|
139
|
+
})) : i("", !0),
|
|
140
|
+
e.value.maxLength ? (r(), d(s, { key: 3 }, {
|
|
141
|
+
prefix: a(() => t[4] || (t[4] = [
|
|
138
142
|
l("max:")
|
|
139
143
|
])),
|
|
140
|
-
default:
|
|
144
|
+
default: a(() => [
|
|
141
145
|
l(" " + m(e.value.maxLength), 1)
|
|
142
146
|
]),
|
|
143
147
|
_: 1
|
|
144
|
-
})) :
|
|
145
|
-
e.value.uniqueItems ? (
|
|
146
|
-
default:
|
|
148
|
+
})) : i("", !0),
|
|
149
|
+
e.value.uniqueItems ? (r(), d(s, { key: 4 }, {
|
|
150
|
+
default: a(() => t[5] || (t[5] = [
|
|
147
151
|
l(" unique! ")
|
|
148
152
|
])),
|
|
149
153
|
_: 1
|
|
150
|
-
})) :
|
|
151
|
-
e.value.format ? (
|
|
152
|
-
default:
|
|
154
|
+
})) : i("", !0),
|
|
155
|
+
e.value.format ? (r(), d(s, { key: 5 }, {
|
|
156
|
+
default: a(() => [
|
|
153
157
|
v(j, null, {
|
|
154
|
-
default:
|
|
158
|
+
default: a(() => t[6] || (t[6] = [
|
|
155
159
|
l("Format:")
|
|
156
160
|
])),
|
|
157
161
|
_: 1
|
|
@@ -159,51 +163,51 @@ const W = { class: "property-heading" }, G = {
|
|
|
159
163
|
l(" " + m(e.value.format), 1)
|
|
160
164
|
]),
|
|
161
165
|
_: 1
|
|
162
|
-
})) :
|
|
163
|
-
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (
|
|
164
|
-
prefix:
|
|
166
|
+
})) : i("", !0),
|
|
167
|
+
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (r(), d(s, { key: 6 }, {
|
|
168
|
+
prefix: a(() => t[7] || (t[7] = [
|
|
165
169
|
l("greater than:")
|
|
166
170
|
])),
|
|
167
|
-
default:
|
|
171
|
+
default: a(() => [
|
|
168
172
|
l(" " + m(e.value.minimum), 1)
|
|
169
173
|
]),
|
|
170
174
|
_: 1
|
|
171
|
-
})) :
|
|
172
|
-
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (
|
|
173
|
-
prefix:
|
|
175
|
+
})) : i("", !0),
|
|
176
|
+
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (r(), d(s, { key: 7 }, {
|
|
177
|
+
prefix: a(() => t[8] || (t[8] = [
|
|
174
178
|
l("min:")
|
|
175
179
|
])),
|
|
176
|
-
default:
|
|
180
|
+
default: a(() => [
|
|
177
181
|
l(" " + m(e.value.minimum), 1)
|
|
178
182
|
]),
|
|
179
183
|
_: 1
|
|
180
|
-
})) :
|
|
181
|
-
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (
|
|
182
|
-
prefix:
|
|
184
|
+
})) : i("", !0),
|
|
185
|
+
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (r(), d(s, { key: 8 }, {
|
|
186
|
+
prefix: a(() => t[9] || (t[9] = [
|
|
183
187
|
l("less than:")
|
|
184
188
|
])),
|
|
185
|
-
default:
|
|
189
|
+
default: a(() => [
|
|
186
190
|
l(" " + m(e.value.maximum), 1)
|
|
187
191
|
]),
|
|
188
192
|
_: 1
|
|
189
|
-
})) :
|
|
190
|
-
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (
|
|
191
|
-
prefix:
|
|
193
|
+
})) : i("", !0),
|
|
194
|
+
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (r(), d(s, { key: 9 }, {
|
|
195
|
+
prefix: a(() => t[10] || (t[10] = [
|
|
192
196
|
l("max:")
|
|
193
197
|
])),
|
|
194
|
-
default:
|
|
198
|
+
default: a(() => [
|
|
195
199
|
l(" " + m(e.value.maximum), 1)
|
|
196
200
|
]),
|
|
197
201
|
_: 1
|
|
198
|
-
})) :
|
|
199
|
-
e.value.pattern ? (
|
|
202
|
+
})) : i("", !0),
|
|
203
|
+
e.value.pattern ? (r(), d(s, {
|
|
200
204
|
key: 10,
|
|
201
205
|
code: "",
|
|
202
206
|
truncate: ""
|
|
203
207
|
}, {
|
|
204
|
-
default:
|
|
208
|
+
default: a(() => [
|
|
205
209
|
v(j, null, {
|
|
206
|
-
default:
|
|
210
|
+
default: a(() => t[11] || (t[11] = [
|
|
207
211
|
l("Pattern:")
|
|
208
212
|
])),
|
|
209
213
|
_: 1
|
|
@@ -211,78 +215,78 @@ const W = { class: "property-heading" }, G = {
|
|
|
211
215
|
l(" " + m(e.value.pattern), 1)
|
|
212
216
|
]),
|
|
213
217
|
_: 1
|
|
214
|
-
})) :
|
|
215
|
-
e.$props.enum ? (
|
|
216
|
-
default:
|
|
218
|
+
})) : i("", !0),
|
|
219
|
+
e.$props.enum ? (r(), d(s, { key: 11 }, {
|
|
220
|
+
default: a(() => t[12] || (t[12] = [
|
|
217
221
|
l("enum")
|
|
218
222
|
])),
|
|
219
223
|
_: 1
|
|
220
|
-
})) :
|
|
221
|
-
e.value.default !== void 0 ? (
|
|
224
|
+
})) : i("", !0),
|
|
225
|
+
e.value.default !== void 0 ? (r(), d(s, {
|
|
222
226
|
key: 12,
|
|
223
227
|
truncate: ""
|
|
224
228
|
}, {
|
|
225
|
-
prefix:
|
|
229
|
+
prefix: a(() => t[13] || (t[13] = [
|
|
226
230
|
l("default:")
|
|
227
231
|
])),
|
|
228
|
-
default:
|
|
229
|
-
l(" " + m(
|
|
232
|
+
default: a(() => [
|
|
233
|
+
l(" " + m(T(e.value)), 1)
|
|
230
234
|
]),
|
|
231
235
|
_: 1
|
|
232
|
-
})) :
|
|
233
|
-
], 64)) :
|
|
234
|
-
e.additional ? (
|
|
235
|
-
(
|
|
236
|
+
})) : i("", !0)
|
|
237
|
+
], 64)) : i("", !0),
|
|
238
|
+
e.additional ? (r(), n("div", Q, [
|
|
239
|
+
(k = e.value) != null && k["x-additionalPropertiesName"] ? (r(), n(y, { key: 0 }, [
|
|
236
240
|
l(m(e.value["x-additionalPropertiesName"]), 1)
|
|
237
|
-
], 64)) : (
|
|
241
|
+
], 64)) : (r(), n(y, { key: 1 }, [
|
|
238
242
|
l("additional properties")
|
|
239
243
|
], 64))
|
|
240
|
-
])) :
|
|
241
|
-
e.pattern ? (
|
|
242
|
-
v(N(
|
|
243
|
-
default:
|
|
244
|
+
])) : i("", !0),
|
|
245
|
+
e.pattern ? (r(), n("div", U, [
|
|
246
|
+
v(N(L), null, {
|
|
247
|
+
default: a(() => t[14] || (t[14] = [
|
|
244
248
|
l("pattern")
|
|
245
249
|
])),
|
|
246
250
|
_: 1
|
|
247
251
|
})
|
|
248
|
-
])) :
|
|
249
|
-
(
|
|
250
|
-
v(N(
|
|
251
|
-
default:
|
|
252
|
+
])) : i("", !0),
|
|
253
|
+
(V = e.value) != null && V.deprecated ? (r(), n("div", X, [
|
|
254
|
+
v(N(L), null, {
|
|
255
|
+
default: a(() => t[15] || (t[15] = [
|
|
252
256
|
l("deprecated")
|
|
253
257
|
])),
|
|
254
258
|
_: 1
|
|
255
259
|
})
|
|
256
|
-
])) :
|
|
257
|
-
N(B)(S.value) ? (
|
|
258
|
-
v(
|
|
259
|
-
prefix:
|
|
260
|
+
])) : i("", !0),
|
|
261
|
+
N(B)(S.value) ? (r(), n("div", Y, [
|
|
262
|
+
v(s, { truncate: "" }, {
|
|
263
|
+
prefix: a(() => t[16] || (t[16] = [
|
|
260
264
|
l("const:")
|
|
261
265
|
])),
|
|
262
|
-
default:
|
|
266
|
+
default: a(() => [
|
|
263
267
|
l(" " + m(S.value), 1)
|
|
264
268
|
]),
|
|
265
269
|
_: 1
|
|
266
270
|
})
|
|
267
|
-
])) : (
|
|
268
|
-
((
|
|
269
|
-
default:
|
|
271
|
+
])) : (r(), n(y, { key: 7 }, [
|
|
272
|
+
((q = e.value) == null ? void 0 : q.nullable) === !0 ? (r(), d(s, { key: 0 }, {
|
|
273
|
+
default: a(() => t[17] || (t[17] = [
|
|
270
274
|
l(" nullable ")
|
|
271
275
|
])),
|
|
272
276
|
_: 1
|
|
273
|
-
})) :
|
|
277
|
+
})) : i("", !0)
|
|
274
278
|
], 64)),
|
|
275
|
-
(
|
|
276
|
-
e.required ? (
|
|
277
|
-
e.withExamples ? (
|
|
278
|
-
key:
|
|
279
|
+
(w = e.value) != null && w.writeOnly ? (r(), n("div", Z, " write-only ")) : (D = e.value) != null && D.readOnly ? (r(), n("div", h, " read-only ")) : i("", !0),
|
|
280
|
+
e.required ? (r(), n("div", x, " required ")) : i("", !0),
|
|
281
|
+
e.withExamples ? (r(), d(W, {
|
|
282
|
+
key: 11,
|
|
279
283
|
examples: (P = e.value) == null ? void 0 : P.examples,
|
|
280
284
|
example: ((I = e.value) == null ? void 0 : I.example) || ((A = (O = e.value) == null ? void 0 : O.items) == null ? void 0 : A.example)
|
|
281
|
-
}, null, 8, ["examples", "example"])) :
|
|
285
|
+
}, null, 8, ["examples", "example"])) : i("", !0)
|
|
282
286
|
]);
|
|
283
287
|
};
|
|
284
288
|
}
|
|
285
289
|
});
|
|
286
290
|
export {
|
|
287
|
-
|
|
291
|
+
ie as default
|
|
288
292
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
export type DiscriminatorMapping = NonNullable<OpenAPIV3_1.DiscriminatorObject['mapping']>;
|
|
3
|
+
export type DiscriminatorPropertyName = OpenAPIV3_1.DiscriminatorObject['propertyName'];
|
|
4
|
+
/** Get discriminator mapping from schema */
|
|
5
|
+
export declare function getDiscriminatorMapping(schema: OpenAPIV3_1.SchemaObject): DiscriminatorMapping | undefined;
|
|
2
6
|
/** Get discriminator property name from schema */
|
|
3
|
-
export declare function getDiscriminatorPropertyName(schema: OpenAPIV3_1.SchemaObject):
|
|
7
|
+
export declare function getDiscriminatorPropertyName(schema: OpenAPIV3_1.SchemaObject): DiscriminatorPropertyName | undefined;
|
|
8
|
+
/** Check if schema has a discriminator */
|
|
9
|
+
export declare function hasDiscriminator(schema: OpenAPIV3_1.SchemaObject): boolean;
|
|
10
|
+
/** Merge discriminator schemas */
|
|
11
|
+
export declare function mergeDiscriminatorSchemas(baseSchema: OpenAPIV3_1.SchemaObject, selectedType: string, schemas: Record<string, OpenAPIV3_1.SchemaObject>): OpenAPIV3_1.SchemaObject | undefined;
|
|
4
12
|
//# sourceMappingURL=schema-discriminator.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAA;AAE1F,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAA;AAEvF,4CAA4C;AAC5C,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,oBAAoB,GAAG,SAAS,CAM1G;AAED,kDAAkD;AAClD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,yBAAyB,GAAG,SAAS,CAEpH;AAED,0CAA0C;AAC1C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,OAAO,CAE1E;AAED,kCAAkC;AAClC,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,WAAW,CAAC,YAAY,EACpC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAChD,WAAW,CAAC,YAAY,GAAG,SAAS,CA0DtC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function c(r) {
|
|
2
|
+
var i;
|
|
3
|
+
if ((i = r.discriminator) != null && i.mapping)
|
|
4
|
+
return r.discriminator.mapping;
|
|
5
|
+
}
|
|
6
|
+
function m(r) {
|
|
7
|
+
var i;
|
|
8
|
+
return (i = r.discriminator) == null ? void 0 : i.propertyName;
|
|
9
|
+
}
|
|
10
|
+
function q(r, i, d) {
|
|
11
|
+
var s;
|
|
12
|
+
if (!((s = r.discriminator) != null && s.mapping) || !i)
|
|
13
|
+
return;
|
|
14
|
+
const u = r.discriminator.mapping[i];
|
|
15
|
+
if (!u)
|
|
16
|
+
return;
|
|
17
|
+
const o = u.split("/").pop();
|
|
18
|
+
if (!o || !d[o])
|
|
19
|
+
return;
|
|
20
|
+
const t = d[o];
|
|
21
|
+
if (t.allOf) {
|
|
22
|
+
const n = {
|
|
23
|
+
type: t.type,
|
|
24
|
+
properties: {},
|
|
25
|
+
required: []
|
|
26
|
+
}, f = {}, p = /* @__PURE__ */ new Set();
|
|
27
|
+
r.required && r.required.forEach((e) => p.add(e));
|
|
28
|
+
for (const e of t.allOf)
|
|
29
|
+
"properties" in e && Object.assign(f, e.properties), "required" in e && Array.isArray(e.required) && e.required.forEach((a) => p.add(a));
|
|
30
|
+
return n.properties = f, n.required = Array.from(p), n;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
type: t.type || r.type,
|
|
34
|
+
properties: {
|
|
35
|
+
...r.properties || {},
|
|
36
|
+
...t.properties || {}
|
|
37
|
+
},
|
|
38
|
+
required: [...r.required || [], ...t.required || []]
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
c as getDiscriminatorMapping,
|
|
43
|
+
m as getDiscriminatorPropertyName,
|
|
44
|
+
q as mergeDiscriminatorSchemas
|
|
45
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeaderTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionHeaderTag.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionHeaderTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionHeaderTag.vue"],"names":[],"mappings":"AAmBA,KAAK,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC;AASrD,iBAAS,cAAc;WA4CT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SectionHeaderTag.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1ac6c38"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|