@scalar/api-reference 1.28.26 → 1.28.28
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 +14552 -14442
- 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 +2 -2
- package/dist/components/Content/Content.vue2.js +17 -17
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +111 -40
- 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 +34 -33
- 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 +154 -141
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +31 -26
- package/dist/features/ApiClientModal/useApiClient.d.ts +26 -26
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AA2RA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAiBhD,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,IAAI,CAAA;IAChB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;AAyDJ,iBAAS,cAAc;WAgOT,OAAO,IAA6B;;uBAVvB,GAAG;+BACM,GAAG;qBACb,GAAG;;;;EAa5B;AA6BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YA7TR,QAAQ,GAAG,SAAS;6EAoU/B,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"}
|
|
@@ -2,7 +2,7 @@ import o from "./Content.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cdc3d662"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
_ as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, computed as p, openBlock as t, createElementBlock as i, Fragment as u, createStaticVNode as G, createElementVNode as V, renderSlot as m, createBlock as a, unref as r, createCommentVNode as
|
|
1
|
+
import { defineComponent as F, computed as p, openBlock as t, createElementBlock as i, Fragment as u, createStaticVNode as G, createElementVNode as V, renderSlot as m, createBlock as a, unref as r, createCommentVNode as c, withCtx as E, createVNode as v, normalizeClass as I, renderList as O } from "vue";
|
|
2
2
|
import { useWorkspace as R, useActiveEntities as D } from "@scalar/api-client/store";
|
|
3
3
|
import { RequestAuth as H } from "@scalar/api-client/views/Request/RequestSection/RequestAuth";
|
|
4
4
|
import { ScalarErrorBoundary as J } from "@scalar/components";
|
|
@@ -18,10 +18,10 @@ import { getModels as f } from "../../helpers/getModels.js";
|
|
|
18
18
|
import { hasModels as re } from "../../helpers/hasModels.js";
|
|
19
19
|
const se = { class: "narrow-references-container" }, te = {
|
|
20
20
|
key: 0,
|
|
21
|
-
class: "scalar-client introduction-card-item divide-y text-sm [--scalar-address-bar-height:0px]"
|
|
21
|
+
class: "scalar-reference-intro-server scalar-client introduction-card-item divide-y text-sm [--scalar-address-bar-height:0px]"
|
|
22
22
|
}, ae = {
|
|
23
23
|
key: 1,
|
|
24
|
-
class: "scalar-client introduction-card-item"
|
|
24
|
+
class: "scalar-reference-intro-auth scalar-client introduction-card-item"
|
|
25
25
|
}, we = /* @__PURE__ */ F({
|
|
26
26
|
__name: "Content",
|
|
27
27
|
props: {
|
|
@@ -41,7 +41,7 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
41
41
|
return e;
|
|
42
42
|
}
|
|
43
43
|
return W.value;
|
|
44
|
-
}),
|
|
44
|
+
}), l = p(() => {
|
|
45
45
|
if (s.value) {
|
|
46
46
|
if (s.value.selectedServerUid) {
|
|
47
47
|
const e = y[s.value.selectedServerUid];
|
|
@@ -56,7 +56,7 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
56
56
|
return (e, k) => {
|
|
57
57
|
var g, b, C, w;
|
|
58
58
|
return t(), i(u, null, [
|
|
59
|
-
k[0] || (k[0] = G('<div class="section-flare" data-v-
|
|
59
|
+
k[0] || (k[0] = G('<div class="section-flare" data-v-cdc3d662><div class="section-flare-item" data-v-cdc3d662></div><div class="section-flare-item" data-v-cdc3d662></div><div class="section-flare-item" data-v-cdc3d662></div><div class="section-flare-item" data-v-cdc3d662></div><div class="section-flare-item" data-v-cdc3d662></div><div class="section-flare-item" data-v-cdc3d662></div><div class="section-flare-item" data-v-cdc3d662></div><div class="section-flare-item" data-v-cdc3d662></div></div>', 1)),
|
|
60
60
|
V("div", se, [
|
|
61
61
|
m(e.$slots, "start", {}, void 0, !0),
|
|
62
62
|
s.value ? (t(), a(r(Q), {
|
|
@@ -64,8 +64,8 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
64
64
|
collection: s.value,
|
|
65
65
|
layout: e.layout,
|
|
66
66
|
parsedSpec: e.parsedSpec,
|
|
67
|
-
server:
|
|
68
|
-
}, null, 8, ["collection", "layout", "parsedSpec", "server"])) :
|
|
67
|
+
server: l.value
|
|
68
|
+
}, null, 8, ["collection", "layout", "parsedSpec", "server"])) : c("", !0),
|
|
69
69
|
(b = (g = e.parsedSpec) == null ? void 0 : g.info) != null && b.title || (w = (C = e.parsedSpec) == null ? void 0 : C.info) != null && w.description ? (t(), a(r(T), {
|
|
70
70
|
key: 1,
|
|
71
71
|
info: e.parsedSpec.info,
|
|
@@ -82,9 +82,9 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
82
82
|
(o = (n = s.value) == null ? void 0 : n.servers) != null && o.length ? (t(), i("div", te, [
|
|
83
83
|
v(r(X), {
|
|
84
84
|
collection: s.value,
|
|
85
|
-
server:
|
|
85
|
+
server: l.value
|
|
86
86
|
}, null, 8, ["collection", "server"])
|
|
87
|
-
])) :
|
|
87
|
+
])) : c("", !0),
|
|
88
88
|
s.value && r(h) && Object.keys(r(N) ?? {}).length ? (t(), i("div", ae, [
|
|
89
89
|
v(r(H), {
|
|
90
90
|
collection: s.value,
|
|
@@ -92,12 +92,12 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
92
92
|
environment: r(j),
|
|
93
93
|
layout: "reference",
|
|
94
94
|
selectedSecuritySchemeUids: ((d = s.value) == null ? void 0 : d.selectedSecuritySchemeUids) ?? [],
|
|
95
|
-
server:
|
|
95
|
+
server: l.value,
|
|
96
96
|
title: "Authentication",
|
|
97
97
|
workspace: r(h)
|
|
98
98
|
}, null, 8, ["collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])
|
|
99
|
-
])) :
|
|
100
|
-
v(r(Y), { class: "introduction-card-item" })
|
|
99
|
+
])) : c("", !0),
|
|
100
|
+
v(r(Y), { class: "introduction-card-item scalar-reference-intro-clients" })
|
|
101
101
|
], 2)
|
|
102
102
|
];
|
|
103
103
|
}),
|
|
@@ -111,7 +111,7 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
111
111
|
key: n.name,
|
|
112
112
|
collection: s.value,
|
|
113
113
|
layout: e.layout,
|
|
114
|
-
server:
|
|
114
|
+
server: l.value,
|
|
115
115
|
spec: e.parsedSpec,
|
|
116
116
|
tags: n.tags.map((o) => {
|
|
117
117
|
var d;
|
|
@@ -122,15 +122,15 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
122
122
|
collection: s.value,
|
|
123
123
|
layout: e.layout,
|
|
124
124
|
schemas: r(f)(e.parsedSpec),
|
|
125
|
-
server:
|
|
125
|
+
server: l.value,
|
|
126
126
|
spec: e.parsedSpec,
|
|
127
127
|
tags: e.parsedSpec.tags
|
|
128
128
|
}, null, 8, ["collection", "layout", "schemas", "server", "spec", "tags"]))
|
|
129
|
-
], 64)) :
|
|
129
|
+
], 64)) : c("", !0),
|
|
130
130
|
e.parsedSpec.webhooks ? (t(), a(r(Z), {
|
|
131
131
|
key: 4,
|
|
132
132
|
webhooks: e.parsedSpec.webhooks
|
|
133
|
-
}, null, 8, ["webhooks"])) :
|
|
133
|
+
}, null, 8, ["webhooks"])) : c("", !0),
|
|
134
134
|
r(re)(e.parsedSpec) && !r(A) ? (t(), i(u, { key: 5 }, [
|
|
135
135
|
e.layout === "classic" ? (t(), a(r(_), {
|
|
136
136
|
key: 0,
|
|
@@ -139,7 +139,7 @@ const se = { class: "narrow-references-container" }, te = {
|
|
|
139
139
|
key: 1,
|
|
140
140
|
schemas: r(f)(e.parsedSpec)
|
|
141
141
|
}, null, 8, ["schemas"]))
|
|
142
|
-
], 64)) :
|
|
142
|
+
], 64)) : c("", !0),
|
|
143
143
|
m(e.$slots, "end", {}, void 0, !0)
|
|
144
144
|
])
|
|
145
145
|
], 64);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AA4UA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAU9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,YAAY,GACtB,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;WAfQ,MAAM;oBAMG,OAAO;;AAoX5B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Schema.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9d26eedb"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AA+QA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAU9E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA4UF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaDiscriminator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-97ac13d3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TabGroup as
|
|
3
|
-
import { cva as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { defineComponent as B, ref as v, onMounted as N, nextTick as L, computed as C, openBlock as n, createElementBlock as b, createBlock as i, unref as l, withCtx as o, createVNode as u, createElementVNode as m, toDisplayString as y, Fragment as V, renderList as O, normalizeClass as T } from "vue";
|
|
2
|
+
import { TabGroup as U, TabList as A, Tab as D, TabPanel as H } from "@headlessui/vue";
|
|
3
|
+
import { cva as $, cx as w, ScalarListbox as E } from "@scalar/components";
|
|
4
|
+
import { ScalarIconCaretDown as F } from "@scalar/icons";
|
|
5
|
+
import { stringify as z } from "flatted";
|
|
6
|
+
import { mergeAllOfSchemas as I } from "./helpers/merge-all-of-schemas.js";
|
|
7
|
+
import h from "./Schema.vue.js";
|
|
8
|
+
const M = { class: "property-rule" }, W = { class: "text-c-3" }, G = { class: "schema-tab-label z-1 relative" }, P = { class: "schema-tab-label z-1 text-c-1 relative" }, x = /* @__PURE__ */ B({
|
|
8
9
|
__name: "SchemaDiscriminator",
|
|
9
10
|
props: {
|
|
10
11
|
discriminator: {},
|
|
@@ -15,8 +16,15 @@ const L = { class: "property-rule" }, A = { class: "text-c-3" }, D = { class: "c
|
|
|
15
16
|
compact: { type: Boolean },
|
|
16
17
|
hideHeading: { type: Boolean }
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
19
|
+
setup(s) {
|
|
20
|
+
const r = v(0), d = v(null), p = v(!1);
|
|
21
|
+
N(async () => {
|
|
22
|
+
if (await L(), d.value) {
|
|
23
|
+
const e = d.value;
|
|
24
|
+
p.value = e.scrollWidth > e.clientWidth;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const g = $({
|
|
20
28
|
base: "schema-tab",
|
|
21
29
|
variants: {
|
|
22
30
|
selected: {
|
|
@@ -24,73 +32,136 @@ const L = { class: "property-rule" }, A = { class: "text-c-3" }, D = { class: "c
|
|
|
24
32
|
false: "text-c-3"
|
|
25
33
|
}
|
|
26
34
|
}
|
|
27
|
-
}), k = (
|
|
35
|
+
}), k = C(
|
|
36
|
+
() => s.value[s.discriminator].map((e, a) => ({
|
|
37
|
+
id: String(a),
|
|
38
|
+
label: S(e) || "Schema"
|
|
39
|
+
}))
|
|
40
|
+
), f = C({
|
|
41
|
+
get: () => k.value.find(
|
|
42
|
+
(e) => e.id === String(r.value)
|
|
43
|
+
),
|
|
44
|
+
set: (e) => r.value = Number(e.id)
|
|
45
|
+
}), S = (e) => {
|
|
28
46
|
if (!e)
|
|
29
47
|
return null;
|
|
30
48
|
if (e.name)
|
|
31
49
|
return e.name;
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
if (e.title)
|
|
51
|
+
return e.title;
|
|
52
|
+
if (s.schemas && typeof s.schemas == "object") {
|
|
53
|
+
for (const [a, t] of Object.entries(s.schemas))
|
|
54
|
+
if (z(t) === z(e))
|
|
55
|
+
return a;
|
|
36
56
|
return Object.keys(e)[0];
|
|
37
57
|
}
|
|
58
|
+
if (e.type === "array" && e.items)
|
|
59
|
+
return `Array of ${e.items.type || "any"}`;
|
|
60
|
+
if (e.type)
|
|
61
|
+
return e.type;
|
|
62
|
+
if (typeof e == "object") {
|
|
63
|
+
const a = Object.keys(e);
|
|
64
|
+
if (a.length > 0)
|
|
65
|
+
return a[0];
|
|
66
|
+
}
|
|
38
67
|
return null;
|
|
39
|
-
},
|
|
40
|
-
return (e,
|
|
41
|
-
e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
}, j = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (a) => a.toUpperCase()).toLowerCase().replace(/^(\w)/, (a) => a.toUpperCase());
|
|
69
|
+
return (e, a) => (n(), b("div", M, [
|
|
70
|
+
e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (n(), i(l(U), {
|
|
71
|
+
key: 0,
|
|
72
|
+
modelValue: r.value,
|
|
73
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => r.value = t),
|
|
74
|
+
as: "div"
|
|
75
|
+
}, {
|
|
76
|
+
default: o(() => [
|
|
77
|
+
u(l(A), { class: "discriminator-tab-list py-1.25 flex flex-col gap-1 rounded-t-lg border border-b-0 px-2 pr-3" }, {
|
|
78
|
+
default: o(() => [
|
|
79
|
+
m("span", W, y(j(e.discriminator)), 1),
|
|
80
|
+
m("div", {
|
|
81
|
+
ref_key: "tabsContainer",
|
|
82
|
+
ref: d,
|
|
83
|
+
class: "flex items-center gap-1.5"
|
|
84
|
+
}, [
|
|
85
|
+
p.value ? (n(), i(l(E), {
|
|
86
|
+
key: 1,
|
|
87
|
+
modelValue: f.value,
|
|
88
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => f.value = t),
|
|
89
|
+
options: k.value,
|
|
90
|
+
resize: ""
|
|
91
|
+
}, {
|
|
92
|
+
default: o(() => {
|
|
93
|
+
var t;
|
|
94
|
+
return [
|
|
95
|
+
m("div", {
|
|
96
|
+
class: T(["flex cursor-pointer items-center gap-1", l(w)(l(g)({ selected: !0 }))])
|
|
97
|
+
}, [
|
|
98
|
+
m("span", P, y(((t = f.value) == null ? void 0 : t.label) || "Schema"), 1),
|
|
99
|
+
u(l(F), { class: "z-1" })
|
|
100
|
+
], 2)
|
|
101
|
+
];
|
|
102
|
+
}),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 8, ["modelValue", "options"])) : (n(!0), b(V, { key: 0 }, O(e.value[e.discriminator], (t, c) => (n(), i(l(D), {
|
|
105
|
+
key: c,
|
|
106
|
+
class: T(
|
|
107
|
+
l(w)(l(g)({ selected: r.value === c }))
|
|
108
|
+
),
|
|
109
|
+
onClick: (Z) => r.value = c
|
|
54
110
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
m("span",
|
|
111
|
+
default: o(() => [
|
|
112
|
+
m("span", G, y(S(t) || "Schema"), 1)
|
|
57
113
|
]),
|
|
58
114
|
_: 2
|
|
59
115
|
}, 1032, ["class", "onClick"]))), 128))
|
|
60
|
-
])
|
|
116
|
+
], 512)
|
|
61
117
|
]),
|
|
62
118
|
_: 1
|
|
63
119
|
}),
|
|
64
|
-
|
|
65
|
-
key:
|
|
120
|
+
p.value ? (n(), i(l(H), {
|
|
121
|
+
key: 1,
|
|
122
|
+
class: "discriminator-panel"
|
|
123
|
+
}, {
|
|
124
|
+
default: o(() => [
|
|
125
|
+
u(h, {
|
|
126
|
+
compact: e.compact,
|
|
127
|
+
hideHeading: e.hideHeading,
|
|
128
|
+
name: e.name,
|
|
129
|
+
noncollapsible: !0,
|
|
130
|
+
schemas: e.schemas,
|
|
131
|
+
value: e.value[e.discriminator][r.value]
|
|
132
|
+
}, null, 8, ["compact", "hideHeading", "name", "schemas", "value"])
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})) : (n(!0), b(V, { key: 0 }, O(e.value[e.discriminator], (t, c) => (n(), i(l(H), {
|
|
136
|
+
key: c,
|
|
66
137
|
class: "discriminator-panel"
|
|
67
138
|
}, {
|
|
68
|
-
default:
|
|
69
|
-
u(
|
|
139
|
+
default: o(() => [
|
|
140
|
+
u(h, {
|
|
70
141
|
compact: e.compact,
|
|
71
142
|
hideHeading: e.hideHeading,
|
|
72
143
|
name: e.name,
|
|
73
144
|
noncollapsible: !0,
|
|
74
145
|
schemas: e.schemas,
|
|
75
|
-
value:
|
|
146
|
+
value: t
|
|
76
147
|
}, null, 8, ["compact", "hideHeading", "name", "schemas", "value"])
|
|
77
148
|
]),
|
|
78
149
|
_: 2
|
|
79
150
|
}, 1024))), 128))
|
|
80
151
|
]),
|
|
81
152
|
_: 1
|
|
82
|
-
})) : (
|
|
153
|
+
}, 8, ["modelValue"])) : (n(), i(h, {
|
|
83
154
|
key: 1,
|
|
84
155
|
compact: e.compact,
|
|
85
156
|
level: e.level,
|
|
86
157
|
name: e.name,
|
|
87
158
|
noncollapsible: e.level == 0,
|
|
88
159
|
schemas: e.schemas,
|
|
89
|
-
value:
|
|
160
|
+
value: l(I)(e.value[e.discriminator])
|
|
90
161
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))
|
|
91
162
|
]));
|
|
92
163
|
}
|
|
93
164
|
});
|
|
94
165
|
export {
|
|
95
|
-
|
|
166
|
+
x as default
|
|
96
167
|
};
|
|
@@ -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":"AA0gBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAe9C;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,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,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAmd1B,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 a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-82c33291"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, computed as y, openBlock as l, createBlock as h, resolveDynamicComponent as M, normalizeClass as I, withCtx as m, createSlots as G, createTextVNode as D, toDisplayString as c, createCommentVNode as r, createElementBlock as
|
|
1
|
+
import { defineComponent as $, computed as y, openBlock as l, createBlock as h, resolveDynamicComponent as M, normalizeClass as I, withCtx as m, createSlots as G, createTextVNode as D, toDisplayString as c, createCommentVNode as r, createElementBlock as s, createVNode as a, unref as i, Fragment as d, renderList as k, createElementVNode as f } from "vue";
|
|
2
2
|
import { Disclosure as J, DisclosurePanel as K, DisclosureButton as Q } from "@headlessui/vue";
|
|
3
3
|
import { ScalarMarkdown as S, ScalarIcon as W } from "@scalar/components";
|
|
4
4
|
import { optimizeValueForDisplay as X, discriminators as Y } from "./helpers/optimizeValueForDisplay.js";
|
|
@@ -18,7 +18,7 @@ const ne = {
|
|
|
18
18
|
}, oe = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "property-list"
|
|
21
|
-
},
|
|
21
|
+
}, se = { class: "property-heading" }, ae = { class: "property-name" }, ie = { class: "property-description" }, re = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "property-enum-values"
|
|
24
24
|
}, pe = { class: "property-enum-value-label" }, me = { class: "property-enum-value-label" }, ce = {
|
|
@@ -81,7 +81,7 @@ const ne = {
|
|
|
81
81
|
]])
|
|
82
82
|
}, {
|
|
83
83
|
default: m(() => {
|
|
84
|
-
var b, v, w, q,
|
|
84
|
+
var b, v, w, q, F, N, V, j, z;
|
|
85
85
|
return [
|
|
86
86
|
Z(
|
|
87
87
|
n.value,
|
|
@@ -95,7 +95,8 @@ const ne = {
|
|
|
95
95
|
enum: p(n.value).length > 0,
|
|
96
96
|
pattern: e.pattern,
|
|
97
97
|
required: e.required,
|
|
98
|
-
value: n.value
|
|
98
|
+
value: n.value,
|
|
99
|
+
schemas: e.schemas
|
|
99
100
|
}, G({ _: 2 }, [
|
|
100
101
|
e.name ? {
|
|
101
102
|
name: "name",
|
|
@@ -111,43 +112,43 @@ const ne = {
|
|
|
111
112
|
]),
|
|
112
113
|
key: "1"
|
|
113
114
|
} : void 0
|
|
114
|
-
]), 1032, ["additional", "enum", "pattern", "required", "value"])) : r("", !0),
|
|
115
|
-
B(e.description, n.value) ? (l(),
|
|
116
|
-
i(
|
|
115
|
+
]), 1032, ["additional", "enum", "pattern", "required", "value", "schemas"])) : r("", !0),
|
|
116
|
+
B(e.description, n.value) ? (l(), s("div", ne, [
|
|
117
|
+
a(i(S), {
|
|
117
118
|
value: B(e.description, n.value)
|
|
118
119
|
}, null, 8, ["value"])
|
|
119
|
-
])) : E(n.value) ? (l(),
|
|
120
|
-
i(
|
|
120
|
+
])) : E(n.value) ? (l(), s("div", te, [
|
|
121
|
+
a(i(S), {
|
|
121
122
|
value: E(n.value) || ""
|
|
122
123
|
}, null, 8, ["value"])
|
|
123
124
|
])) : r("", !0),
|
|
124
|
-
((v = p(n.value)) == null ? void 0 : v.length) > 0 ? (l(),
|
|
125
|
-
Array.isArray((w = n.value) == null ? void 0 : w["x-enumDescriptions"]) ? (l(),
|
|
126
|
-
(l(!0),
|
|
125
|
+
((v = p(n.value)) == null ? void 0 : v.length) > 0 ? (l(), s("div", le, [
|
|
126
|
+
Array.isArray((w = n.value) == null ? void 0 : w["x-enumDescriptions"]) ? (l(), s("div", oe, [
|
|
127
|
+
(l(!0), s(d, null, k(p(n.value), (o) => (l(), s("div", {
|
|
127
128
|
key: o,
|
|
128
129
|
class: "property"
|
|
129
130
|
}, [
|
|
130
|
-
f("div", ae, [
|
|
131
|
-
f("div", ie, c(o), 1)
|
|
132
|
-
]),
|
|
133
131
|
f("div", se, [
|
|
134
|
-
|
|
132
|
+
f("div", ae, c(o), 1)
|
|
133
|
+
]),
|
|
134
|
+
f("div", ie, [
|
|
135
|
+
a(i(S), {
|
|
135
136
|
value: n.value["x-enumDescriptions"][o]
|
|
136
137
|
}, null, 8, ["value"])
|
|
137
138
|
])
|
|
138
139
|
]))), 128))
|
|
139
|
-
])) : (l(),
|
|
140
|
-
(l(!0),
|
|
140
|
+
])) : (l(), s("ul", re, [
|
|
141
|
+
(l(!0), s(d, null, k(T.value, (o) => (l(), s("li", {
|
|
141
142
|
key: o,
|
|
142
143
|
class: "property-enum-value"
|
|
143
144
|
}, [
|
|
144
145
|
f("span", pe, c(o), 1)
|
|
145
146
|
]))), 128)),
|
|
146
|
-
C.value ? (l(), h(
|
|
147
|
+
C.value ? (l(), h(i(J), { key: 0 }, {
|
|
147
148
|
default: m(({ open: o }) => [
|
|
148
|
-
i(
|
|
149
|
+
a(i(K), null, {
|
|
149
150
|
default: m(() => [
|
|
150
|
-
(l(!0),
|
|
151
|
+
(l(!0), s(d, null, k(U.value, (u) => (l(), s("li", {
|
|
151
152
|
key: u,
|
|
152
153
|
class: "property-enum-value"
|
|
153
154
|
}, [
|
|
@@ -156,9 +157,9 @@ const ne = {
|
|
|
156
157
|
]),
|
|
157
158
|
_: 1
|
|
158
159
|
}),
|
|
159
|
-
i(
|
|
160
|
+
a(i(Q), { class: "enum-toggle-button" }, {
|
|
160
161
|
default: m(() => [
|
|
161
|
-
i(
|
|
162
|
+
a(i(W), {
|
|
162
163
|
class: I(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
|
|
163
164
|
icon: "Add",
|
|
164
165
|
size: "sm"
|
|
@@ -172,8 +173,8 @@ const ne = {
|
|
|
172
173
|
})) : r("", !0)
|
|
173
174
|
]))
|
|
174
175
|
])) : r("", !0),
|
|
175
|
-
((q = n.value) == null ? void 0 : q.type) === "object" && ((
|
|
176
|
-
|
|
176
|
+
((q = n.value) == null ? void 0 : q.type) === "object" && ((F = n.value) != null && F.properties || (N = n.value) != null && N.additionalProperties) ? (l(), s("div", ce, [
|
|
177
|
+
a(L, {
|
|
177
178
|
compact: e.compact,
|
|
178
179
|
level: e.level + 1,
|
|
179
180
|
name: e.name,
|
|
@@ -181,9 +182,9 @@ const ne = {
|
|
|
181
182
|
value: n.value
|
|
182
183
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "value"])
|
|
183
184
|
])) : r("", !0),
|
|
184
|
-
(
|
|
185
|
-
["object"].includes((
|
|
186
|
-
|
|
185
|
+
(V = n.value) != null && V.items && typeof n.value.items == "object" && "type" in n.value.items && typeof n.value.items.type == "string" ? (l(), s(d, { key: 5 }, [
|
|
186
|
+
["object"].includes((z = (j = n.value) == null ? void 0 : j.items) == null ? void 0 : z.type) ? (l(), s("div", de, [
|
|
187
|
+
a(L, {
|
|
187
188
|
compact: e.compact,
|
|
188
189
|
level: e.level + 1,
|
|
189
190
|
name: e.name,
|
|
@@ -192,9 +193,9 @@ const ne = {
|
|
|
192
193
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "value"])
|
|
193
194
|
])) : r("", !0)
|
|
194
195
|
], 64)) : r("", !0),
|
|
195
|
-
(l(!0),
|
|
196
|
-
var u,
|
|
197
|
-
return l(),
|
|
196
|
+
(l(!0), s(d, null, k(i(Y), (o) => {
|
|
197
|
+
var u, A;
|
|
198
|
+
return l(), s(d, { key: o }, [
|
|
198
199
|
(u = n.value) != null && u[o] ? (l(), h(O, {
|
|
199
200
|
key: 0,
|
|
200
201
|
compact: e.compact,
|
|
@@ -205,7 +206,7 @@ const ne = {
|
|
|
205
206
|
noncollapsible: e.noncollapsible,
|
|
206
207
|
schemas: e.schemas,
|
|
207
208
|
value: n.value
|
|
208
|
-
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (
|
|
209
|
+
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (A = n.value) != null && A.items && typeof o == "string" && typeof n.value.items == "object" && o in n.value.items ? (l(), h(O, {
|
|
209
210
|
key: 1,
|
|
210
211
|
compact: e.compact,
|
|
211
212
|
discriminator: o,
|
|
@@ -218,7 +219,7 @@ const ne = {
|
|
|
218
219
|
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : r("", !0)
|
|
219
220
|
], 64);
|
|
220
221
|
}), 128)),
|
|
221
|
-
i(
|
|
222
|
+
a(i(ee), { value: n.value }, null, 8, ["value"])
|
|
222
223
|
];
|
|
223
224
|
}),
|
|
224
225
|
_: 1
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
value?: Record<string, any>;
|
|
3
4
|
enum?: boolean;
|
|
@@ -5,6 +6,7 @@ type __VLS_Props = {
|
|
|
5
6
|
additional?: boolean;
|
|
6
7
|
pattern?: boolean;
|
|
7
8
|
withExamples?: boolean;
|
|
9
|
+
schemas?: OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject> | Record<string, OpenAPIV3_1.SchemaObject> | unknown;
|
|
8
10
|
};
|
|
9
11
|
declare function __VLS_template(): {
|
|
10
12
|
attrs: Partial<{}>;
|
|
@@ -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":"AAyRA,OAAO,KAAK,EAEV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAY9B,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;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;AA0DJ,iBAAS,cAAc;WA+TT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAzZN,OAAO;kBAGH,OAAO;wFA8ZxB,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
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a7691560"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|