@scalar/api-reference 1.25.24 → 1.25.26
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 +42 -0
- package/dist/browser/standalone.js +10820 -10804
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/ApiClientModal.vue.js +30 -18
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +48 -48
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +22 -35
- package/dist/features/BaseUrl/ServerForm.vue.d.ts +5 -5
- package/dist/features/BaseUrl/ServerForm.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerForm.vue.js +2 -2
- package/dist/features/BaseUrl/ServerForm.vue2.js +40 -37
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts +4 -4
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +2 -2
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +17 -17
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponse.vue.js +1 -1
- package/dist/features/ExampleResponses/ExampleResponse.vue2.js +15 -18
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +1 -1
- package/dist/index.js +1 -1
- package/dist/legacy/components/CardFormTextInput.vue.js +2 -2
- package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
- package/dist/legacy/components/SecurityScheme.vue.js +1 -1
- package/dist/legacy/components/SecurityScheme.vue2.js +59 -59
- package/dist/style.css +1 -1
- package/package.json +9 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CardFormTextInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-15626a6a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityScheme.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecurityScheme.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SecurityScheme.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecurityScheme.vue"],"names":[],"mappings":"AAuhBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;;YAkBxE,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;YAHV,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;AAqxBhB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SecurityScheme.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-22bdc0a2"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as Q, computed as X, openBlock as l, createBlock as
|
|
1
|
+
import { defineComponent as Q, computed as X, openBlock as l, createBlock as m, withModifiers as Y, withCtx as o, unref as u, createElementBlock as U, Fragment as K, createTextVNode as i, toDisplayString as Z, createCommentVNode as v, createVNode as c, createElementVNode as W } from "vue";
|
|
2
2
|
import { concatenateUrlAndPath as _, redirectToProxy as x } from "@scalar/oas-utils/helpers";
|
|
3
3
|
import { useToasts as ee } from "@scalar/use-toasts";
|
|
4
|
-
import { apiClientBus as
|
|
4
|
+
import { apiClientBus as F } from "../../components/api-client-bus.js";
|
|
5
5
|
import te from "./CardForm.vue.js";
|
|
6
6
|
import ae from "./CardFormButton.vue.js";
|
|
7
|
-
import
|
|
7
|
+
import P from "./CardFormGroup.vue.js";
|
|
8
8
|
import j from "./CardFormRows.vue.js";
|
|
9
|
-
import
|
|
9
|
+
import f from "./CardFormTextInput.vue.js";
|
|
10
10
|
import R from "./SecuritySchemeScopes.vue.js";
|
|
11
11
|
import { useServerStore as re } from "../stores/useServerStore.js";
|
|
12
12
|
import { getUrlFromServerState as oe } from "../helpers/getUrlFromServerState.js";
|
|
@@ -25,7 +25,7 @@ const ke = /* @__PURE__ */ Q({
|
|
|
25
25
|
...t.apiKey,
|
|
26
26
|
token: a
|
|
27
27
|
}
|
|
28
|
-
}), t.preferredSecurityScheme &&
|
|
28
|
+
}), t.preferredSecurityScheme && F.emit({
|
|
29
29
|
updateAuth: {
|
|
30
30
|
nameKey: t.preferredSecurityScheme,
|
|
31
31
|
propertyKey: "value",
|
|
@@ -42,7 +42,7 @@ const ke = /* @__PURE__ */ Q({
|
|
|
42
42
|
username: a
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
}), t.preferredSecurityScheme &&
|
|
45
|
+
}), t.preferredSecurityScheme && F.emit({
|
|
46
46
|
updateAuth: {
|
|
47
47
|
nameKey: t.preferredSecurityScheme,
|
|
48
48
|
propertyKey: "username",
|
|
@@ -59,7 +59,7 @@ const ke = /* @__PURE__ */ Q({
|
|
|
59
59
|
password: a
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
}), t.preferredSecurityScheme &&
|
|
62
|
+
}), t.preferredSecurityScheme && F.emit({
|
|
63
63
|
updateAuth: {
|
|
64
64
|
nameKey: t.preferredSecurityScheme,
|
|
65
65
|
propertyKey: "password",
|
|
@@ -76,14 +76,14 @@ const ke = /* @__PURE__ */ Q({
|
|
|
76
76
|
token: a
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
}), t.preferredSecurityScheme &&
|
|
79
|
+
}), t.preferredSecurityScheme && F.emit({
|
|
80
80
|
updateAuth: {
|
|
81
81
|
nameKey: t.preferredSecurityScheme,
|
|
82
82
|
propertyKey: "token",
|
|
83
83
|
value: a
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
},
|
|
86
|
+
}, B = (e) => {
|
|
87
87
|
p({
|
|
88
88
|
oAuth2: {
|
|
89
89
|
...t.oAuth2,
|
|
@@ -141,7 +141,7 @@ const ke = /* @__PURE__ */ Q({
|
|
|
141
141
|
}), console.error("[authorizeWithPassword]", s);
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const C = X({
|
|
145
145
|
get: () => t.oAuth2.scopes,
|
|
146
146
|
set: (e) => p({ oAuth2: { ...t.oAuth2, scopes: e } })
|
|
147
147
|
}), J = (e) => {
|
|
@@ -153,8 +153,8 @@ const ke = /* @__PURE__ */ Q({
|
|
|
153
153
|
const h = new URLSearchParams(n.location.href).get("access_token");
|
|
154
154
|
if (n.closed || h) {
|
|
155
155
|
clearInterval(r);
|
|
156
|
-
const
|
|
157
|
-
h && t.oAuth2.state ===
|
|
156
|
+
const w = (s = n.location.href.match(/state=([^&]*)/)) == null ? void 0 : s[1];
|
|
157
|
+
h && t.oAuth2.state === w && p({
|
|
158
158
|
oAuth2: { ...t.oAuth2, accessToken: h }
|
|
159
159
|
}), n.close();
|
|
160
160
|
}
|
|
@@ -165,13 +165,13 @@ const ke = /* @__PURE__ */ Q({
|
|
|
165
165
|
};
|
|
166
166
|
return (e, a) => {
|
|
167
167
|
var n;
|
|
168
|
-
return e.value && ((n = e.value) != null && n.type) ? (l(),
|
|
168
|
+
return e.value && ((n = e.value) != null && n.type) ? (l(), m(te, {
|
|
169
169
|
key: 0,
|
|
170
170
|
onSubmit: a[5] || (a[5] = Y(() => {
|
|
171
171
|
}, ["prevent"]))
|
|
172
172
|
}, {
|
|
173
173
|
default: o(() => [
|
|
174
|
-
e.value.type === "apiKey" ? (l(), f
|
|
174
|
+
e.value.type === "apiKey" ? (l(), m(f, {
|
|
175
175
|
key: 0,
|
|
176
176
|
id: `security-scheme-${e.value.name}`,
|
|
177
177
|
placeholder: "Token",
|
|
@@ -182,17 +182,17 @@ const ke = /* @__PURE__ */ Q({
|
|
|
182
182
|
default: o(() => {
|
|
183
183
|
var r, s, d;
|
|
184
184
|
return [
|
|
185
|
-
e.value.in ? (l(),
|
|
185
|
+
e.value.in ? (l(), U(K, { key: 0 }, [
|
|
186
186
|
i(Z(((s = (r = e.value.in) == null ? void 0 : r.charAt(0)) == null ? void 0 : s.toUpperCase()) + ((d = e.value.in) == null ? void 0 : d.slice(1))), 1)
|
|
187
|
-
], 64)) :
|
|
187
|
+
], 64)) : v("", !0),
|
|
188
188
|
i(" API ")
|
|
189
189
|
];
|
|
190
190
|
}),
|
|
191
191
|
_: 1
|
|
192
|
-
}, 8, ["id", "value"])) : e.value.type === "http" || e.value.type === "basic" ? (l(),
|
|
193
|
-
e.value.type === "basic" || e.value.scheme === "basic" ? (l(),
|
|
192
|
+
}, 8, ["id", "value"])) : e.value.type === "http" || e.value.type === "basic" ? (l(), U(K, { key: 1 }, [
|
|
193
|
+
e.value.type === "basic" || e.value.scheme === "basic" ? (l(), m(P, { key: 0 }, {
|
|
194
194
|
default: o(() => [
|
|
195
|
-
c(
|
|
195
|
+
c(f, {
|
|
196
196
|
id: "http.basic.username",
|
|
197
197
|
placeholder: "Username",
|
|
198
198
|
value: u(t).http.basic.username,
|
|
@@ -203,7 +203,7 @@ const ke = /* @__PURE__ */ Q({
|
|
|
203
203
|
]),
|
|
204
204
|
_: 1
|
|
205
205
|
}, 8, ["value"]),
|
|
206
|
-
c(
|
|
206
|
+
c(f, {
|
|
207
207
|
id: "http.basic.password",
|
|
208
208
|
placeholder: "Password",
|
|
209
209
|
type: "password",
|
|
@@ -217,7 +217,7 @@ const ke = /* @__PURE__ */ Q({
|
|
|
217
217
|
}, 8, ["value"])
|
|
218
218
|
]),
|
|
219
219
|
_: 1
|
|
220
|
-
})) : e.value.type === "http" && e.value.scheme === "bearer" ? (l(), f
|
|
220
|
+
})) : e.value.type === "http" && e.value.scheme === "bearer" ? (l(), m(f, {
|
|
221
221
|
key: 1,
|
|
222
222
|
id: "http.bearer.token",
|
|
223
223
|
placeholder: "Token",
|
|
@@ -229,14 +229,14 @@ const ke = /* @__PURE__ */ Q({
|
|
|
229
229
|
i(" Bearer Token ")
|
|
230
230
|
]),
|
|
231
231
|
_: 1
|
|
232
|
-
}, 8, ["value"])) :
|
|
233
|
-
], 64)) : e.value.type.toLowerCase() === "oauth2" && e.value.flows ? (l(),
|
|
232
|
+
}, 8, ["value"])) : v("", !0)
|
|
233
|
+
], 64)) : e.value.type.toLowerCase() === "oauth2" && e.value.flows ? (l(), m(P, { key: 2 }, {
|
|
234
234
|
default: o(() => {
|
|
235
235
|
var r, s;
|
|
236
236
|
return [
|
|
237
|
-
e.value.flows.implicit ? (l(),
|
|
238
|
-
u(t).oAuth2.accessToken ? (l(),
|
|
239
|
-
c(
|
|
237
|
+
e.value.flows.implicit ? (l(), U(K, { key: 0 }, [
|
|
238
|
+
u(t).oAuth2.accessToken ? (l(), U(K, { key: 0 }, [
|
|
239
|
+
c(f, {
|
|
240
240
|
id: "oAuth2.accessToken",
|
|
241
241
|
placeholder: "xxxxx",
|
|
242
242
|
type: "password",
|
|
@@ -261,13 +261,13 @@ const ke = /* @__PURE__ */ Q({
|
|
|
261
261
|
]),
|
|
262
262
|
_: 1
|
|
263
263
|
})
|
|
264
|
-
], 64)) :
|
|
265
|
-
], 64)) :
|
|
266
|
-
(s = (r = e.value) == null ? void 0 : r.flows) != null && s.password ? (l(),
|
|
264
|
+
], 64)) : v("", !0)
|
|
265
|
+
], 64)) : v("", !0),
|
|
266
|
+
(s = (r = e.value) == null ? void 0 : r.flows) != null && s.password ? (l(), m(j, { key: 1 }, {
|
|
267
267
|
default: o(() => [
|
|
268
|
-
c(
|
|
268
|
+
c(P, null, {
|
|
269
269
|
default: o(() => [
|
|
270
|
-
c(
|
|
270
|
+
c(f, {
|
|
271
271
|
id: "oAuth2.username",
|
|
272
272
|
placeholder: "Username",
|
|
273
273
|
value: u(t).oAuth2.username,
|
|
@@ -278,7 +278,7 @@ const ke = /* @__PURE__ */ Q({
|
|
|
278
278
|
]),
|
|
279
279
|
_: 1
|
|
280
280
|
}, 8, ["value"]),
|
|
281
|
-
c(
|
|
281
|
+
c(f, {
|
|
282
282
|
id: "oAuth2.password",
|
|
283
283
|
placeholder: "Password",
|
|
284
284
|
type: "password",
|
|
@@ -293,16 +293,16 @@ const ke = /* @__PURE__ */ Q({
|
|
|
293
293
|
]),
|
|
294
294
|
_: 1
|
|
295
295
|
}),
|
|
296
|
-
c(
|
|
296
|
+
c(P, null, {
|
|
297
297
|
default: o(() => {
|
|
298
|
-
var d, h,
|
|
298
|
+
var d, h, w, A, k, S, y, b, I, g, z;
|
|
299
299
|
return [
|
|
300
|
-
c(
|
|
300
|
+
c(f, {
|
|
301
301
|
id: "oAuth2.clientId",
|
|
302
302
|
placeholder: "12345",
|
|
303
303
|
type: "text",
|
|
304
304
|
value: u(t).oAuth2.clientId,
|
|
305
|
-
onInput:
|
|
305
|
+
onInput: B
|
|
306
306
|
}, {
|
|
307
307
|
default: o(() => [
|
|
308
308
|
i(" Client ID ")
|
|
@@ -310,20 +310,20 @@ const ke = /* @__PURE__ */ Q({
|
|
|
310
310
|
_: 1
|
|
311
311
|
}, 8, ["value"]),
|
|
312
312
|
e.value !== void 0 && Object.entries(
|
|
313
|
-
((
|
|
314
|
-
).length > 0 ? (l(),
|
|
313
|
+
((w = (h = (d = e.value) == null ? void 0 : d.flows) == null ? void 0 : h.implicit) == null ? void 0 : w.scopes) ?? ((S = (k = (A = e.value) == null ? void 0 : A.flows) == null ? void 0 : k.password) == null ? void 0 : S.scopes) ?? {}
|
|
314
|
+
).length > 0 ? (l(), m(R, {
|
|
315
315
|
key: 0,
|
|
316
|
-
selected:
|
|
317
|
-
"onUpdate:selected": a[1] || (a[1] = (
|
|
318
|
-
scopes: ((
|
|
319
|
-
}, null, 8, ["selected", "scopes"])) :
|
|
316
|
+
selected: C.value,
|
|
317
|
+
"onUpdate:selected": a[1] || (a[1] = (T) => C.value = T),
|
|
318
|
+
scopes: ((I = (b = (y = e.value) == null ? void 0 : y.flows) == null ? void 0 : b.implicit) == null ? void 0 : I.scopes) ?? ((z = (g = e.value) == null ? void 0 : g.flows) == null ? void 0 : z.password.scopes)
|
|
319
|
+
}, null, 8, ["selected", "scopes"])) : v("", !0),
|
|
320
320
|
W("button", {
|
|
321
321
|
class: "cardform-auth-button",
|
|
322
322
|
type: "button",
|
|
323
323
|
onClick: a[2] || (a[2] = () => {
|
|
324
|
-
var
|
|
324
|
+
var T, O;
|
|
325
325
|
return q(
|
|
326
|
-
(
|
|
326
|
+
(O = (T = e.value.flows) == null ? void 0 : T.password) == null ? void 0 : O.tokenUrl,
|
|
327
327
|
{
|
|
328
328
|
baseUrl: u(oe)(u(N)),
|
|
329
329
|
proxy: e.proxy
|
|
@@ -337,18 +337,18 @@ const ke = /* @__PURE__ */ Q({
|
|
|
337
337
|
})
|
|
338
338
|
]),
|
|
339
339
|
_: 1
|
|
340
|
-
})) : (l(),
|
|
340
|
+
})) : (l(), m(j, { key: 2 }, {
|
|
341
341
|
default: o(() => [
|
|
342
|
-
c(
|
|
342
|
+
c(P, null, {
|
|
343
343
|
default: o(() => {
|
|
344
|
-
var d, h;
|
|
344
|
+
var d, h, w, A, k, S;
|
|
345
345
|
return [
|
|
346
|
-
c(
|
|
346
|
+
c(f, {
|
|
347
347
|
id: "oAuth2.clientId",
|
|
348
348
|
placeholder: "12345",
|
|
349
349
|
type: "text",
|
|
350
350
|
value: u(t).oAuth2.clientId,
|
|
351
|
-
onInput:
|
|
351
|
+
onInput: B
|
|
352
352
|
}, {
|
|
353
353
|
default: o(() => [
|
|
354
354
|
i(" Client ID ")
|
|
@@ -356,21 +356,21 @@ const ke = /* @__PURE__ */ Q({
|
|
|
356
356
|
_: 1
|
|
357
357
|
}, 8, ["value"]),
|
|
358
358
|
e.value !== void 0 && Object.entries(
|
|
359
|
-
((d = e.value.flows.implicit) == null ? void 0 : d.scopes) ?? e.value.flows.password.scopes
|
|
360
|
-
).length > 0 ? (l(),
|
|
359
|
+
((d = e.value.flows.implicit) == null ? void 0 : d.scopes) ?? ((h = e.value.flows.password) == null ? void 0 : h.scopes) ?? ((w = e.value.flows.authorizationCode) == null ? void 0 : w.scopes)
|
|
360
|
+
).length > 0 ? (l(), m(R, {
|
|
361
361
|
key: 0,
|
|
362
|
-
selected:
|
|
363
|
-
"onUpdate:selected": a[3] || (a[3] = (
|
|
364
|
-
scopes: ((
|
|
365
|
-
}, null, 8, ["selected", "scopes"])) :
|
|
362
|
+
selected: C.value,
|
|
363
|
+
"onUpdate:selected": a[3] || (a[3] = (y) => C.value = y),
|
|
364
|
+
scopes: ((A = e.value.flows.implicit) == null ? void 0 : A.scopes) ?? ((k = e.value.flows.password) == null ? void 0 : k.scopes) ?? ((S = e.value.flows.authorizationCode) == null ? void 0 : S.scopes)
|
|
365
|
+
}, null, 8, ["selected", "scopes"])) : v("", !0),
|
|
366
366
|
W("button", {
|
|
367
367
|
class: "cardform-auth-button",
|
|
368
368
|
type: "button",
|
|
369
369
|
onClick: a[4] || (a[4] = () => {
|
|
370
|
-
var
|
|
370
|
+
var y, b, I, g;
|
|
371
371
|
return J(
|
|
372
372
|
$(
|
|
373
|
-
((
|
|
373
|
+
((b = (y = e.value) == null ? void 0 : y.flows) == null ? void 0 : b.implicit) ?? ((g = (I = e.value) == null ? void 0 : I.flows) == null ? void 0 : g.password)
|
|
374
374
|
)
|
|
375
375
|
);
|
|
376
376
|
})
|
|
@@ -385,10 +385,10 @@ const ke = /* @__PURE__ */ Q({
|
|
|
385
385
|
];
|
|
386
386
|
}),
|
|
387
387
|
_: 1
|
|
388
|
-
})) :
|
|
388
|
+
})) : v("", !0)
|
|
389
389
|
]),
|
|
390
390
|
_: 1
|
|
391
|
-
})) :
|
|
391
|
+
})) : v("", !0);
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
394
|
});
|