@scalar/api-client 2.29.1 → 2.29.3
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 +66 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +134 -135
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +117 -110
- package/dist/v2/features/app/app-state.d.ts +4 -2
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +117 -109
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +20 -16
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +18 -14
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +19 -15
- package/dist/v2/helpers/get-active-proxy-url.d.ts +18 -0
- package/dist/v2/helpers/get-active-proxy-url.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-proxy-url.js +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AA0bhG,KAAK,2BAA2B,GAAG;IACjC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,CAAA;AAYD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU,2BAA2B,EACrC,uCAKG,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CACtB,CAAM,KACN,OAuJF,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isDefined as
|
|
2
|
-
import { getRaw as
|
|
1
|
+
import { isDefined as O } from "@scalar/helpers/array/is-defined";
|
|
2
|
+
import { getRaw as S } from "@scalar/json-magic/magic-proxy";
|
|
3
3
|
import { unpackOverridesProxy as N } from "@scalar/workspace-store/helpers/overrides-proxy";
|
|
4
4
|
import { resolve as y } from "@scalar/workspace-store/resolve";
|
|
5
|
-
const
|
|
5
|
+
const q = 10, T = "additionalProperty", j = (/* @__PURE__ */ new Date()).toISOString(), k = j.split("T")[0], M = j.split("T")[1].split(".")[0], R = {
|
|
6
6
|
"date-time": j,
|
|
7
|
-
date:
|
|
7
|
+
date: k,
|
|
8
8
|
email: "hello@example.com",
|
|
9
9
|
hostname: "example.com",
|
|
10
10
|
// https://tools.ietf.org/html/rfc6531#section-3.3
|
|
@@ -22,276 +22,275 @@ const M = 10, P = 10, R = "additionalProperty", j = (/* @__PURE__ */ new Date())
|
|
|
22
22
|
// https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01
|
|
23
23
|
"relative-json-pointer": "1/nested/objects",
|
|
24
24
|
// full-time in https://tools.ietf.org/html/rfc3339#section-5.6
|
|
25
|
-
time:
|
|
25
|
+
time: M,
|
|
26
26
|
// either a URI or relative-reference https://tools.ietf.org/html/rfc3986#section-4.1
|
|
27
27
|
"uri-reference": "../folder",
|
|
28
28
|
"uri-template": "https://example.com/{id}",
|
|
29
29
|
uri: "https://example.com",
|
|
30
30
|
uuid: "123e4567-e89b-12d3-a456-426614174000",
|
|
31
31
|
"object-id": "6592008029c8c3e4dc76256c"
|
|
32
|
-
},
|
|
33
|
-
if (!
|
|
32
|
+
}, E = (e, i = !1, o = "") => "type" in e && e.type === "string" && "format" in e && e.format === "binary" ? "@filename" : i && "format" in e && e.format ? R[e.format] ?? o : o, A = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), C = (e) => {
|
|
33
|
+
if (!e)
|
|
34
34
|
return;
|
|
35
|
-
const i =
|
|
35
|
+
const i = P.get(e);
|
|
36
36
|
if (i)
|
|
37
37
|
return i;
|
|
38
|
-
if ("required" in
|
|
39
|
-
const o =
|
|
38
|
+
if ("required" in e) {
|
|
39
|
+
const o = e.required;
|
|
40
40
|
if (Array.isArray(o) && o.length > 0) {
|
|
41
41
|
const l = new Set(o);
|
|
42
|
-
return
|
|
42
|
+
return P.set(e, l), l;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, f = (e, i, o) => {
|
|
46
46
|
if (typeof i != "object" || i === null)
|
|
47
47
|
return i;
|
|
48
|
-
const l =
|
|
49
|
-
return
|
|
50
|
-
},
|
|
51
|
-
if (
|
|
48
|
+
const l = S(N(e)), d = A.get(l) ?? /* @__PURE__ */ new Map();
|
|
49
|
+
return d && d.set(o, i), A.set(l, d), i;
|
|
50
|
+
}, I = (e) => !!(e.allOf || e.oneOf || e.anyOf), _ = (e, i, o, l) => {
|
|
51
|
+
if (e.deprecated || l?.mode === "write" && e.readOnly || l?.mode === "read" && e.writeOnly)
|
|
52
52
|
return !0;
|
|
53
|
-
if (l?.omitEmptyAndOptionalProperties !== !0 || "type" in
|
|
53
|
+
if (l?.omitEmptyAndOptionalProperties !== !0 || "type" in e && (e.type === "object" || e.type === "array") || I(e) || "examples" in e && Array.isArray(e.examples) && e.examples.length > 0 || "example" in e && e.example !== void 0 || "default" in e && e.default !== void 0 || "const" in e && e.const !== void 0 || "enum" in e && Array.isArray(e.enum) && e.enum.length > 0)
|
|
54
54
|
return !1;
|
|
55
|
-
const r = o ??
|
|
56
|
-
return !(
|
|
57
|
-
},
|
|
55
|
+
const r = o ?? e.title ?? "", t = C(i);
|
|
56
|
+
return !(t ? t.has(r) : !1);
|
|
57
|
+
}, w = (e, i) => Array.isArray(e) && Array.isArray(i) ? [...e, ...i] : e && typeof e == "object" && i && typeof i == "object" ? { ...e, ...i } : i, F = (e, i, o, l, d) => {
|
|
58
58
|
const r = {};
|
|
59
|
-
if ("properties" in
|
|
60
|
-
const
|
|
59
|
+
if ("properties" in e && e.properties) {
|
|
60
|
+
const t = Object.keys(e.properties), n = t.length;
|
|
61
61
|
for (let a = 0; a < n; a++) {
|
|
62
|
-
const
|
|
62
|
+
const x = t[a], u = y.schema(e.properties[x]);
|
|
63
63
|
if (!u)
|
|
64
64
|
continue;
|
|
65
65
|
const c = i?.xml && "xml" in u ? u.xml?.name : void 0, m = s(u, i, {
|
|
66
66
|
level: o + 1,
|
|
67
|
-
parentSchema:
|
|
68
|
-
name:
|
|
67
|
+
parentSchema: e,
|
|
68
|
+
name: x,
|
|
69
69
|
seen: l
|
|
70
70
|
});
|
|
71
|
-
typeof m < "u" && (r[c ??
|
|
71
|
+
typeof m < "u" && (r[c ?? x] = m);
|
|
72
72
|
}
|
|
73
|
-
o > 3 && e.length > P && (r["..."] = "[Additional Properties Truncated]");
|
|
74
73
|
}
|
|
75
|
-
if ("patternProperties" in
|
|
76
|
-
for (const
|
|
77
|
-
const n = y.schema(
|
|
78
|
-
n && (r[
|
|
74
|
+
if ("patternProperties" in e && e.patternProperties)
|
|
75
|
+
for (const t of Object.keys(e.patternProperties)) {
|
|
76
|
+
const n = y.schema(e.patternProperties[t]);
|
|
77
|
+
n && (r[t] = s(n, i, {
|
|
79
78
|
level: o + 1,
|
|
80
|
-
parentSchema:
|
|
81
|
-
name:
|
|
79
|
+
parentSchema: e,
|
|
80
|
+
name: t,
|
|
82
81
|
seen: l
|
|
83
82
|
}));
|
|
84
83
|
}
|
|
85
|
-
if ("additionalProperties" in
|
|
86
|
-
const
|
|
87
|
-
r[a] = n ? "anything" : typeof
|
|
84
|
+
if ("additionalProperties" in e && e.additionalProperties) {
|
|
85
|
+
const t = typeof e.additionalProperties == "boolean" ? e.additionalProperties : y.schema(e.additionalProperties), n = e.additionalProperties === !0 || typeof e.additionalProperties == "object" && Object.keys(e.additionalProperties).length === 0, a = typeof t == "object" && "x-additionalPropertiesName" in t && typeof t["x-additionalPropertiesName"] == "string" && t["x-additionalPropertiesName"].trim().length > 0 ? t["x-additionalPropertiesName"].trim() : T;
|
|
86
|
+
r[a] = n ? "anything" : typeof t == "object" ? s(t, i, {
|
|
88
87
|
level: o + 1,
|
|
89
88
|
seen: l
|
|
90
89
|
}) : "anything";
|
|
91
90
|
}
|
|
92
|
-
if (
|
|
91
|
+
if (e.oneOf?.[0])
|
|
93
92
|
Object.assign(
|
|
94
93
|
r,
|
|
95
|
-
s(y.schema(
|
|
94
|
+
s(y.schema(e.oneOf[0]), i, {
|
|
96
95
|
level: o + 1,
|
|
97
96
|
seen: l
|
|
98
97
|
})
|
|
99
98
|
);
|
|
100
|
-
else if (
|
|
99
|
+
else if (e.anyOf?.[0])
|
|
101
100
|
Object.assign(
|
|
102
101
|
r,
|
|
103
|
-
s(y.schema(
|
|
102
|
+
s(y.schema(e.anyOf[0]), i, {
|
|
104
103
|
level: o + 1,
|
|
105
104
|
seen: l
|
|
106
105
|
})
|
|
107
106
|
);
|
|
108
|
-
else if (Array.isArray(
|
|
109
|
-
let
|
|
110
|
-
for (const n of
|
|
107
|
+
else if (Array.isArray(e.allOf) && e.allOf.length > 0) {
|
|
108
|
+
let t = r;
|
|
109
|
+
for (const n of e.allOf) {
|
|
111
110
|
const a = s(y.schema(n), i, {
|
|
112
111
|
level: o + 1,
|
|
113
|
-
parentSchema:
|
|
112
|
+
parentSchema: e,
|
|
114
113
|
seen: l
|
|
115
114
|
});
|
|
116
|
-
|
|
115
|
+
t = w(t, a);
|
|
117
116
|
}
|
|
118
|
-
|
|
117
|
+
t && typeof t == "object" && Object.assign(r, t);
|
|
119
118
|
}
|
|
120
|
-
if (i?.xml && "xml" in
|
|
121
|
-
const
|
|
122
|
-
return e
|
|
119
|
+
if (i?.xml && "xml" in e && e.xml?.name && o === 0) {
|
|
120
|
+
const t = {};
|
|
121
|
+
return t[e.xml.name] = r, f(e, t, d);
|
|
123
122
|
}
|
|
124
|
-
return
|
|
125
|
-
},
|
|
126
|
-
const r = "items" in
|
|
127
|
-
if (
|
|
128
|
-
return
|
|
123
|
+
return f(e, r, d);
|
|
124
|
+
}, L = (e, i, o, l, d) => {
|
|
125
|
+
const r = "items" in e ? y.schema(e.items) : void 0, t = r && typeof r == "object" && "xml" in r ? r.xml?.name : void 0, n = !!(i?.xml && "xml" in e && e.xml?.wrapped && t);
|
|
126
|
+
if (e.example !== void 0)
|
|
127
|
+
return f(e, n ? { [t]: e.example } : e.example, d);
|
|
129
128
|
if (r && typeof r == "object") {
|
|
130
129
|
if (Array.isArray(r.allOf) && r.allOf.length > 0) {
|
|
131
|
-
const c = r.allOf.filter(
|
|
130
|
+
const c = r.allOf.filter(O), m = y.schema(c[0]);
|
|
132
131
|
if (m && typeof m == "object" && "type" in m && m.type === "object") {
|
|
133
|
-
const
|
|
132
|
+
const b = s({ type: "object", allOf: c }, i, {
|
|
134
133
|
level: o + 1,
|
|
135
|
-
parentSchema:
|
|
134
|
+
parentSchema: e,
|
|
136
135
|
seen: l
|
|
137
136
|
});
|
|
138
|
-
return
|
|
137
|
+
return f(e, n ? [{ [t]: b }] : [b], d);
|
|
139
138
|
}
|
|
140
|
-
const
|
|
139
|
+
const v = c.map(
|
|
141
140
|
(p) => s(y.schema(p), i, {
|
|
142
141
|
level: o + 1,
|
|
143
|
-
parentSchema:
|
|
142
|
+
parentSchema: e,
|
|
144
143
|
seen: l
|
|
145
144
|
})
|
|
146
|
-
).filter(
|
|
147
|
-
return
|
|
148
|
-
|
|
149
|
-
n ?
|
|
150
|
-
|
|
145
|
+
).filter(O);
|
|
146
|
+
return f(
|
|
147
|
+
e,
|
|
148
|
+
n ? v.map((p) => ({ [t]: p })) : v,
|
|
149
|
+
d
|
|
151
150
|
);
|
|
152
151
|
}
|
|
153
152
|
const u = r.anyOf || r.oneOf;
|
|
154
153
|
if (u && u.length > 0) {
|
|
155
154
|
const c = u[0], m = s(y.schema(c), i, {
|
|
156
155
|
level: o + 1,
|
|
157
|
-
parentSchema:
|
|
156
|
+
parentSchema: e,
|
|
158
157
|
seen: l
|
|
159
158
|
});
|
|
160
|
-
return
|
|
159
|
+
return f(e, n ? [{ [t]: m }] : [m], d);
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
|
-
const a = r && typeof r == "object" && ("type" in r && r.type === "object" || "properties" in r),
|
|
164
|
-
if (r && typeof r == "object" && ("type" in r && r.type || a ||
|
|
162
|
+
const a = r && typeof r == "object" && ("type" in r && r.type === "object" || "properties" in r), x = r && typeof r == "object" && ("type" in r && r.type === "array" || "items" in r);
|
|
163
|
+
if (r && typeof r == "object" && ("type" in r && r.type || a || x)) {
|
|
165
164
|
const u = s(r, i, {
|
|
166
165
|
level: o + 1,
|
|
167
166
|
seen: l
|
|
168
167
|
});
|
|
169
|
-
return
|
|
168
|
+
return f(e, n ? [{ [t]: u }] : [u], d);
|
|
170
169
|
}
|
|
171
|
-
return
|
|
172
|
-
}, U = (
|
|
173
|
-
if ("type" in
|
|
174
|
-
switch (
|
|
170
|
+
return f(e, [], d);
|
|
171
|
+
}, U = (e, i, o) => {
|
|
172
|
+
if ("type" in e && e.type && !Array.isArray(e.type))
|
|
173
|
+
switch (e.type) {
|
|
175
174
|
case "string":
|
|
176
|
-
return
|
|
175
|
+
return E(e, i, o ?? "");
|
|
177
176
|
case "boolean":
|
|
178
177
|
return !0;
|
|
179
178
|
case "integer":
|
|
180
|
-
return "minimum" in
|
|
179
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
181
180
|
case "number":
|
|
182
|
-
return "minimum" in
|
|
181
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
183
182
|
case "array":
|
|
184
183
|
return [];
|
|
185
184
|
default:
|
|
186
185
|
return;
|
|
187
186
|
}
|
|
188
|
-
}, W = (
|
|
189
|
-
if ("type" in
|
|
190
|
-
if (
|
|
187
|
+
}, W = (e, i, o) => {
|
|
188
|
+
if ("type" in e && Array.isArray(e.type)) {
|
|
189
|
+
if (e.type.includes("null"))
|
|
191
190
|
return null;
|
|
192
|
-
const l =
|
|
191
|
+
const l = e.type[0];
|
|
193
192
|
if (l)
|
|
194
193
|
switch (l) {
|
|
195
194
|
case "string":
|
|
196
|
-
return
|
|
195
|
+
return E(e, i, o ?? "");
|
|
197
196
|
case "boolean":
|
|
198
197
|
return !0;
|
|
199
198
|
case "integer":
|
|
200
|
-
return "minimum" in
|
|
199
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
201
200
|
case "number":
|
|
202
|
-
return "minimum" in
|
|
201
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
203
202
|
case "null":
|
|
204
203
|
return null;
|
|
205
204
|
default:
|
|
206
205
|
return;
|
|
207
206
|
}
|
|
208
207
|
}
|
|
209
|
-
},
|
|
210
|
-
emptyString:
|
|
211
|
-
xml:
|
|
212
|
-
mode:
|
|
213
|
-
variables:
|
|
214
|
-
omitEmptyAndOptionalProperties:
|
|
215
|
-
}), s = (
|
|
208
|
+
}, X = (e) => JSON.stringify({
|
|
209
|
+
emptyString: e?.emptyString,
|
|
210
|
+
xml: e?.xml,
|
|
211
|
+
mode: e?.mode,
|
|
212
|
+
variables: e?.variables,
|
|
213
|
+
omitEmptyAndOptionalProperties: e?.omitEmptyAndOptionalProperties
|
|
214
|
+
}), s = (e, i, {
|
|
216
215
|
level: o = 0,
|
|
217
216
|
parentSchema: l,
|
|
218
|
-
name:
|
|
217
|
+
name: d,
|
|
219
218
|
seen: r = /* @__PURE__ */ new WeakSet()
|
|
220
219
|
} = {}) => {
|
|
221
|
-
const
|
|
222
|
-
if (!
|
|
220
|
+
const t = y.schema(e);
|
|
221
|
+
if (!O(t))
|
|
223
222
|
return;
|
|
224
|
-
const n =
|
|
223
|
+
const n = S(N(t));
|
|
225
224
|
if (r.has(n))
|
|
226
225
|
return;
|
|
227
226
|
r.add(n);
|
|
228
|
-
const a =
|
|
229
|
-
if (typeof
|
|
230
|
-
return r.delete(n),
|
|
231
|
-
if (o >
|
|
227
|
+
const a = X(i), x = A.get(n)?.get(a);
|
|
228
|
+
if (typeof x < "u")
|
|
229
|
+
return r.delete(n), x;
|
|
230
|
+
if (o > q)
|
|
232
231
|
return r.delete(n), "[Max Depth Exceeded]";
|
|
233
232
|
const u = !!i?.emptyString;
|
|
234
|
-
if (
|
|
233
|
+
if (_(t, l, d, i)) {
|
|
235
234
|
r.delete(n);
|
|
236
235
|
return;
|
|
237
236
|
}
|
|
238
|
-
if ("x-variable" in
|
|
239
|
-
const p = i?.variables?.[
|
|
237
|
+
if ("x-variable" in t && t["x-variable"]) {
|
|
238
|
+
const p = i?.variables?.[t["x-variable"]];
|
|
240
239
|
if (p !== void 0)
|
|
241
|
-
return "type" in
|
|
240
|
+
return "type" in t && (t.type === "number" || t.type === "integer") ? (r.delete(n), f(t, Number(p), a)) : (r.delete(n), f(t, p, a));
|
|
242
241
|
}
|
|
243
|
-
if (Array.isArray(
|
|
244
|
-
return r.delete(n),
|
|
245
|
-
if (
|
|
246
|
-
return r.delete(n),
|
|
247
|
-
if (
|
|
248
|
-
return r.delete(n),
|
|
249
|
-
if (
|
|
250
|
-
return r.delete(n),
|
|
251
|
-
if (Array.isArray(
|
|
252
|
-
return r.delete(n),
|
|
253
|
-
if ("properties" in
|
|
254
|
-
const p =
|
|
242
|
+
if (Array.isArray(t.examples) && t.examples.length > 0)
|
|
243
|
+
return r.delete(n), f(t, t.examples[0], a);
|
|
244
|
+
if (t.example !== void 0)
|
|
245
|
+
return r.delete(n), f(t, t.example, a);
|
|
246
|
+
if (t.default !== void 0)
|
|
247
|
+
return r.delete(n), f(t, t.default, a);
|
|
248
|
+
if (t.const !== void 0)
|
|
249
|
+
return r.delete(n), f(t, t.const, a);
|
|
250
|
+
if (Array.isArray(t.enum) && t.enum.length > 0)
|
|
251
|
+
return r.delete(n), f(t, t.enum[0], a);
|
|
252
|
+
if ("properties" in t || "type" in t && t.type === "object") {
|
|
253
|
+
const p = F(t, i, o, r, a);
|
|
255
254
|
return r.delete(n), p;
|
|
256
255
|
}
|
|
257
|
-
if ("type" in
|
|
258
|
-
const p =
|
|
256
|
+
if ("type" in t && t.type === "array" || "items" in t) {
|
|
257
|
+
const p = L(t, i, o, r, a);
|
|
259
258
|
return r.delete(n), p;
|
|
260
259
|
}
|
|
261
|
-
const c = U(
|
|
260
|
+
const c = U(t, u, i?.emptyString);
|
|
262
261
|
if (c !== void 0)
|
|
263
|
-
return r.delete(n),
|
|
264
|
-
const m =
|
|
262
|
+
return r.delete(n), f(t, c, a);
|
|
263
|
+
const m = t.oneOf || t.anyOf;
|
|
265
264
|
if (Array.isArray(m) && m.length > 0) {
|
|
266
265
|
for (const p of m) {
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
return r.delete(n),
|
|
270
|
-
|
|
271
|
-
s(
|
|
266
|
+
const b = y.schema(p);
|
|
267
|
+
if (b && (!("type" in b) || b.type !== "null"))
|
|
268
|
+
return r.delete(n), f(
|
|
269
|
+
t,
|
|
270
|
+
s(b, i, {
|
|
272
271
|
level: o + 1,
|
|
273
272
|
seen: r
|
|
274
273
|
}),
|
|
275
274
|
a
|
|
276
275
|
);
|
|
277
276
|
}
|
|
278
|
-
return r.delete(n),
|
|
277
|
+
return r.delete(n), f(t, null, a);
|
|
279
278
|
}
|
|
280
|
-
if (Array.isArray(
|
|
279
|
+
if (Array.isArray(t.allOf) && t.allOf.length > 0) {
|
|
281
280
|
let p;
|
|
282
|
-
const
|
|
283
|
-
for (const D of
|
|
284
|
-
const
|
|
281
|
+
const b = t.allOf;
|
|
282
|
+
for (const D of b) {
|
|
283
|
+
const g = s(D, i, {
|
|
285
284
|
level: o + 1,
|
|
286
|
-
parentSchema:
|
|
285
|
+
parentSchema: t,
|
|
287
286
|
seen: r
|
|
288
287
|
});
|
|
289
|
-
p === void 0 ? p =
|
|
288
|
+
p === void 0 ? p = g : p && typeof p == "object" && g && typeof g == "object" ? p = w(p, g) : g !== void 0 && (p = g);
|
|
290
289
|
}
|
|
291
|
-
return r.delete(n),
|
|
290
|
+
return r.delete(n), f(t, p ?? null, a);
|
|
292
291
|
}
|
|
293
|
-
const
|
|
294
|
-
return
|
|
292
|
+
const v = W(t, u, i?.emptyString);
|
|
293
|
+
return v !== void 0 ? (r.delete(n), f(t, v, a)) : (r.delete(n), f(t, null, a));
|
|
295
294
|
};
|
|
296
295
|
export {
|
|
297
296
|
s as getExampleFromSchema
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { canMethodHaveBody as m } from "@scalar/helpers/http/can-method-have-body";
|
|
2
2
|
import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { isElectron as y } from "../../../../libs/electron.js";
|
|
4
|
-
const l = "2.29.
|
|
4
|
+
const l = "2.29.3", T = "application/json", C = "*/*", a = (n, s, o) => ({
|
|
5
5
|
name: n,
|
|
6
6
|
defaultValue: s,
|
|
7
7
|
isOverridden: o.has(n.toLowerCase())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"AAwXA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAEV,yBAAyB,EACzB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAA;AAcnF,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,+BAA+B;IAC/B,uBAAuB,EAAE,yBAAyB,CAAA;IAClD,oGAAoG;IACpG,eAAe,EAAE,qBAAqB,CAAA;IACtC,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAsoBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|