@scalar/api-reference 1.25.113 → 1.25.115
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 +35 -0
- package/dist/browser/standalone.js +7272 -7231
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/components/Content/Content.vue2.js +65 -59
- 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/Introduction/Description.vue2.js +24 -24
- package/dist/components/Content/Introduction/Introduction.vue2.js +13 -13
- 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 +67 -56
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -0
- 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 +68 -66
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +2 -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 +101 -85
- package/dist/components/Content/Schema/helpers/formatExample.js +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +58 -58
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useRequestExample.js +1 -1
- package/dist/helpers/get-request.d.ts +1 -1
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +12 -12
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as Q, computed as y, openBlock as l, createElementBlock as t, normalizeClass as $, createVNode as
|
|
1
|
+
import { defineComponent as Q, computed as y, openBlock as l, createElementBlock as t, normalizeClass as $, createVNode as r, createSlots as W, withCtx as f, createTextVNode as b, toDisplayString as s, unref as i, createCommentVNode as n, createElementVNode as c, Fragment as p, renderList as d, createBlock as E } from "vue";
|
|
2
2
|
import { formatExample as X } from "./helpers/formatExample.js";
|
|
3
3
|
import { optimizeValueForDisplay as Y, discriminators as _ } from "./helpers/optimizeValueForDisplay.js";
|
|
4
4
|
import { Disclosure as x, DisclosurePanel as ee, DisclosureButton as le } from "@headlessui/vue";
|
|
5
|
-
import { ScalarMarkdown as
|
|
5
|
+
import { ScalarMarkdown as B, ScalarIcon as te } from "@scalar/components";
|
|
6
6
|
import g from "./Schema.vue.js";
|
|
7
7
|
import ae from "./SchemaPropertyHeading.vue.js";
|
|
8
8
|
const oe = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "property-description"
|
|
11
|
-
},
|
|
11
|
+
}, ne = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "property-description"
|
|
14
|
-
},
|
|
14
|
+
}, re = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "property-example custom-scroll"
|
|
17
|
-
},
|
|
17
|
+
}, se = { class: "property-example-value" }, ie = {
|
|
18
18
|
key: 3,
|
|
19
19
|
class: "property-example custom-scroll"
|
|
20
|
-
},
|
|
20
|
+
}, pe = { class: "property-example-label" }, ue = {
|
|
21
21
|
key: 4,
|
|
22
22
|
class: "property-enum"
|
|
23
23
|
}, de = {
|
|
@@ -48,10 +48,11 @@ const oe = {
|
|
|
48
48
|
compact: { type: Boolean, default: !1 },
|
|
49
49
|
description: {},
|
|
50
50
|
additional: { type: Boolean },
|
|
51
|
+
pattern: { type: Boolean },
|
|
51
52
|
withExamples: { type: Boolean, default: !0 }
|
|
52
53
|
},
|
|
53
54
|
setup(G) {
|
|
54
|
-
const h = G,
|
|
55
|
+
const h = G, S = {
|
|
55
56
|
integer: {
|
|
56
57
|
_default: "Integer numbers.",
|
|
57
58
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -64,19 +65,19 @@ const oe = {
|
|
|
64
65
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
65
66
|
binary: "binary data, used to describe files"
|
|
66
67
|
}
|
|
67
|
-
}, D = function(e,
|
|
68
|
-
return
|
|
68
|
+
}, D = function(e, a) {
|
|
69
|
+
return a != null && a.properties || a != null && a.additionalProperties || a != null && a.patternProperties ? null : e || (a == null ? void 0 : a.description) || null;
|
|
69
70
|
}, w = function(e) {
|
|
70
|
-
return !e || !
|
|
71
|
+
return !e || !S[e.type] ? null : S[e.type][e.format || "_default"];
|
|
71
72
|
}, m = function(e) {
|
|
72
|
-
var
|
|
73
|
-
return (e == null ? void 0 : e.enum) || ((
|
|
73
|
+
var a;
|
|
74
|
+
return (e == null ? void 0 : e.enum) || ((a = e == null ? void 0 : e.items) == null ? void 0 : a.enum) || [];
|
|
74
75
|
}, C = y(() => m(h.value).length > 9), P = y(() => C.value ? 5 : 9), J = y(
|
|
75
76
|
() => m(h.value).slice(0, P.value)
|
|
76
77
|
), K = y(
|
|
77
78
|
() => m(h.value).slice(P.value)
|
|
78
79
|
), k = y(() => Y(h.value));
|
|
79
|
-
return (e,
|
|
80
|
+
return (e, a) => {
|
|
80
81
|
var j, F, N, V, q, z, I, L, H, O, R, T, U;
|
|
81
82
|
return l(), t("div", {
|
|
82
83
|
class: $(["property", [
|
|
@@ -87,8 +88,9 @@ const oe = {
|
|
|
87
88
|
}
|
|
88
89
|
]])
|
|
89
90
|
}, [
|
|
90
|
-
|
|
91
|
+
r(ae, {
|
|
91
92
|
additional: e.additional,
|
|
93
|
+
pattern: e.pattern,
|
|
92
94
|
enum: m(e.value).length > 0,
|
|
93
95
|
required: e.required,
|
|
94
96
|
value: k.value
|
|
@@ -96,124 +98,124 @@ const oe = {
|
|
|
96
98
|
e.name ? {
|
|
97
99
|
name: "name",
|
|
98
100
|
fn: f(() => [
|
|
99
|
-
b(
|
|
101
|
+
b(s(e.name), 1)
|
|
100
102
|
]),
|
|
101
103
|
key: "0"
|
|
102
104
|
} : void 0,
|
|
103
105
|
(F = e.value) != null && F.example ? {
|
|
104
106
|
name: "example",
|
|
105
107
|
fn: f(() => [
|
|
106
|
-
b(" Example: " +
|
|
108
|
+
b(" Example: " + s(e.value.example), 1)
|
|
107
109
|
]),
|
|
108
110
|
key: "1"
|
|
109
111
|
} : void 0
|
|
110
|
-
]), 1032, ["additional", "enum", "required", "value"]),
|
|
112
|
+
]), 1032, ["additional", "pattern", "enum", "required", "value"]),
|
|
111
113
|
D(e.description, e.value) ? (l(), t("div", oe, [
|
|
112
|
-
|
|
114
|
+
r(i(B), {
|
|
113
115
|
value: D(e.description, e.value)
|
|
114
116
|
}, null, 8, ["value"])
|
|
115
|
-
])) : w(e.value) ? (l(), t("div",
|
|
116
|
-
|
|
117
|
+
])) : w(e.value) ? (l(), t("div", ne, [
|
|
118
|
+
r(i(B), {
|
|
117
119
|
value: w(e.value) || ""
|
|
118
120
|
}, null, 8, ["value"])
|
|
119
|
-
])) :
|
|
120
|
-
e.withExamples && ((N = e.value) != null && N.example || (q = (V = e.value) == null ? void 0 : V.items) != null && q.example) ? (l(), t("div",
|
|
121
|
-
|
|
122
|
-
c("code",
|
|
123
|
-
])) :
|
|
121
|
+
])) : n("", !0),
|
|
122
|
+
e.withExamples && ((N = e.value) != null && N.example || (q = (V = e.value) == null ? void 0 : V.items) != null && q.example) ? (l(), t("div", re, [
|
|
123
|
+
a[0] || (a[0] = c("span", { class: "property-example-label" }, "Example", -1)),
|
|
124
|
+
c("code", se, s(i(X)(e.value.example || ((z = e.value) == null ? void 0 : z.items.example))), 1)
|
|
125
|
+
])) : n("", !0),
|
|
124
126
|
(I = e.value) != null && I.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", ie, [
|
|
125
|
-
c("span",
|
|
126
|
-
(l(!0), t(
|
|
127
|
-
key:
|
|
127
|
+
c("span", pe, s(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
|
|
128
|
+
(l(!0), t(p, null, d(e.value.examples, (o, u) => (l(), t("code", {
|
|
129
|
+
key: u,
|
|
128
130
|
class: "property-example-value"
|
|
129
|
-
},
|
|
130
|
-
])) :
|
|
131
|
-
((L = m(e.value)) == null ? void 0 : L.length) > 0 ? (l(), t("div",
|
|
131
|
+
}, s(o), 1))), 128))
|
|
132
|
+
])) : n("", !0),
|
|
133
|
+
((L = m(e.value)) == null ? void 0 : L.length) > 0 ? (l(), t("div", ue, [
|
|
132
134
|
(H = e.value) != null && H["x-enumDescriptions"] ? (l(), t("div", de, [
|
|
133
|
-
(l(!0), t(
|
|
134
|
-
key:
|
|
135
|
+
(l(!0), t(p, null, d(m(e.value), (o) => (l(), t("div", {
|
|
136
|
+
key: o,
|
|
135
137
|
class: "property"
|
|
136
138
|
}, [
|
|
137
139
|
c("div", me, [
|
|
138
|
-
c("div", ce,
|
|
140
|
+
c("div", ce, s(o), 1)
|
|
139
141
|
]),
|
|
140
142
|
c("div", ve, [
|
|
141
|
-
|
|
142
|
-
value: e.value["x-enumDescriptions"][
|
|
143
|
+
r(i(B), {
|
|
144
|
+
value: e.value["x-enumDescriptions"][o]
|
|
143
145
|
}, null, 8, ["value"])
|
|
144
146
|
])
|
|
145
147
|
]))), 128))
|
|
146
148
|
])) : (l(), t("ul", ye, [
|
|
147
|
-
(l(!0), t(
|
|
148
|
-
key:
|
|
149
|
+
(l(!0), t(p, null, d(J.value, (o) => (l(), t("li", {
|
|
150
|
+
key: o,
|
|
149
151
|
class: "property-enum-value"
|
|
150
|
-
},
|
|
152
|
+
}, s(o), 1))), 128)),
|
|
151
153
|
C.value ? (l(), E(i(x), { key: 0 }, {
|
|
152
|
-
default: f(({ open:
|
|
153
|
-
|
|
154
|
+
default: f(({ open: o }) => [
|
|
155
|
+
r(i(ee), null, {
|
|
154
156
|
default: f(() => [
|
|
155
|
-
(l(!0), t(
|
|
156
|
-
key:
|
|
157
|
+
(l(!0), t(p, null, d(K.value, (u) => (l(), t("li", {
|
|
158
|
+
key: u,
|
|
157
159
|
class: "property-enum-value"
|
|
158
|
-
},
|
|
160
|
+
}, s(u), 1))), 128))
|
|
159
161
|
]),
|
|
160
162
|
_: 1
|
|
161
163
|
}),
|
|
162
|
-
|
|
164
|
+
r(i(le), { class: "enum-toggle-button" }, {
|
|
163
165
|
default: f(() => [
|
|
164
|
-
|
|
165
|
-
class: $(["enum-toggle-button-icon", { "enum-toggle-button-icon--open":
|
|
166
|
+
r(i(te), {
|
|
167
|
+
class: $(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
|
|
166
168
|
icon: "Add",
|
|
167
169
|
size: "sm"
|
|
168
170
|
}, null, 8, ["class"]),
|
|
169
|
-
b(" " +
|
|
171
|
+
b(" " + s(o ? "Hide values" : "Show all values"), 1)
|
|
170
172
|
]),
|
|
171
173
|
_: 2
|
|
172
174
|
}, 1024)
|
|
173
175
|
]),
|
|
174
176
|
_: 1
|
|
175
|
-
})) :
|
|
177
|
+
})) : n("", !0)
|
|
176
178
|
]))
|
|
177
|
-
])) :
|
|
179
|
+
])) : n("", !0),
|
|
178
180
|
((O = e.value) == null ? void 0 : O.type) === "object" && ((R = e.value) != null && R.properties || (T = e.value) != null && T.additionalProperties) ? (l(), t("div", fe, [
|
|
179
|
-
|
|
181
|
+
r(g, {
|
|
180
182
|
compact: e.compact,
|
|
181
183
|
level: e.level + 1,
|
|
182
184
|
value: e.value
|
|
183
185
|
}, null, 8, ["compact", "level", "value"])
|
|
184
|
-
])) :
|
|
185
|
-
(U = e.value) != null && U.items ? (l(), t(
|
|
186
|
+
])) : n("", !0),
|
|
187
|
+
(U = e.value) != null && U.items ? (l(), t(p, { key: 6 }, [
|
|
186
188
|
["object"].includes(e.value.items.type) ? (l(), t("div", he, [
|
|
187
|
-
|
|
189
|
+
r(g, {
|
|
188
190
|
compact: e.compact,
|
|
189
191
|
level: e.level + 1,
|
|
190
192
|
value: e.value.items
|
|
191
193
|
}, null, 8, ["compact", "level", "value"])
|
|
192
|
-
])) :
|
|
193
|
-
], 64)) :
|
|
194
|
-
(l(!0), t(
|
|
195
|
-
var
|
|
196
|
-
return l(), t(
|
|
197
|
-
(
|
|
198
|
-
(l(!0), t(
|
|
194
|
+
])) : n("", !0)
|
|
195
|
+
], 64)) : n("", !0),
|
|
196
|
+
(l(!0), t(p, null, d(i(_), (o) => {
|
|
197
|
+
var u, Z, A;
|
|
198
|
+
return l(), t(p, { key: o }, [
|
|
199
|
+
(u = k.value) != null && u[o] ? (l(), t("div", ge, [
|
|
200
|
+
(l(!0), t(p, null, d(k.value[o], (v) => {
|
|
199
201
|
var M;
|
|
200
202
|
return l(), E(g, {
|
|
201
203
|
key: v.id,
|
|
202
204
|
compact: e.compact,
|
|
203
205
|
level: e.level + 1,
|
|
204
|
-
noncollapsible: ((M = e.value) == null ? void 0 : M[
|
|
206
|
+
noncollapsible: ((M = e.value) == null ? void 0 : M[o].length) === 1,
|
|
205
207
|
value: v
|
|
206
208
|
}, null, 8, ["compact", "level", "noncollapsible", "value"]);
|
|
207
209
|
}), 128))
|
|
208
|
-
])) :
|
|
209
|
-
(A = (Z = e.value) == null ? void 0 : Z.items) != null && A[
|
|
210
|
-
(l(!0), t(
|
|
210
|
+
])) : n("", !0),
|
|
211
|
+
(A = (Z = e.value) == null ? void 0 : Z.items) != null && A[o] && e.level < 3 ? (l(), t("div", ke, [
|
|
212
|
+
(l(!0), t(p, null, d(e.value.items[o], (v) => (l(), E(g, {
|
|
211
213
|
key: v.id,
|
|
212
214
|
compact: e.compact,
|
|
213
215
|
level: e.level + 1,
|
|
214
216
|
value: v
|
|
215
217
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
216
|
-
])) :
|
|
218
|
+
])) : n("", !0)
|
|
217
219
|
], 64);
|
|
218
220
|
}), 128))
|
|
219
221
|
], 2);
|
|
@@ -3,11 +3,13 @@ type __VLS_Props = {
|
|
|
3
3
|
enum?: boolean;
|
|
4
4
|
required?: boolean;
|
|
5
5
|
additional?: boolean;
|
|
6
|
+
pattern?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare function __VLS_template(): {
|
|
8
9
|
attrs: Partial<{}>;
|
|
9
10
|
slots: {
|
|
10
11
|
name?(_: {}): any;
|
|
12
|
+
name?(_: {}): any;
|
|
11
13
|
};
|
|
12
14
|
refs: {};
|
|
13
15
|
rootEl: HTMLDivElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAoOA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AA0BJ,iBAAS,cAAc;WA4ST,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cA5VN,OAAO;wFAoWpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,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 "./SchemaPropertyHeading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-dd95f4d7"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,209 +1,225 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, openBlock as u, createElementBlock as n, renderSlot as A, Fragment as m, createTextVNode as l, createCommentVNode as r, toDisplayString as i, createVNode as v, unref as f, withCtx as t, createBlock as d, renderList as V } from "vue";
|
|
2
2
|
import o from "./SchemaPropertyDetail.vue.js";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import k from "../../Badge/Badge.vue.js";
|
|
4
|
+
const $ = { class: "property-heading" }, C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "property-name"
|
|
7
|
-
},
|
|
7
|
+
}, D = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "property-additional"
|
|
10
10
|
}, j = {
|
|
11
11
|
key: 2,
|
|
12
|
-
class: "property-
|
|
12
|
+
class: "property-pattern"
|
|
13
13
|
}, E = {
|
|
14
14
|
key: 3,
|
|
15
|
-
class: "property-
|
|
15
|
+
class: "property-deprecated"
|
|
16
16
|
}, F = {
|
|
17
|
-
key:
|
|
18
|
-
class: "property-
|
|
17
|
+
key: 4,
|
|
18
|
+
class: "property-const"
|
|
19
19
|
}, H = {
|
|
20
20
|
key: 7,
|
|
21
|
-
class: "property-
|
|
21
|
+
class: "property-write-only"
|
|
22
22
|
}, T = {
|
|
23
23
|
key: 8,
|
|
24
|
+
class: "property-read-only"
|
|
25
|
+
}, z = {
|
|
26
|
+
key: 9,
|
|
24
27
|
class: "property-required"
|
|
25
|
-
},
|
|
28
|
+
}, R = /* @__PURE__ */ S({
|
|
26
29
|
__name: "SchemaPropertyHeading",
|
|
27
30
|
props: {
|
|
28
31
|
value: {},
|
|
29
32
|
enum: { type: Boolean },
|
|
30
33
|
required: { type: Boolean, default: !1 },
|
|
31
|
-
additional: { type: Boolean }
|
|
34
|
+
additional: { type: Boolean },
|
|
35
|
+
pattern: { type: Boolean }
|
|
32
36
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
37
|
+
setup(G) {
|
|
38
|
+
const M = ["oneOf", "anyOf", "allOf", "not"], P = (e) => Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : e == null ? void 0 : e.default;
|
|
35
39
|
return (e, a) => {
|
|
36
|
-
var
|
|
37
|
-
return u(), n("div",
|
|
38
|
-
e.$slots.name ? (u(), n("div",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
var g, B, q, I, L, N, O, b;
|
|
41
|
+
return u(), n("div", $, [
|
|
42
|
+
e.$slots.name ? (u(), n("div", C, [
|
|
43
|
+
e.pattern ? (u(), n(m, { key: 1 }, [
|
|
44
|
+
a[0] || (a[0] = l("/")),
|
|
45
|
+
A(e.$slots, "name", {}, void 0, !0),
|
|
46
|
+
a[1] || (a[1] = l("/"))
|
|
47
|
+
], 64)) : A(e.$slots, "name", { key: 0 }, void 0, !0)
|
|
48
|
+
])) : r("", !0),
|
|
49
|
+
e.additional ? (u(), n("div", D, [
|
|
50
|
+
(g = e.value) != null && g["x-additionalPropertiesName"] ? (u(), n(m, { key: 0 }, [
|
|
43
51
|
l(i(e.value["x-additionalPropertiesName"]), 1)
|
|
44
|
-
], 64)) : (u(), n(
|
|
52
|
+
], 64)) : (u(), n(m, { key: 1 }, [
|
|
45
53
|
l("additional properties")
|
|
46
54
|
], 64))
|
|
47
|
-
])) :
|
|
48
|
-
|
|
49
|
-
v(
|
|
50
|
-
default:
|
|
55
|
+
])) : r("", !0),
|
|
56
|
+
e.pattern ? (u(), n("div", j, [
|
|
57
|
+
v(f(k), null, {
|
|
58
|
+
default: t(() => a[2] || (a[2] = [
|
|
59
|
+
l("pattern")
|
|
60
|
+
])),
|
|
61
|
+
_: 1
|
|
62
|
+
})
|
|
63
|
+
])) : r("", !0),
|
|
64
|
+
(B = e.value) != null && B.deprecated ? (u(), n("div", E, [
|
|
65
|
+
v(f(k), null, {
|
|
66
|
+
default: t(() => a[3] || (a[3] = [
|
|
51
67
|
l("deprecated")
|
|
52
68
|
])),
|
|
53
69
|
_: 1
|
|
54
70
|
})
|
|
55
|
-
])) :
|
|
56
|
-
(
|
|
71
|
+
])) : r("", !0),
|
|
72
|
+
(q = e.value) != null && q.const || (I = e.value) != null && I.enum && e.value.enum.length === 1 ? (u(), n("div", F, [
|
|
57
73
|
v(o, { truncate: "" }, {
|
|
58
|
-
prefix:
|
|
74
|
+
prefix: t(() => a[4] || (a[4] = [
|
|
59
75
|
l("const:")
|
|
60
76
|
])),
|
|
61
|
-
default:
|
|
77
|
+
default: t(() => [
|
|
62
78
|
l(" " + i(e.value.const ?? e.value.enum[0]), 1)
|
|
63
79
|
]),
|
|
64
80
|
_: 1
|
|
65
81
|
})
|
|
66
|
-
])) : (
|
|
82
|
+
])) : (L = e.value) != null && L.type ? (u(), n(m, { key: 5 }, [
|
|
67
83
|
v(o, null, {
|
|
68
|
-
default:
|
|
69
|
-
var
|
|
84
|
+
default: t(() => {
|
|
85
|
+
var s, p, y;
|
|
70
86
|
return [
|
|
71
|
-
(
|
|
87
|
+
(p = (s = e.value) == null ? void 0 : s.items) != null && p.type ? (u(), n(m, { key: 0 }, [
|
|
72
88
|
l(i(e.value.type) + " " + i(e.value.items.type) + "[] ", 1)
|
|
73
|
-
], 64)) : (u(), n(
|
|
74
|
-
l(i(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + i((
|
|
89
|
+
], 64)) : (u(), n(m, { key: 1 }, [
|
|
90
|
+
l(i(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + i((y = e.value) != null && y.nullable ? " | nullable" : ""), 1)
|
|
75
91
|
], 64)),
|
|
76
|
-
e.value.minItems || e.value.maxItems ? (u(), n(
|
|
92
|
+
e.value.minItems || e.value.maxItems ? (u(), n(m, { key: 2 }, [
|
|
77
93
|
l(i(e.value.minItems) + "…" + i(e.value.maxItems), 1)
|
|
78
|
-
], 64)) :
|
|
94
|
+
], 64)) : r("", !0)
|
|
79
95
|
];
|
|
80
96
|
}),
|
|
81
97
|
_: 1
|
|
82
98
|
}),
|
|
83
99
|
e.value.minLength ? (u(), d(o, { key: 0 }, {
|
|
84
|
-
prefix:
|
|
100
|
+
prefix: t(() => a[5] || (a[5] = [
|
|
85
101
|
l("min:")
|
|
86
102
|
])),
|
|
87
|
-
default:
|
|
103
|
+
default: t(() => [
|
|
88
104
|
l(" " + i(e.value.minLength), 1)
|
|
89
105
|
]),
|
|
90
106
|
_: 1
|
|
91
|
-
})) :
|
|
107
|
+
})) : r("", !0),
|
|
92
108
|
e.value.maxLength ? (u(), d(o, { key: 1 }, {
|
|
93
|
-
prefix:
|
|
109
|
+
prefix: t(() => a[6] || (a[6] = [
|
|
94
110
|
l("max:")
|
|
95
111
|
])),
|
|
96
|
-
default:
|
|
112
|
+
default: t(() => [
|
|
97
113
|
l(" " + i(e.value.maxLength), 1)
|
|
98
114
|
]),
|
|
99
115
|
_: 1
|
|
100
|
-
})) :
|
|
116
|
+
})) : r("", !0),
|
|
101
117
|
e.value.uniqueItems ? (u(), d(o, { key: 2 }, {
|
|
102
|
-
default:
|
|
118
|
+
default: t(() => a[7] || (a[7] = [
|
|
103
119
|
l(" unique! ")
|
|
104
120
|
])),
|
|
105
121
|
_: 1
|
|
106
|
-
})) :
|
|
122
|
+
})) : r("", !0),
|
|
107
123
|
e.value.format ? (u(), d(o, { key: 3 }, {
|
|
108
|
-
default:
|
|
124
|
+
default: t(() => [
|
|
109
125
|
l(i(e.value.format), 1)
|
|
110
126
|
]),
|
|
111
127
|
_: 1
|
|
112
|
-
})) :
|
|
128
|
+
})) : r("", !0),
|
|
113
129
|
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (u(), d(o, { key: 4 }, {
|
|
114
|
-
prefix:
|
|
130
|
+
prefix: t(() => a[8] || (a[8] = [
|
|
115
131
|
l("greater than:")
|
|
116
132
|
])),
|
|
117
|
-
default:
|
|
133
|
+
default: t(() => [
|
|
118
134
|
l(" " + i(e.value.minimum), 1)
|
|
119
135
|
]),
|
|
120
136
|
_: 1
|
|
121
|
-
})) :
|
|
137
|
+
})) : r("", !0),
|
|
122
138
|
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (u(), d(o, { key: 5 }, {
|
|
123
|
-
prefix:
|
|
139
|
+
prefix: t(() => a[9] || (a[9] = [
|
|
124
140
|
l("min:")
|
|
125
141
|
])),
|
|
126
|
-
default:
|
|
142
|
+
default: t(() => [
|
|
127
143
|
l(" " + i(e.value.minimum), 1)
|
|
128
144
|
]),
|
|
129
145
|
_: 1
|
|
130
|
-
})) :
|
|
146
|
+
})) : r("", !0),
|
|
131
147
|
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (u(), d(o, { key: 6 }, {
|
|
132
|
-
prefix:
|
|
148
|
+
prefix: t(() => a[10] || (a[10] = [
|
|
133
149
|
l("less than:")
|
|
134
150
|
])),
|
|
135
|
-
default:
|
|
151
|
+
default: t(() => [
|
|
136
152
|
l(" " + i(e.value.maximum), 1)
|
|
137
153
|
]),
|
|
138
154
|
_: 1
|
|
139
|
-
})) :
|
|
155
|
+
})) : r("", !0),
|
|
140
156
|
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (u(), d(o, { key: 7 }, {
|
|
141
|
-
prefix:
|
|
157
|
+
prefix: t(() => a[11] || (a[11] = [
|
|
142
158
|
l("max:")
|
|
143
159
|
])),
|
|
144
|
-
default:
|
|
160
|
+
default: t(() => [
|
|
145
161
|
l(" " + i(e.value.maximum), 1)
|
|
146
162
|
]),
|
|
147
163
|
_: 1
|
|
148
|
-
})) :
|
|
164
|
+
})) : r("", !0),
|
|
149
165
|
e.value.pattern ? (u(), d(o, {
|
|
150
166
|
key: 8,
|
|
151
167
|
code: "",
|
|
152
168
|
truncate: ""
|
|
153
169
|
}, {
|
|
154
|
-
default:
|
|
170
|
+
default: t(() => [
|
|
155
171
|
l(i(e.value.pattern), 1)
|
|
156
172
|
]),
|
|
157
173
|
_: 1
|
|
158
|
-
})) :
|
|
174
|
+
})) : r("", !0),
|
|
159
175
|
e.$props.enum ? (u(), d(o, { key: 9 }, {
|
|
160
|
-
default:
|
|
176
|
+
default: t(() => a[12] || (a[12] = [
|
|
161
177
|
l("enum")
|
|
162
178
|
])),
|
|
163
179
|
_: 1
|
|
164
|
-
})) :
|
|
180
|
+
})) : r("", !0),
|
|
165
181
|
e.value.default !== void 0 ? (u(), d(o, {
|
|
166
182
|
key: 10,
|
|
167
183
|
truncate: ""
|
|
168
184
|
}, {
|
|
169
|
-
prefix:
|
|
185
|
+
prefix: t(() => a[13] || (a[13] = [
|
|
170
186
|
l("default:")
|
|
171
187
|
])),
|
|
172
|
-
default:
|
|
173
|
-
l(" " + i(
|
|
188
|
+
default: t(() => [
|
|
189
|
+
l(" " + i(P(e.value)), 1)
|
|
174
190
|
]),
|
|
175
191
|
_: 1
|
|
176
|
-
})) :
|
|
177
|
-
], 64)) : (u(), n(
|
|
178
|
-
((
|
|
179
|
-
default:
|
|
192
|
+
})) : r("", !0)
|
|
193
|
+
], 64)) : (u(), n(m, { key: 6 }, [
|
|
194
|
+
((N = e.value) == null ? void 0 : N.nullable) === !0 ? (u(), d(o, { key: 0 }, {
|
|
195
|
+
default: t(() => a[14] || (a[14] = [
|
|
180
196
|
l(" nullable ")
|
|
181
197
|
])),
|
|
182
198
|
_: 1
|
|
183
|
-
})) :
|
|
199
|
+
})) : r("", !0)
|
|
184
200
|
], 64)),
|
|
185
|
-
(
|
|
186
|
-
(u(!0), n(
|
|
187
|
-
(
|
|
188
|
-
var
|
|
189
|
-
return ((
|
|
201
|
+
(O = e.value) != null && O.writeOnly ? (u(), n("div", H, " write-only ")) : (b = e.value) != null && b.readOnly ? (u(), n("div", T, " read-only ")) : r("", !0),
|
|
202
|
+
(u(!0), n(m, null, V(M.filter(
|
|
203
|
+
(s) => {
|
|
204
|
+
var p, y, w;
|
|
205
|
+
return ((p = e.value) == null ? void 0 : p[s]) || ((w = (y = e.value) == null ? void 0 : y.items) == null ? void 0 : w[s]);
|
|
190
206
|
}
|
|
191
|
-
), (
|
|
192
|
-
var
|
|
193
|
-
return u(), n(
|
|
194
|
-
((
|
|
195
|
-
default:
|
|
196
|
-
l(i(
|
|
207
|
+
), (s) => {
|
|
208
|
+
var p, y;
|
|
209
|
+
return u(), n(m, { key: s }, [
|
|
210
|
+
((y = (p = e.value) == null ? void 0 : p[s]) == null ? void 0 : y.length) > 1 ? (u(), d(f(k), { key: 0 }, {
|
|
211
|
+
default: t(() => [
|
|
212
|
+
l(i(s), 1)
|
|
197
213
|
]),
|
|
198
214
|
_: 2
|
|
199
|
-
}, 1024)) :
|
|
215
|
+
}, 1024)) : r("", !0)
|
|
200
216
|
], 64);
|
|
201
217
|
}), 128)),
|
|
202
|
-
e.required ? (u(), n("div",
|
|
218
|
+
e.required ? (u(), n("div", z, " required ")) : r("", !0)
|
|
203
219
|
]);
|
|
204
220
|
};
|
|
205
221
|
}
|
|
206
222
|
});
|
|
207
223
|
export {
|
|
208
|
-
|
|
224
|
+
R as default
|
|
209
225
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function t(r) {
|
|
2
|
-
return Array.isArray(r) ? `[${r.map((n) => typeof n == "string"
|
|
2
|
+
return Array.isArray(r) ? `[${r.map((n) => typeof n == "string" ? `"${n.toString().trim()}"` : typeof n == "object" ? JSON.stringify(n) : n === void 0 ? "undefined" : n === null ? "null" : n).join(", ")}]` : typeof r == "object" ? JSON.stringify(r) : r === null ? "null" : r === void 0 ? "undefined" : typeof r == "string" ? r.trim() : r.toString().trim();
|
|
3
3
|
}
|
|
4
4
|
export {
|
|
5
5
|
t as formatExample
|