@scalar/api-reference 1.25.102 → 1.25.103
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 +8 -0
- package/dist/browser/standalone.js +1204 -1200
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -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 +84 -82
- package/dist/components/Content/Schema/helpers/formatExample.d.ts +5 -0
- package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/formatExample.js +6 -0
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +8 -7
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +2 -2
- package/dist/features/Operation/components/ParameterList.vue2.js +18 -16
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +27 -25
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -8
|
@@ -6,11 +6,13 @@ type __VLS_Props = {
|
|
|
6
6
|
compact?: boolean;
|
|
7
7
|
description?: string;
|
|
8
8
|
additional?: boolean;
|
|
9
|
+
withExamples?: boolean;
|
|
9
10
|
};
|
|
10
11
|
declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
12
|
required: boolean;
|
|
12
13
|
level: number;
|
|
13
14
|
compact: boolean;
|
|
15
|
+
withExamples: boolean;
|
|
14
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
17
|
export default _default_1;
|
|
16
18
|
//# sourceMappingURL=SchemaProperty.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAibA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;cALW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAGF,OAAO;;AAwY1B,0BAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-32801e8b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Q, computed as y, openBlock as l, createElementBlock as t, normalizeClass as M, createVNode as n, createSlots as W, withCtx as v, createTextVNode as b, toDisplayString as r, unref as u, createCommentVNode as s, createElementVNode as c, Fragment as i, renderList as m, createBlock as E } from "vue";
|
|
2
|
+
import { formatExample as X } from "./helpers/formatExample.js";
|
|
2
3
|
import { Disclosure as Y, DisclosurePanel as _, DisclosureButton as x } from "@headlessui/vue";
|
|
3
4
|
import { ScalarMarkdown as S, ScalarIcon as ee } from "@scalar/components";
|
|
4
5
|
import f from "./Schema.vue.js";
|
|
@@ -12,16 +13,16 @@ const te = {
|
|
|
12
13
|
}, oe = {
|
|
13
14
|
key: 2,
|
|
14
15
|
class: "property-example custom-scroll"
|
|
15
|
-
},
|
|
16
|
+
}, se = { class: "property-example-value" }, ne = {
|
|
16
17
|
key: 3,
|
|
17
18
|
class: "property-example custom-scroll"
|
|
18
|
-
},
|
|
19
|
+
}, re = { class: "property-example-label" }, ie = {
|
|
19
20
|
key: 4,
|
|
20
21
|
class: "property-enum"
|
|
21
22
|
}, ue = {
|
|
22
23
|
key: 0,
|
|
23
24
|
class: "property-list"
|
|
24
|
-
}, pe = { class: "property-heading" },
|
|
25
|
+
}, pe = { class: "property-heading" }, me = { class: "property-name" }, de = { class: "property-description" }, ce = {
|
|
25
26
|
key: 1,
|
|
26
27
|
class: "property-enum-values"
|
|
27
28
|
}, ve = {
|
|
@@ -36,7 +37,7 @@ const te = {
|
|
|
36
37
|
}, he = {
|
|
37
38
|
key: 1,
|
|
38
39
|
class: "property-rule"
|
|
39
|
-
},
|
|
40
|
+
}, De = /* @__PURE__ */ Q({
|
|
40
41
|
__name: "SchemaProperty",
|
|
41
42
|
props: {
|
|
42
43
|
value: {},
|
|
@@ -45,10 +46,11 @@ const te = {
|
|
|
45
46
|
required: { type: Boolean, default: !1 },
|
|
46
47
|
compact: { type: Boolean, default: !1 },
|
|
47
48
|
description: {},
|
|
48
|
-
additional: { type: Boolean }
|
|
49
|
+
additional: { type: Boolean },
|
|
50
|
+
withExamples: { type: Boolean, default: !0 }
|
|
49
51
|
},
|
|
50
|
-
setup(
|
|
51
|
-
const h =
|
|
52
|
+
setup($) {
|
|
53
|
+
const h = $, B = {
|
|
52
54
|
integer: {
|
|
53
55
|
_default: "Integer numbers.",
|
|
54
56
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -61,152 +63,152 @@ const te = {
|
|
|
61
63
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
62
64
|
binary: "binary data, used to describe files"
|
|
63
65
|
}
|
|
64
|
-
}, D = function(e,
|
|
65
|
-
return
|
|
66
|
-
},
|
|
66
|
+
}, D = function(e, o) {
|
|
67
|
+
return o != null && o.properties || o != null && o.additionalProperties ? null : e || (o == null ? void 0 : o.description) || null;
|
|
68
|
+
}, w = function(e) {
|
|
67
69
|
return !e || !B[e.type] ? null : B[e.type][e.format || "_default"];
|
|
68
|
-
},
|
|
69
|
-
var
|
|
70
|
-
return (e == null ? void 0 : e.enum) || ((
|
|
71
|
-
}, G = ["oneOf", "anyOf", "allOf", "not"],
|
|
72
|
-
() =>
|
|
70
|
+
}, d = function(e) {
|
|
71
|
+
var o;
|
|
72
|
+
return (e == null ? void 0 : e.enum) || ((o = e == null ? void 0 : e.items) == null ? void 0 : o.enum) || [];
|
|
73
|
+
}, G = ["oneOf", "anyOf", "allOf", "not"], C = y(() => d(h.value).length > 9), P = y(() => C.value ? 5 : 9), J = y(
|
|
74
|
+
() => d(h.value).slice(0, P.value)
|
|
73
75
|
), K = y(
|
|
74
|
-
() =>
|
|
75
|
-
)
|
|
76
|
-
return (e,
|
|
77
|
-
var
|
|
76
|
+
() => d(h.value).slice(P.value)
|
|
77
|
+
);
|
|
78
|
+
return (e, o) => {
|
|
79
|
+
var j, N, O, q, F, I, L, V, z, H, R, T, U;
|
|
78
80
|
return l(), t("div", {
|
|
79
|
-
class:
|
|
81
|
+
class: M(["property", [
|
|
80
82
|
`property--level-${e.level}`,
|
|
81
83
|
{
|
|
82
84
|
"property--compact": e.compact,
|
|
83
|
-
"property--deprecated": (
|
|
85
|
+
"property--deprecated": (j = e.value) == null ? void 0 : j.deprecated
|
|
84
86
|
}
|
|
85
87
|
]])
|
|
86
88
|
}, [
|
|
87
|
-
|
|
89
|
+
n(le, {
|
|
88
90
|
additional: e.additional,
|
|
89
|
-
enum:
|
|
91
|
+
enum: d(e.value).length > 0,
|
|
90
92
|
required: e.required,
|
|
91
93
|
value: e.value
|
|
92
|
-
},
|
|
94
|
+
}, W({ _: 2 }, [
|
|
93
95
|
e.name ? {
|
|
94
96
|
name: "name",
|
|
95
97
|
fn: v(() => [
|
|
96
|
-
b(
|
|
98
|
+
b(r(e.name), 1)
|
|
97
99
|
]),
|
|
98
100
|
key: "0"
|
|
99
101
|
} : void 0,
|
|
100
102
|
(N = e.value) != null && N.example ? {
|
|
101
103
|
name: "example",
|
|
102
104
|
fn: v(() => [
|
|
103
|
-
b(" Example: " +
|
|
105
|
+
b(" Example: " + r(e.value.example), 1)
|
|
104
106
|
]),
|
|
105
107
|
key: "1"
|
|
106
108
|
} : void 0
|
|
107
109
|
]), 1032, ["additional", "enum", "required", "value"]),
|
|
108
110
|
D(e.description, e.value) ? (l(), t("div", te, [
|
|
109
|
-
|
|
111
|
+
n(u(S), {
|
|
110
112
|
value: D(e.description, e.value)
|
|
111
113
|
}, null, 8, ["value"])
|
|
112
|
-
])) :
|
|
113
|
-
|
|
114
|
-
value:
|
|
114
|
+
])) : w(e.value) ? (l(), t("div", ae, [
|
|
115
|
+
n(u(S), {
|
|
116
|
+
value: w(e.value) || ""
|
|
115
117
|
}, null, 8, ["value"])
|
|
116
|
-
])) :
|
|
117
|
-
(O = e.value) != null && O.example || (F = (q = e.value) == null ? void 0 : q.items) != null && F.example ? (l(), t("div", oe, [
|
|
118
|
-
|
|
119
|
-
c("code",
|
|
120
|
-
])) :
|
|
121
|
-
(
|
|
122
|
-
c("span",
|
|
123
|
-
(l(!0), t(i, null,
|
|
124
|
-
key:
|
|
118
|
+
])) : s("", !0),
|
|
119
|
+
e.withExamples && ((O = e.value) != null && O.example || (F = (q = e.value) == null ? void 0 : q.items) != null && F.example) ? (l(), t("div", oe, [
|
|
120
|
+
o[0] || (o[0] = c("span", { class: "property-example-label" }, "Example", -1)),
|
|
121
|
+
c("code", se, r(u(X)(e.value.example || ((I = e.value) == null ? void 0 : I.items.example))), 1)
|
|
122
|
+
])) : s("", !0),
|
|
123
|
+
(L = e.value) != null && L.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", ne, [
|
|
124
|
+
c("span", re, r(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
|
|
125
|
+
(l(!0), t(i, null, m(e.value.examples, (a, p) => (l(), t("code", {
|
|
126
|
+
key: p,
|
|
125
127
|
class: "property-example-value"
|
|
126
|
-
},
|
|
127
|
-
])) :
|
|
128
|
-
((
|
|
129
|
-
(
|
|
130
|
-
(l(!0), t(i, null, d(
|
|
131
|
-
key:
|
|
128
|
+
}, r(a), 1))), 128))
|
|
129
|
+
])) : s("", !0),
|
|
130
|
+
((V = d(e.value)) == null ? void 0 : V.length) > 0 ? (l(), t("div", ie, [
|
|
131
|
+
(z = e.value) != null && z["x-enumDescriptions"] ? (l(), t("div", ue, [
|
|
132
|
+
(l(!0), t(i, null, m(d(e.value), (a) => (l(), t("div", {
|
|
133
|
+
key: a,
|
|
132
134
|
class: "property"
|
|
133
135
|
}, [
|
|
134
136
|
c("div", pe, [
|
|
135
|
-
c("div",
|
|
137
|
+
c("div", me, r(a), 1)
|
|
136
138
|
]),
|
|
137
|
-
c("div",
|
|
138
|
-
|
|
139
|
-
value: e.value["x-enumDescriptions"][
|
|
139
|
+
c("div", de, [
|
|
140
|
+
n(u(S), {
|
|
141
|
+
value: e.value["x-enumDescriptions"][a]
|
|
140
142
|
}, null, 8, ["value"])
|
|
141
143
|
])
|
|
142
144
|
]))), 128))
|
|
143
145
|
])) : (l(), t("ul", ce, [
|
|
144
|
-
(l(!0), t(i, null,
|
|
145
|
-
key:
|
|
146
|
+
(l(!0), t(i, null, m(J.value, (a) => (l(), t("li", {
|
|
147
|
+
key: a,
|
|
146
148
|
class: "property-enum-value"
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
default: v(({ open:
|
|
150
|
-
|
|
149
|
+
}, r(a), 1))), 128)),
|
|
150
|
+
C.value ? (l(), E(u(Y), { key: 0 }, {
|
|
151
|
+
default: v(({ open: a }) => [
|
|
152
|
+
n(u(_), null, {
|
|
151
153
|
default: v(() => [
|
|
152
|
-
(l(!0), t(i, null,
|
|
153
|
-
key:
|
|
154
|
+
(l(!0), t(i, null, m(K.value, (p) => (l(), t("li", {
|
|
155
|
+
key: p,
|
|
154
156
|
class: "property-enum-value"
|
|
155
|
-
},
|
|
157
|
+
}, r(p), 1))), 128))
|
|
156
158
|
]),
|
|
157
159
|
_: 1
|
|
158
160
|
}),
|
|
159
|
-
|
|
161
|
+
n(u(x), { class: "enum-toggle-button" }, {
|
|
160
162
|
default: v(() => [
|
|
161
|
-
|
|
162
|
-
class:
|
|
163
|
+
n(u(ee), {
|
|
164
|
+
class: M(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": a }]),
|
|
163
165
|
icon: "Add",
|
|
164
166
|
size: "sm"
|
|
165
167
|
}, null, 8, ["class"]),
|
|
166
|
-
b(" " +
|
|
168
|
+
b(" " + r(a ? "Hide values" : "Show all values"), 1)
|
|
167
169
|
]),
|
|
168
170
|
_: 2
|
|
169
171
|
}, 1024)
|
|
170
172
|
]),
|
|
171
173
|
_: 1
|
|
172
|
-
})) :
|
|
174
|
+
})) : s("", !0)
|
|
173
175
|
]))
|
|
174
|
-
])) :
|
|
175
|
-
((
|
|
176
|
-
|
|
176
|
+
])) : s("", !0),
|
|
177
|
+
((H = e.value) == null ? void 0 : H.type) === "object" && ((R = e.value) != null && R.properties || (T = e.value) != null && T.additionalProperties) ? (l(), t("div", ve, [
|
|
178
|
+
n(f, {
|
|
177
179
|
compact: e.compact,
|
|
178
180
|
level: e.level + 1,
|
|
179
181
|
value: e.value
|
|
180
182
|
}, null, 8, ["compact", "level", "value"])
|
|
181
|
-
])) :
|
|
182
|
-
(
|
|
183
|
+
])) : s("", !0),
|
|
184
|
+
(U = e.value) != null && U.items ? (l(), t(i, { key: 6 }, [
|
|
183
185
|
["object"].includes(e.value.items.type) ? (l(), t("div", ye, [
|
|
184
|
-
|
|
186
|
+
n(f, {
|
|
185
187
|
compact: e.compact,
|
|
186
188
|
level: e.level + 1,
|
|
187
189
|
value: e.value.items
|
|
188
190
|
}, null, 8, ["compact", "level", "value"])
|
|
189
|
-
])) :
|
|
190
|
-
], 64)) :
|
|
191
|
-
(l(), t(i, null,
|
|
192
|
-
var
|
|
193
|
-
return l(), t(i, { key:
|
|
194
|
-
(
|
|
195
|
-
(l(!0), t(i, null,
|
|
191
|
+
])) : s("", !0)
|
|
192
|
+
], 64)) : s("", !0),
|
|
193
|
+
(l(), t(i, null, m(G, (a) => {
|
|
194
|
+
var p, Z, A;
|
|
195
|
+
return l(), t(i, { key: a }, [
|
|
196
|
+
(p = e.value) != null && p[a] ? (l(), t("div", fe, [
|
|
197
|
+
(l(!0), t(i, null, m(e.value[a], (g, k) => (l(), E(f, {
|
|
196
198
|
key: k,
|
|
197
199
|
compact: e.compact,
|
|
198
200
|
level: e.level + 1,
|
|
199
201
|
value: g
|
|
200
202
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
201
|
-
])) :
|
|
202
|
-
(
|
|
203
|
-
(l(!0), t(i, null,
|
|
203
|
+
])) : s("", !0),
|
|
204
|
+
(A = (Z = e.value) == null ? void 0 : Z.items) != null && A[a] && e.level < 3 ? (l(), t("div", he, [
|
|
205
|
+
(l(!0), t(i, null, m(e.value.items[a], (g, k) => (l(), E(f, {
|
|
204
206
|
key: k,
|
|
205
207
|
compact: e.compact,
|
|
206
208
|
level: e.level + 1,
|
|
207
209
|
value: g
|
|
208
210
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
209
|
-
])) :
|
|
211
|
+
])) : s("", !0)
|
|
210
212
|
], 64);
|
|
211
213
|
}), 64))
|
|
212
214
|
], 2);
|
|
@@ -214,5 +216,5 @@ const te = {
|
|
|
214
216
|
}
|
|
215
217
|
});
|
|
216
218
|
export {
|
|
217
|
-
|
|
219
|
+
De as default
|
|
218
220
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatExample.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/formatExample.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CA0C/D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
function t(r) {
|
|
2
|
+
return Array.isArray(r) ? `[${r.map((n) => typeof n == "string" || typeof n == "number" ? `"${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
|
+
}
|
|
4
|
+
export {
|
|
5
|
+
t as formatExample
|
|
6
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,oBAAoB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;sBADmB,OAAO;;AA8E9B,wBAQG"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as a, openBlock as p, createBlock as l, unref as n, withCtx as m, createTextVNode as i } from "vue";
|
|
2
2
|
import { useResponses as c } from "../hooks/useResponses.js";
|
|
3
3
|
import f from "./ParameterList.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const x = /* @__PURE__ */ a({
|
|
5
5
|
__name: "OperationResponses",
|
|
6
6
|
props: {
|
|
7
7
|
operation: {},
|
|
8
8
|
collapsableItems: { type: Boolean, default: !0 }
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const t =
|
|
12
|
-
return (r, e) => (
|
|
10
|
+
setup(s) {
|
|
11
|
+
const t = s, { responses: o } = c(t.operation);
|
|
12
|
+
return (r, e) => (p(), l(f, {
|
|
13
13
|
collapsableItems: r.collapsableItems,
|
|
14
|
-
parameters:
|
|
14
|
+
parameters: n(o),
|
|
15
|
+
withExamples: !1
|
|
15
16
|
}, {
|
|
16
17
|
title: m(() => e[0] || (e[0] = [
|
|
17
18
|
i("Responses")
|
|
@@ -21,5 +22,5 @@ const I = /* @__PURE__ */ p({
|
|
|
21
22
|
}
|
|
22
23
|
});
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
x as default
|
|
25
26
|
};
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
parameters?: Parameter[];
|
|
4
4
|
showChildren?: boolean;
|
|
5
5
|
collapsableItems?: boolean;
|
|
6
|
+
withExamples?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare function __VLS_template(): {
|
|
8
9
|
attrs: Partial<{}>;
|
|
@@ -14,6 +15,7 @@ declare function __VLS_template(): {
|
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
withExamples: boolean;
|
|
17
19
|
showChildren: boolean;
|
|
18
20
|
collapsableItems: boolean;
|
|
19
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAMrD,KAAK,WAAW,GAAG;IACf,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAoBJ,iBAAS,cAAc;WAsDT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;kBA3FF,OAAO;kBAFP,OAAO;sBACH,OAAO;6EAmG5B,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 t from "./ParameterList.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const e = /* @__PURE__ */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-dba0156a"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { defineComponent as o, openBlock as t, createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as o, openBlock as t, createElementBlock as r, createElementVNode as s, renderSlot as m, Fragment as n, renderList as p, createBlock as i, createCommentVNode as d } from "vue";
|
|
2
|
+
import h from "./ParameterListItem.vue.js";
|
|
3
|
+
const c = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "parameter-list"
|
|
6
|
-
}, u = { class: "parameter-list-title" }, f = { class: "parameter-list-items" },
|
|
6
|
+
}, u = { class: "parameter-list-title" }, f = { class: "parameter-list-items" }, E = /* @__PURE__ */ o({
|
|
7
7
|
__name: "ParameterList",
|
|
8
8
|
props: {
|
|
9
9
|
parameters: {},
|
|
10
10
|
showChildren: { type: Boolean, default: !1 },
|
|
11
|
-
collapsableItems: { type: Boolean, default: !1 }
|
|
11
|
+
collapsableItems: { type: Boolean, default: !1 },
|
|
12
|
+
withExamples: { type: Boolean, default: !0 }
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
-
return (e,
|
|
15
|
-
var
|
|
16
|
-
return (
|
|
14
|
+
setup(w) {
|
|
15
|
+
return (e, _) => {
|
|
16
|
+
var a;
|
|
17
|
+
return (a = e.parameters) != null && a.length ? (t(), r("div", c, [
|
|
17
18
|
s("div", u, [
|
|
18
|
-
|
|
19
|
+
m(e.$slots, "title", {}, void 0, !0)
|
|
19
20
|
]),
|
|
20
21
|
s("ul", f, [
|
|
21
|
-
(t(!0),
|
|
22
|
-
key:
|
|
22
|
+
(t(!0), r(n, null, p(e.parameters, (l) => (t(), i(h, {
|
|
23
|
+
key: l.name,
|
|
23
24
|
collapsableItems: e.collapsableItems,
|
|
24
|
-
parameter:
|
|
25
|
-
showChildren: e.showChildren
|
|
26
|
-
|
|
25
|
+
parameter: l,
|
|
26
|
+
showChildren: e.showChildren,
|
|
27
|
+
withExamples: e.withExamples
|
|
28
|
+
}, null, 8, ["collapsableItems", "parameter", "showChildren", "withExamples"]))), 128))
|
|
27
29
|
])
|
|
28
30
|
])) : d("", !0);
|
|
29
31
|
};
|
|
30
32
|
}
|
|
31
33
|
});
|
|
32
34
|
export {
|
|
33
|
-
|
|
35
|
+
E as default
|
|
34
36
|
};
|
|
@@ -3,8 +3,10 @@ type __VLS_Props = {
|
|
|
3
3
|
parameter: Parameter;
|
|
4
4
|
showChildren?: boolean;
|
|
5
5
|
collapsableItems?: boolean;
|
|
6
|
+
withExamples?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
withExamples: boolean;
|
|
8
10
|
showChildren: boolean;
|
|
9
11
|
collapsableItems: boolean;
|
|
10
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAsOA,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAQlE,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,SAAS,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;kBADe,OAAO;kBAFP,OAAO;sBACH,OAAO;;AAgP9B,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ParameterListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-ab978914"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
import { defineComponent as k, computed as y, ref as
|
|
2
|
-
import
|
|
3
|
-
import { Disclosure as
|
|
4
|
-
import { ScalarIcon as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as k, computed as y, ref as w, openBlock as s, createElementBlock as B, createVNode as r, unref as o, withCtx as m, createBlock as i, normalizeClass as g, createTextVNode as E, toDisplayString as c, createElementVNode as u, createCommentVNode as d } from "vue";
|
|
2
|
+
import b from "../../../components/ScreenReader.vue.js";
|
|
3
|
+
import { Disclosure as S, DisclosureButton as V, DisclosurePanel as q } from "@headlessui/vue";
|
|
4
|
+
import { ScalarIcon as D } from "@scalar/components";
|
|
5
|
+
import T from "./ContentTypeSelect.vue.js";
|
|
6
6
|
import I from "./ParameterHeaders.vue.js";
|
|
7
7
|
import N from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
8
|
-
const P = { class: "parameter-item" },
|
|
8
|
+
const P = { class: "parameter-item" }, _ = { class: "parameter-item-name" }, j = { class: "parameter-item-type" }, R = { class: "absolute right-0" }, J = /* @__PURE__ */ k({
|
|
9
9
|
__name: "ParameterListItem",
|
|
10
10
|
props: {
|
|
11
11
|
parameter: {},
|
|
12
12
|
showChildren: { type: Boolean, default: !1 },
|
|
13
|
-
collapsableItems: { type: Boolean, default: !1 }
|
|
13
|
+
collapsableItems: { type: Boolean, default: !1 },
|
|
14
|
+
withExamples: { type: Boolean, default: !0 }
|
|
14
15
|
},
|
|
15
16
|
setup(v) {
|
|
16
|
-
const t = v, C = y(() => t.parameter.content ? Object.keys(t.parameter.content) : []),
|
|
17
|
+
const t = v, C = y(() => t.parameter.content ? Object.keys(t.parameter.content) : []), n = w(
|
|
17
18
|
C.value[0]
|
|
18
19
|
);
|
|
19
|
-
t.parameter.content && "application/json" in t.parameter.content && (
|
|
20
|
+
t.parameter.content && "application/json" in t.parameter.content && (n.value = "application/json");
|
|
20
21
|
const a = y(() => !!(t.collapsableItems && t.parameter.content));
|
|
21
|
-
return (e, f) => (s(),
|
|
22
|
-
r(
|
|
22
|
+
return (e, f) => (s(), B("li", P, [
|
|
23
|
+
r(o(S), null, {
|
|
23
24
|
default: m(({ open: p }) => [
|
|
24
|
-
a.value ? (s(), i(
|
|
25
|
+
a.value ? (s(), i(o(V), {
|
|
25
26
|
key: 0,
|
|
26
|
-
class:
|
|
27
|
+
class: g(["flex parameter-item-trigger", { "parameter-item-trigger-open": p }])
|
|
27
28
|
}, {
|
|
28
29
|
default: m(() => [
|
|
29
|
-
r(
|
|
30
|
+
r(o(D), {
|
|
30
31
|
class: "parameter-item-icon",
|
|
31
32
|
icon: p ? "ChevronDown" : "ChevronRight",
|
|
32
33
|
thickness: "1.5"
|
|
33
34
|
}, null, 8, ["icon"]),
|
|
34
|
-
r(
|
|
35
|
+
r(b, null, {
|
|
35
36
|
default: m(() => [
|
|
36
|
-
|
|
37
|
+
E(c(p ? "Collapse" : "Expand"), 1)
|
|
37
38
|
]),
|
|
38
39
|
_: 2
|
|
39
40
|
}, 1024),
|
|
40
|
-
u("span",
|
|
41
|
-
u("span",
|
|
41
|
+
u("span", _, c(e.parameter.name), 1),
|
|
42
|
+
u("span", j, c(e.parameter.description), 1),
|
|
42
43
|
u("div", R, [
|
|
43
|
-
a.value && t.parameter.content ? (s(), i(
|
|
44
|
+
a.value && t.parameter.content ? (s(), i(T, {
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "parameter-item-content-type",
|
|
46
|
-
defaultValue:
|
|
47
|
+
defaultValue: n.value,
|
|
47
48
|
requestBody: t.parameter,
|
|
48
|
-
onSelectContentType: f[0] || (f[0] = ({ contentType: l }) =>
|
|
49
|
+
onSelectContentType: f[0] || (f[0] = ({ contentType: l }) => n.value = l)
|
|
49
50
|
}, null, 8, ["defaultValue", "requestBody"])) : d("", !0)
|
|
50
51
|
])
|
|
51
52
|
]),
|
|
52
53
|
_: 2
|
|
53
54
|
}, 1032, ["class"])) : d("", !0),
|
|
54
|
-
r(
|
|
55
|
+
r(o(q), {
|
|
55
56
|
class: "parameter-item-container parameter-item-container-markdown",
|
|
56
57
|
static: !a.value
|
|
57
58
|
}, {
|
|
@@ -62,14 +63,15 @@ const P = { class: "parameter-item" }, j = { class: "parameter-item-name" }, E =
|
|
|
62
63
|
key: 0,
|
|
63
64
|
headers: e.parameter.headers
|
|
64
65
|
}, null, 8, ["headers"])) : d("", !0),
|
|
65
|
-
r(
|
|
66
|
+
r(o(N), {
|
|
66
67
|
compact: "",
|
|
67
68
|
description: a.value ? "" : e.parameter.description,
|
|
68
69
|
name: a.value ? "" : e.parameter.name,
|
|
69
70
|
noncollapsible: e.showChildren,
|
|
70
71
|
required: e.parameter.required,
|
|
71
|
-
value: e.parameter.content ? (h = (l = e.parameter.content) == null ? void 0 : l[
|
|
72
|
-
|
|
72
|
+
value: e.parameter.content ? (h = (l = e.parameter.content) == null ? void 0 : l[n.value]) == null ? void 0 : h.schema : e.parameter.schema,
|
|
73
|
+
withExamples: e.withExamples
|
|
74
|
+
}, null, 8, ["description", "name", "noncollapsible", "required", "value", "withExamples"])
|
|
73
75
|
];
|
|
74
76
|
}),
|
|
75
77
|
_: 1
|