@scalar/api-reference 1.28.9 → 1.28.11
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 +40 -0
- package/dist/browser/standalone.js +5570 -5486
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +13 -13
- 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/Schema/Schema.vue.d.ts +2 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +4 -4
- package/dist/components/Content/Schema/Schema.vue2.js +78 -54
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +96 -114
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +8 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +71 -0
- 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 +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +139 -130
- package/dist/features/ApiClientModal/useApiClient.d.ts +76 -334
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -85
- 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 +65 -28
- package/dist/features/Search/useSearchIndex.js +72 -72
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.d.ts +5 -1
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +49 -48
- package/dist/hooks/useNavState.d.ts +6 -4
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +34 -37
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +12 -12
|
@@ -1,228 +1,237 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as F, openBlock as r, createElementBlock as i, normalizeClass as O, renderSlot as V, Fragment as d, createTextVNode as a, createCommentVNode as u, toDisplayString as n, createVNode as s, unref as y, withCtx as t, createBlock as m } from "vue";
|
|
2
|
+
import { discriminators as z } from "./helpers/optimizeValueForDisplay.js";
|
|
3
|
+
import H from "./SchemaPropertyExamples.vue.js";
|
|
4
|
+
import v from "../../ScreenReader.vue.js";
|
|
3
5
|
import o from "./SchemaPropertyDetail.vue.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
+
import $ from "../../Badge/Badge.vue.js";
|
|
7
|
+
const R = { class: "property-heading" }, G = {
|
|
6
8
|
key: 1,
|
|
7
9
|
class: "property-additional"
|
|
8
|
-
},
|
|
10
|
+
}, J = {
|
|
9
11
|
key: 2,
|
|
10
12
|
class: "property-pattern"
|
|
11
|
-
},
|
|
13
|
+
}, K = {
|
|
12
14
|
key: 3,
|
|
13
15
|
class: "property-deprecated"
|
|
14
|
-
},
|
|
16
|
+
}, Q = {
|
|
15
17
|
key: 4,
|
|
16
18
|
class: "property-const"
|
|
17
|
-
},
|
|
19
|
+
}, U = {
|
|
18
20
|
key: 7,
|
|
19
21
|
class: "property-write-only"
|
|
20
|
-
},
|
|
22
|
+
}, W = {
|
|
21
23
|
key: 8,
|
|
22
24
|
class: "property-read-only"
|
|
23
|
-
},
|
|
25
|
+
}, X = {
|
|
24
26
|
key: 9,
|
|
25
27
|
class: "property-required"
|
|
26
|
-
},
|
|
28
|
+
}, ee = /* @__PURE__ */ F({
|
|
27
29
|
__name: "SchemaPropertyHeading",
|
|
28
30
|
props: {
|
|
29
31
|
value: {},
|
|
30
32
|
enum: { type: Boolean },
|
|
31
33
|
required: { type: Boolean, default: !1 },
|
|
32
34
|
additional: { type: Boolean },
|
|
33
|
-
pattern: { type: Boolean }
|
|
35
|
+
pattern: { type: Boolean },
|
|
36
|
+
withExamples: { type: Boolean, default: !0 }
|
|
34
37
|
},
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
38
|
+
setup(j) {
|
|
39
|
+
const p = j, D = z.find((e) => !p.value || typeof p.value != "object" ? !1 : e in p.value || p.value.items && typeof p.value.items == "object" && e in p.value.items), T = (e) => Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : e == null ? void 0 : e.default;
|
|
37
40
|
return (e, l) => {
|
|
38
|
-
var
|
|
39
|
-
return r(),
|
|
40
|
-
e.$slots.name ? (r(),
|
|
41
|
+
var f, k, g, B, b, q, w, P, S, I, N, A, C;
|
|
42
|
+
return r(), i("div", R, [
|
|
43
|
+
e.$slots.name ? (r(), i("div", {
|
|
41
44
|
key: 0,
|
|
42
|
-
class:
|
|
45
|
+
class: O(["property-name", { deprecated: (f = e.value) == null ? void 0 : f.deprecated }])
|
|
43
46
|
}, [
|
|
44
|
-
e.pattern ? (r(),
|
|
45
|
-
l[0] || (l[0] =
|
|
46
|
-
|
|
47
|
-
l[1] || (l[1] =
|
|
48
|
-
], 64)) :
|
|
49
|
-
], 2)) :
|
|
50
|
-
e.additional ? (r(),
|
|
51
|
-
(
|
|
52
|
-
|
|
53
|
-
], 64)) : (r(),
|
|
54
|
-
|
|
47
|
+
e.pattern ? (r(), i(d, { key: 1 }, [
|
|
48
|
+
l[0] || (l[0] = a("/")),
|
|
49
|
+
V(e.$slots, "name", {}, void 0, !0),
|
|
50
|
+
l[1] || (l[1] = a("/"))
|
|
51
|
+
], 64)) : V(e.$slots, "name", { key: 0 }, void 0, !0)
|
|
52
|
+
], 2)) : u("", !0),
|
|
53
|
+
e.additional ? (r(), i("div", G, [
|
|
54
|
+
(k = e.value) != null && k["x-additionalPropertiesName"] ? (r(), i(d, { key: 0 }, [
|
|
55
|
+
a(n(e.value["x-additionalPropertiesName"]), 1)
|
|
56
|
+
], 64)) : (r(), i(d, { key: 1 }, [
|
|
57
|
+
a("additional properties")
|
|
55
58
|
], 64))
|
|
56
|
-
])) :
|
|
57
|
-
e.pattern ? (r(),
|
|
58
|
-
s(
|
|
59
|
-
default:
|
|
60
|
-
|
|
59
|
+
])) : u("", !0),
|
|
60
|
+
e.pattern ? (r(), i("div", J, [
|
|
61
|
+
s(y($), null, {
|
|
62
|
+
default: t(() => l[2] || (l[2] = [
|
|
63
|
+
a("pattern")
|
|
61
64
|
])),
|
|
62
65
|
_: 1
|
|
63
66
|
})
|
|
64
|
-
])) :
|
|
65
|
-
(
|
|
66
|
-
s(
|
|
67
|
-
default:
|
|
68
|
-
|
|
67
|
+
])) : u("", !0),
|
|
68
|
+
(g = e.value) != null && g.deprecated ? (r(), i("div", K, [
|
|
69
|
+
s(y($), null, {
|
|
70
|
+
default: t(() => l[3] || (l[3] = [
|
|
71
|
+
a("deprecated")
|
|
69
72
|
])),
|
|
70
73
|
_: 1
|
|
71
74
|
})
|
|
72
|
-
])) :
|
|
73
|
-
(
|
|
75
|
+
])) : u("", !0),
|
|
76
|
+
(B = e.value) != null && B.const || (b = e.value) != null && b.enum && e.value.enum.length === 1 ? (r(), i("div", Q, [
|
|
74
77
|
s(o, { truncate: "" }, {
|
|
75
|
-
prefix:
|
|
76
|
-
|
|
78
|
+
prefix: t(() => l[4] || (l[4] = [
|
|
79
|
+
a("const:")
|
|
77
80
|
])),
|
|
78
|
-
default:
|
|
79
|
-
|
|
81
|
+
default: t(() => [
|
|
82
|
+
a(" " + n(e.value.const ?? e.value.enum[0]), 1)
|
|
80
83
|
]),
|
|
81
84
|
_: 1
|
|
82
85
|
})
|
|
83
|
-
])) : (
|
|
86
|
+
])) : (q = e.value) != null && q.type ? (r(), i(d, { key: 5 }, [
|
|
84
87
|
s(o, null, {
|
|
85
|
-
default:
|
|
86
|
-
var
|
|
88
|
+
default: t(() => {
|
|
89
|
+
var E, L, M;
|
|
87
90
|
return [
|
|
88
|
-
s(
|
|
89
|
-
default:
|
|
90
|
-
|
|
91
|
+
s(v, null, {
|
|
92
|
+
default: t(() => l[5] || (l[5] = [
|
|
93
|
+
a("Type:")
|
|
91
94
|
])),
|
|
92
95
|
_: 1
|
|
93
96
|
}),
|
|
94
|
-
(
|
|
95
|
-
|
|
96
|
-
], 64)) : (r(),
|
|
97
|
-
|
|
97
|
+
(L = (E = e.value) == null ? void 0 : E.items) != null && L.type ? (r(), i(d, { key: 0 }, [
|
|
98
|
+
a(n(e.value.type) + " " + n(e.value.items.type) + "[] ", 1)
|
|
99
|
+
], 64)) : (r(), i(d, { key: 1 }, [
|
|
100
|
+
a(n(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + n((M = e.value) != null && M.nullable ? " | nullable" : ""), 1)
|
|
98
101
|
], 64)),
|
|
99
|
-
e.value.minItems || e.value.maxItems ? (r(),
|
|
100
|
-
|
|
101
|
-
], 64)) :
|
|
102
|
+
e.value.minItems || e.value.maxItems ? (r(), i(d, { key: 2 }, [
|
|
103
|
+
a(n(e.value.minItems) + "…" + n(e.value.maxItems), 1)
|
|
104
|
+
], 64)) : u("", !0)
|
|
102
105
|
];
|
|
103
106
|
}),
|
|
104
107
|
_: 1
|
|
105
108
|
}),
|
|
106
|
-
e.value.minLength ? (r(),
|
|
107
|
-
prefix:
|
|
108
|
-
|
|
109
|
+
e.value.minLength ? (r(), m(o, { key: 0 }, {
|
|
110
|
+
prefix: t(() => l[6] || (l[6] = [
|
|
111
|
+
a("min:")
|
|
109
112
|
])),
|
|
110
|
-
default:
|
|
111
|
-
|
|
113
|
+
default: t(() => [
|
|
114
|
+
a(" " + n(e.value.minLength), 1)
|
|
112
115
|
]),
|
|
113
116
|
_: 1
|
|
114
|
-
})) :
|
|
115
|
-
e.value.maxLength ? (r(),
|
|
116
|
-
prefix:
|
|
117
|
-
|
|
117
|
+
})) : u("", !0),
|
|
118
|
+
e.value.maxLength ? (r(), m(o, { key: 1 }, {
|
|
119
|
+
prefix: t(() => l[7] || (l[7] = [
|
|
120
|
+
a("max:")
|
|
118
121
|
])),
|
|
119
|
-
default:
|
|
120
|
-
|
|
122
|
+
default: t(() => [
|
|
123
|
+
a(" " + n(e.value.maxLength), 1)
|
|
121
124
|
]),
|
|
122
125
|
_: 1
|
|
123
|
-
})) :
|
|
124
|
-
e.value.uniqueItems ? (r(),
|
|
125
|
-
default:
|
|
126
|
-
|
|
126
|
+
})) : u("", !0),
|
|
127
|
+
e.value.uniqueItems ? (r(), m(o, { key: 2 }, {
|
|
128
|
+
default: t(() => l[8] || (l[8] = [
|
|
129
|
+
a(" unique! ")
|
|
127
130
|
])),
|
|
128
131
|
_: 1
|
|
129
|
-
})) :
|
|
130
|
-
e.value.format ? (r(),
|
|
131
|
-
default:
|
|
132
|
-
s(
|
|
133
|
-
default:
|
|
134
|
-
|
|
132
|
+
})) : u("", !0),
|
|
133
|
+
e.value.format ? (r(), m(o, { key: 3 }, {
|
|
134
|
+
default: t(() => [
|
|
135
|
+
s(v, null, {
|
|
136
|
+
default: t(() => l[9] || (l[9] = [
|
|
137
|
+
a("Format:")
|
|
135
138
|
])),
|
|
136
139
|
_: 1
|
|
137
140
|
}),
|
|
138
|
-
|
|
141
|
+
a(" " + n(e.value.format), 1)
|
|
139
142
|
]),
|
|
140
143
|
_: 1
|
|
141
|
-
})) :
|
|
142
|
-
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (r(),
|
|
143
|
-
prefix:
|
|
144
|
-
|
|
144
|
+
})) : u("", !0),
|
|
145
|
+
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (r(), m(o, { key: 4 }, {
|
|
146
|
+
prefix: t(() => l[10] || (l[10] = [
|
|
147
|
+
a("greater than:")
|
|
145
148
|
])),
|
|
146
|
-
default:
|
|
147
|
-
|
|
149
|
+
default: t(() => [
|
|
150
|
+
a(" " + n(e.value.minimum), 1)
|
|
148
151
|
]),
|
|
149
152
|
_: 1
|
|
150
|
-
})) :
|
|
151
|
-
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (r(),
|
|
152
|
-
prefix:
|
|
153
|
-
|
|
153
|
+
})) : u("", !0),
|
|
154
|
+
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (r(), m(o, { key: 5 }, {
|
|
155
|
+
prefix: t(() => l[11] || (l[11] = [
|
|
156
|
+
a("min:")
|
|
154
157
|
])),
|
|
155
|
-
default:
|
|
156
|
-
|
|
158
|
+
default: t(() => [
|
|
159
|
+
a(" " + n(e.value.minimum), 1)
|
|
157
160
|
]),
|
|
158
161
|
_: 1
|
|
159
|
-
})) :
|
|
160
|
-
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (r(),
|
|
161
|
-
prefix:
|
|
162
|
-
|
|
162
|
+
})) : u("", !0),
|
|
163
|
+
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (r(), m(o, { key: 6 }, {
|
|
164
|
+
prefix: t(() => l[12] || (l[12] = [
|
|
165
|
+
a("less than:")
|
|
163
166
|
])),
|
|
164
|
-
default:
|
|
165
|
-
|
|
167
|
+
default: t(() => [
|
|
168
|
+
a(" " + n(e.value.maximum), 1)
|
|
166
169
|
]),
|
|
167
170
|
_: 1
|
|
168
|
-
})) :
|
|
169
|
-
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (r(),
|
|
170
|
-
prefix:
|
|
171
|
-
|
|
171
|
+
})) : u("", !0),
|
|
172
|
+
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (r(), m(o, { key: 7 }, {
|
|
173
|
+
prefix: t(() => l[13] || (l[13] = [
|
|
174
|
+
a("max:")
|
|
172
175
|
])),
|
|
173
|
-
default:
|
|
174
|
-
|
|
176
|
+
default: t(() => [
|
|
177
|
+
a(" " + n(e.value.maximum), 1)
|
|
175
178
|
]),
|
|
176
179
|
_: 1
|
|
177
|
-
})) :
|
|
178
|
-
e.value.pattern ? (r(),
|
|
180
|
+
})) : u("", !0),
|
|
181
|
+
e.value.pattern ? (r(), m(o, {
|
|
179
182
|
key: 8,
|
|
180
183
|
code: "",
|
|
181
184
|
truncate: ""
|
|
182
185
|
}, {
|
|
183
|
-
default:
|
|
184
|
-
s(
|
|
185
|
-
default:
|
|
186
|
-
|
|
186
|
+
default: t(() => [
|
|
187
|
+
s(v, null, {
|
|
188
|
+
default: t(() => l[14] || (l[14] = [
|
|
189
|
+
a("Pattern:")
|
|
187
190
|
])),
|
|
188
191
|
_: 1
|
|
189
192
|
}),
|
|
190
|
-
|
|
193
|
+
a(" " + n(e.value.pattern), 1)
|
|
191
194
|
]),
|
|
192
195
|
_: 1
|
|
193
|
-
})) :
|
|
194
|
-
e.$props.enum ? (r(),
|
|
195
|
-
default:
|
|
196
|
-
|
|
196
|
+
})) : u("", !0),
|
|
197
|
+
e.$props.enum ? (r(), m(o, { key: 9 }, {
|
|
198
|
+
default: t(() => l[15] || (l[15] = [
|
|
199
|
+
a("enum")
|
|
197
200
|
])),
|
|
198
201
|
_: 1
|
|
199
|
-
})) :
|
|
200
|
-
e.value.default !== void 0 ? (r(),
|
|
202
|
+
})) : u("", !0),
|
|
203
|
+
e.value.default !== void 0 ? (r(), m(o, {
|
|
201
204
|
key: 10,
|
|
202
205
|
truncate: ""
|
|
203
206
|
}, {
|
|
204
|
-
prefix:
|
|
205
|
-
|
|
207
|
+
prefix: t(() => l[16] || (l[16] = [
|
|
208
|
+
a("default:")
|
|
206
209
|
])),
|
|
207
|
-
default:
|
|
208
|
-
|
|
210
|
+
default: t(() => [
|
|
211
|
+
a(" " + n(T(e.value)), 1)
|
|
209
212
|
]),
|
|
210
213
|
_: 1
|
|
211
|
-
})) :
|
|
212
|
-
], 64)) : (r(),
|
|
213
|
-
((
|
|
214
|
-
default:
|
|
215
|
-
|
|
214
|
+
})) : u("", !0)
|
|
215
|
+
], 64)) : (r(), i(d, { key: 6 }, [
|
|
216
|
+
((w = e.value) == null ? void 0 : w.nullable) === !0 ? (r(), m(o, { key: 0 }, {
|
|
217
|
+
default: t(() => l[17] || (l[17] = [
|
|
218
|
+
a(" nullable ")
|
|
216
219
|
])),
|
|
217
220
|
_: 1
|
|
218
|
-
})) :
|
|
221
|
+
})) : u("", !0)
|
|
219
222
|
], 64)),
|
|
220
|
-
(
|
|
221
|
-
e.required ? (r(),
|
|
223
|
+
(P = e.value) != null && P.writeOnly ? (r(), i("div", U, " write-only ")) : (S = e.value) != null && S.readOnly ? (r(), i("div", W, " read-only ")) : u("", !0),
|
|
224
|
+
e.required ? (r(), i("div", X, " required ")) : u("", !0),
|
|
225
|
+
e.withExamples ? (r(), m(H, {
|
|
226
|
+
key: 10,
|
|
227
|
+
examples: (I = e.value) == null ? void 0 : I.examples,
|
|
228
|
+
example: ((N = e.value) == null ? void 0 : N.example) || ((C = (A = e.value) == null ? void 0 : A.items) == null ? void 0 : C.example),
|
|
229
|
+
"discriminator-type": y(D)
|
|
230
|
+
}, null, 8, ["examples", "example", "discriminator-type"])) : u("", !0)
|
|
222
231
|
]);
|
|
223
232
|
};
|
|
224
233
|
}
|
|
225
234
|
});
|
|
226
235
|
export {
|
|
227
|
-
|
|
236
|
+
ee as default
|
|
228
237
|
};
|