@scalar/api-reference 1.25.116 → 1.25.118
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 +52 -0
- package/dist/browser/standalone.js +8700 -8579
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +39 -38
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -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 +124 -120
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +1 -3
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +194 -114
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +96 -104
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -91
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +6 -4
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +7 -7
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts +1 -1
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useConfig.js +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -11
- package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts +0 -6
- package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts.map +0 -1
- package/dist/features/ExampleRequest/helpers/filter-security-requirements.js +0 -17
- package/dist/helpers/convert-to-har-request.d.ts +0 -28
- package/dist/helpers/convert-to-har-request.d.ts.map +0 -1
- package/dist/helpers/convert-to-har-request.js +0 -64
- package/dist/helpers/get-example-code.d.ts +0 -9
- package/dist/helpers/get-example-code.d.ts.map +0 -1
- package/dist/helpers/get-example-code.js +0 -51
|
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10065932"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -136,7 +136,7 @@ const We = ["innerHTML"], Ge = { class: "references-header" }, Ke = {
|
|
|
136
136
|
{ immediate: !0 }
|
|
137
137
|
), v(Ce, w);
|
|
138
138
|
const oe = Te(w);
|
|
139
|
-
v($e, oe), v(ye, "modal"), v(he, o.configuration);
|
|
139
|
+
v($e, oe), v(ye, "modal"), v(he, o.configuration ?? {});
|
|
140
140
|
function L(e, t) {
|
|
141
141
|
T(
|
|
142
142
|
() => o.configuration[e],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAkBhD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CACX,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CACrE,CAAA;IACD,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;AAwCF,iBAAS,cAAc;WAyIT,OAAO,IAA6B;;uBATtB,GAAG;uBACH,GAAG;;;;EAa9B;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,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 "./Introduction.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-0336cd4f"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,73 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import { defineComponent as $, computed as u, onMounted as w, openBlock as l, createBlock as s, unref as t, withCtx as i, createVNode as n, createElementVNode as S, createTextVNode as f, toDisplayString as d, createCommentVNode as p, renderSlot as _ } from "vue";
|
|
2
|
+
import { useConfig as N } from "../../../hooks/useConfig.js";
|
|
3
|
+
import T from "github-slugger";
|
|
4
|
+
import b from "../../../features/DownloadLink/DownloadLink.vue.js";
|
|
5
|
+
import B from "./Description.vue.js";
|
|
6
|
+
import D from "../../Section/SectionContainer.vue.js";
|
|
7
|
+
import H from "../../Section/Section.vue.js";
|
|
8
|
+
import A from "../../Section/SectionContent.vue.js";
|
|
9
|
+
import C from "../../Badge/Badge.vue.js";
|
|
10
|
+
import E from "../../Section/SectionHeader.vue.js";
|
|
11
|
+
import F from "../../Section/SectionColumns.vue.js";
|
|
11
12
|
import k from "../../Section/SectionColumn.vue.js";
|
|
12
|
-
const
|
|
13
|
+
const G = { class: "badges" }, I = { class: "sticky-cards" }, W = /* @__PURE__ */ $({
|
|
13
14
|
__name: "Introduction",
|
|
14
15
|
props: {
|
|
15
16
|
info: {},
|
|
16
17
|
parsedSpec: {}
|
|
17
18
|
},
|
|
18
19
|
setup(y) {
|
|
19
|
-
const o = y,
|
|
20
|
+
const o = y, m = u(
|
|
20
21
|
() => {
|
|
21
22
|
var e, r;
|
|
22
23
|
return ((e = o.parsedSpec) == null ? void 0 : e.openapi) ?? ((r = o.parsedSpec) == null ? void 0 : r.swagger) ?? "";
|
|
23
24
|
}
|
|
24
|
-
),
|
|
25
|
+
), h = new T(), V = u(() => {
|
|
25
26
|
var e;
|
|
26
|
-
return
|
|
27
|
-
}), c =
|
|
27
|
+
return h.slug(((e = o.info) == null ? void 0 : e.title) ?? "");
|
|
28
|
+
}), c = u(() => {
|
|
28
29
|
var e, r;
|
|
29
30
|
return typeof ((e = o.info) == null ? void 0 : e.version) == "string" ? o.info.version.toString().match(/^\d/) ? `v${o.info.version}` : o.info.version : typeof ((r = o.info) == null ? void 0 : r.version) == "number" ? `v${o.info.version}` : void 0;
|
|
30
|
-
});
|
|
31
|
-
return (e, r) => (l(), s(t(
|
|
31
|
+
}), { onLoaded: a } = N();
|
|
32
|
+
return w(() => a == null ? void 0 : a()), (e, r) => (l(), s(t(D), null, {
|
|
32
33
|
default: i(() => [
|
|
33
|
-
n(t(
|
|
34
|
+
n(t(H), { class: "introduction-section gap-12" }, {
|
|
34
35
|
default: i(() => {
|
|
35
|
-
var
|
|
36
|
+
var v, g;
|
|
36
37
|
return [
|
|
37
|
-
n(t(
|
|
38
|
-
loading: !((
|
|
38
|
+
n(t(A), {
|
|
39
|
+
loading: !((v = e.info) != null && v.description) && !((g = e.info) != null && g.title)
|
|
39
40
|
}, {
|
|
40
41
|
default: i(() => [
|
|
41
|
-
|
|
42
|
-
c.value ? (l(), s(t(
|
|
42
|
+
S("div", G, [
|
|
43
|
+
c.value ? (l(), s(t(C), { key: 0 }, {
|
|
43
44
|
default: i(() => [
|
|
44
|
-
d(
|
|
45
|
+
f(d(c.value), 1)
|
|
45
46
|
]),
|
|
46
47
|
_: 1
|
|
47
|
-
})) :
|
|
48
|
-
|
|
48
|
+
})) : p("", !0),
|
|
49
|
+
m.value ? (l(), s(t(C), { key: 1 }, {
|
|
49
50
|
default: i(() => [
|
|
50
|
-
|
|
51
|
+
f("OAS " + d(m.value), 1)
|
|
51
52
|
]),
|
|
52
53
|
_: 1
|
|
53
|
-
})) :
|
|
54
|
+
})) : p("", !0)
|
|
54
55
|
]),
|
|
55
|
-
n(t(
|
|
56
|
+
n(t(E), {
|
|
56
57
|
level: 1,
|
|
57
58
|
loading: !e.info.title,
|
|
58
59
|
tight: ""
|
|
59
60
|
}, {
|
|
60
61
|
default: i(() => [
|
|
61
|
-
d(
|
|
62
|
+
f(d(e.info.title), 1)
|
|
62
63
|
]),
|
|
63
64
|
_: 1
|
|
64
65
|
}, 8, ["loading"]),
|
|
65
|
-
n(
|
|
66
|
-
n(t(
|
|
66
|
+
n(b, { specTitle: V.value }, null, 8, ["specTitle"]),
|
|
67
|
+
n(t(F), null, {
|
|
67
68
|
default: i(() => [
|
|
68
69
|
n(t(k), null, {
|
|
69
70
|
default: i(() => [
|
|
70
|
-
n(
|
|
71
|
+
n(B, {
|
|
71
72
|
value: e.info.description
|
|
72
73
|
}, null, 8, ["value"])
|
|
73
74
|
]),
|
|
@@ -75,19 +76,19 @@ const A = { class: "badges" }, E = { class: "sticky-cards" }, P = /* @__PURE__ *
|
|
|
75
76
|
}),
|
|
76
77
|
e.$slots.aside ? (l(), s(t(k), { key: 0 }, {
|
|
77
78
|
default: i(() => [
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
S("div", I, [
|
|
80
|
+
_(e.$slots, "aside", {}, void 0, !0)
|
|
80
81
|
])
|
|
81
82
|
]),
|
|
82
83
|
_: 3
|
|
83
|
-
})) :
|
|
84
|
+
})) : p("", !0)
|
|
84
85
|
]),
|
|
85
86
|
_: 3
|
|
86
87
|
})
|
|
87
88
|
]),
|
|
88
89
|
_: 3
|
|
89
90
|
}, 8, ["loading"]),
|
|
90
|
-
|
|
91
|
+
_(e.$slots, "after", {}, void 0, !0)
|
|
91
92
|
];
|
|
92
93
|
}),
|
|
93
94
|
_: 3
|
|
@@ -98,5 +99,5 @@ const A = { class: "badges" }, E = { class: "sticky-cards" }, P = /* @__PURE__ *
|
|
|
98
99
|
}
|
|
99
100
|
});
|
|
100
101
|
export {
|
|
101
|
-
|
|
102
|
+
W as default
|
|
102
103
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Note: We’re taking in a prop called `value` which should be a JSON Schema.
|
|
3
|
+
*
|
|
4
|
+
* We’re using `optimizeValueForDisplay` to merge null types in discriminators (anyOf, allOf, oneOf, not).
|
|
5
|
+
* So you should basically use the optimizedValue everywhere in the component.
|
|
6
|
+
*/
|
|
1
7
|
type __VLS_Props = {
|
|
2
8
|
value?: Record<string, any>;
|
|
3
9
|
level?: number;
|
|
@@ -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":"AAqfA;;;;;GAKG;AAEH,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,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;cANW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AA2b1B,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-17d98b59"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { formatExample as
|
|
3
|
-
import { optimizeValueForDisplay as
|
|
4
|
-
import { Disclosure as
|
|
5
|
-
import { ScalarMarkdown as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as Y, computed as h, openBlock as l, createElementBlock as a, normalizeClass as G, createVNode as i, createSlots as ee, withCtx as g, createTextVNode as k, toDisplayString as u, unref as s, createCommentVNode as n, createElementVNode as y, Fragment as p, renderList as m, createBlock as _ } from "vue";
|
|
2
|
+
import { formatExample as te } from "./helpers/formatExample.js";
|
|
3
|
+
import { optimizeValueForDisplay as le, discriminators as J } from "./helpers/optimizeValueForDisplay.js";
|
|
4
|
+
import { Disclosure as ae, DisclosurePanel as oe, DisclosureButton as re } from "@headlessui/vue";
|
|
5
|
+
import { ScalarMarkdown as x, ScalarIcon as se } from "@scalar/components";
|
|
6
|
+
import b from "./Schema.vue.js";
|
|
7
|
+
import ne from "./SchemaPropertyHeading.vue.js";
|
|
8
|
+
const ie = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "property-description"
|
|
11
|
-
},
|
|
11
|
+
}, ue = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "property-description"
|
|
14
|
-
},
|
|
14
|
+
}, pe = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "property-example custom-scroll"
|
|
17
|
-
},
|
|
17
|
+
}, ce = { class: "property-example-value" }, me = {
|
|
18
18
|
key: 3,
|
|
19
19
|
class: "property-example custom-scroll"
|
|
20
|
-
},
|
|
20
|
+
}, de = { class: "property-example-label" }, ve = {
|
|
21
21
|
key: 4,
|
|
22
22
|
class: "property-enum"
|
|
23
|
-
},
|
|
23
|
+
}, ye = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "property-list"
|
|
26
|
-
},
|
|
26
|
+
}, fe = { class: "property-heading" }, he = { class: "property-name" }, ge = { class: "property-description" }, be = {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "property-enum-values"
|
|
29
|
-
},
|
|
29
|
+
}, ke = {
|
|
30
30
|
key: 5,
|
|
31
31
|
class: "children"
|
|
32
|
-
},
|
|
32
|
+
}, _e = {
|
|
33
33
|
key: 0,
|
|
34
34
|
class: "children"
|
|
35
|
-
},
|
|
35
|
+
}, xe = {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "property-rule"
|
|
38
|
-
},
|
|
38
|
+
}, Ee = {
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "property-rule"
|
|
41
|
-
}, Pe = /* @__PURE__ */
|
|
41
|
+
}, Pe = /* @__PURE__ */ Y({
|
|
42
42
|
__name: "SchemaProperty",
|
|
43
43
|
props: {
|
|
44
44
|
value: {},
|
|
@@ -51,8 +51,8 @@ const oe = {
|
|
|
51
51
|
pattern: { type: Boolean },
|
|
52
52
|
withExamples: { type: Boolean, default: !0 }
|
|
53
53
|
},
|
|
54
|
-
setup(
|
|
55
|
-
const
|
|
54
|
+
setup(K) {
|
|
55
|
+
const Q = K, E = {
|
|
56
56
|
integer: {
|
|
57
57
|
_default: "Integer numbers.",
|
|
58
58
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -65,110 +65,114 @@ const oe = {
|
|
|
65
65
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
66
66
|
binary: "binary data, used to describe files"
|
|
67
67
|
}
|
|
68
|
-
},
|
|
69
|
-
return
|
|
70
|
-
},
|
|
71
|
-
return !
|
|
72
|
-
},
|
|
73
|
-
var
|
|
74
|
-
return (
|
|
75
|
-
},
|
|
76
|
-
() =>
|
|
77
|
-
),
|
|
78
|
-
() =>
|
|
79
|
-
),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
}, j = function(t, o) {
|
|
69
|
+
return o != null && o.properties || o != null && o.additionalProperties || o != null && o.patternProperties ? null : t || (o == null ? void 0 : o.description) || null;
|
|
70
|
+
}, B = function(t) {
|
|
71
|
+
return !t || !E[t.type] ? null : E[t.type][t.format || "_default"];
|
|
72
|
+
}, d = function(t) {
|
|
73
|
+
var o;
|
|
74
|
+
return (t == null ? void 0 : t.enum) || ((o = t == null ? void 0 : t.items) == null ? void 0 : o.enum) || [];
|
|
75
|
+
}, S = h(
|
|
76
|
+
() => d(e.value).length > 9
|
|
77
|
+
), D = h(() => S.value ? 5 : 9), W = h(
|
|
78
|
+
() => d(e.value).slice(0, D.value)
|
|
79
|
+
), X = h(
|
|
80
|
+
() => d(e.value).slice(D.value)
|
|
81
|
+
), e = h(() => le(Q.value)), v = J.find((t) => !e.value || typeof e.value != "object" ? !1 : t in e.value || e.value.items && typeof e.value.items == "object" && t in e.value.items);
|
|
82
|
+
return (t, o) => {
|
|
83
|
+
var w, A, C, P, F, N, V, q, z, I, L, T, H, O, R, U;
|
|
84
|
+
return l(), a("div", {
|
|
85
|
+
class: G(["property", [
|
|
86
|
+
`property--level-${t.level}`,
|
|
85
87
|
{
|
|
86
|
-
"property--compact":
|
|
87
|
-
"property--deprecated": (
|
|
88
|
+
"property--compact": t.compact,
|
|
89
|
+
"property--deprecated": (w = e.value) == null ? void 0 : w.deprecated
|
|
88
90
|
}
|
|
89
91
|
]])
|
|
90
92
|
}, [
|
|
91
|
-
|
|
92
|
-
additional:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
required:
|
|
96
|
-
value:
|
|
97
|
-
},
|
|
98
|
-
|
|
93
|
+
i(ne, {
|
|
94
|
+
additional: t.additional,
|
|
95
|
+
enum: d(e.value).length > 0,
|
|
96
|
+
pattern: t.pattern,
|
|
97
|
+
required: t.required,
|
|
98
|
+
value: e.value
|
|
99
|
+
}, ee({ _: 2 }, [
|
|
100
|
+
t.name ? {
|
|
99
101
|
name: "name",
|
|
100
|
-
fn:
|
|
101
|
-
|
|
102
|
+
fn: g(() => [
|
|
103
|
+
k(u(t.name), 1)
|
|
102
104
|
]),
|
|
103
105
|
key: "0"
|
|
104
106
|
} : void 0,
|
|
105
|
-
(
|
|
107
|
+
(A = e.value) != null && A.example ? {
|
|
106
108
|
name: "example",
|
|
107
|
-
fn:
|
|
108
|
-
|
|
109
|
+
fn: g(() => [
|
|
110
|
+
k(" Example: " + u(e.value.example), 1)
|
|
109
111
|
]),
|
|
110
112
|
key: "1"
|
|
111
113
|
} : void 0
|
|
112
|
-
]), 1032, ["additional", "
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
value:
|
|
114
|
+
]), 1032, ["additional", "enum", "pattern", "required", "value"]),
|
|
115
|
+
j(t.description, e.value) ? (l(), a("div", ie, [
|
|
116
|
+
i(s(x), {
|
|
117
|
+
value: j(t.description, e.value)
|
|
116
118
|
}, null, 8, ["value"])
|
|
117
|
-
])) :
|
|
118
|
-
|
|
119
|
-
value:
|
|
119
|
+
])) : B(e.value) ? (l(), a("div", ue, [
|
|
120
|
+
i(s(x), {
|
|
121
|
+
value: B(e.value) || ""
|
|
120
122
|
}, null, 8, ["value"])
|
|
121
123
|
])) : n("", !0),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
t.withExamples && ((C = e.value) != null && C.example || (F = (P = e.value) == null ? void 0 : P.items) != null && F.example) ? (l(), a("div", pe, [
|
|
125
|
+
o[0] || (o[0] = y("span", { class: "property-example-label" }, "Example", -1)),
|
|
126
|
+
y("code", ce, u(s(te)(
|
|
127
|
+
((N = e.value) == null ? void 0 : N.example) || s(v) && ((V = e.value) == null ? void 0 : V.items) && typeof e.value.items == "object" && e.value.items[s(v)]
|
|
128
|
+
)), 1)
|
|
125
129
|
])) : n("", !0),
|
|
126
|
-
(
|
|
127
|
-
|
|
128
|
-
(l(!0),
|
|
129
|
-
key:
|
|
130
|
+
(q = e.value) != null && q.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), a("div", me, [
|
|
131
|
+
y("span", de, u(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
|
|
132
|
+
(l(!0), a(p, null, m(e.value.examples, (r, c) => (l(), a("code", {
|
|
133
|
+
key: c,
|
|
130
134
|
class: "property-example-value"
|
|
131
|
-
},
|
|
135
|
+
}, u(r), 1))), 128))
|
|
132
136
|
])) : n("", !0),
|
|
133
|
-
((
|
|
134
|
-
(
|
|
135
|
-
(l(!0),
|
|
136
|
-
key:
|
|
137
|
+
((z = d(e.value)) == null ? void 0 : z.length) > 0 ? (l(), a("div", ve, [
|
|
138
|
+
Array.isArray((I = e.value) == null ? void 0 : I["x-enumDescriptions"]) ? (l(), a("div", ye, [
|
|
139
|
+
(l(!0), a(p, null, m(d(e.value), (r) => (l(), a("div", {
|
|
140
|
+
key: r,
|
|
137
141
|
class: "property"
|
|
138
142
|
}, [
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
y("div", fe, [
|
|
144
|
+
y("div", he, u(r), 1)
|
|
141
145
|
]),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
value: e.value["x-enumDescriptions"][
|
|
146
|
+
y("div", ge, [
|
|
147
|
+
i(s(x), {
|
|
148
|
+
value: e.value["x-enumDescriptions"][r]
|
|
145
149
|
}, null, 8, ["value"])
|
|
146
150
|
])
|
|
147
151
|
]))), 128))
|
|
148
|
-
])) : (l(),
|
|
149
|
-
(l(!0),
|
|
150
|
-
key:
|
|
152
|
+
])) : (l(), a("ul", be, [
|
|
153
|
+
(l(!0), a(p, null, m(W.value, (r) => (l(), a("li", {
|
|
154
|
+
key: r,
|
|
151
155
|
class: "property-enum-value"
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
default:
|
|
155
|
-
|
|
156
|
-
default:
|
|
157
|
-
(l(!0),
|
|
158
|
-
key:
|
|
156
|
+
}, u(r), 1))), 128)),
|
|
157
|
+
S.value ? (l(), _(s(ae), { key: 0 }, {
|
|
158
|
+
default: g(({ open: r }) => [
|
|
159
|
+
i(s(oe), null, {
|
|
160
|
+
default: g(() => [
|
|
161
|
+
(l(!0), a(p, null, m(X.value, (c) => (l(), a("li", {
|
|
162
|
+
key: c,
|
|
159
163
|
class: "property-enum-value"
|
|
160
|
-
},
|
|
164
|
+
}, u(c), 1))), 128))
|
|
161
165
|
]),
|
|
162
166
|
_: 1
|
|
163
167
|
}),
|
|
164
|
-
|
|
165
|
-
default:
|
|
166
|
-
|
|
167
|
-
class:
|
|
168
|
+
i(s(re), { class: "enum-toggle-button" }, {
|
|
169
|
+
default: g(() => [
|
|
170
|
+
i(s(se), {
|
|
171
|
+
class: G(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": r }]),
|
|
168
172
|
icon: "Add",
|
|
169
173
|
size: "sm"
|
|
170
174
|
}, null, 8, ["class"]),
|
|
171
|
-
|
|
175
|
+
k(" " + u(r ? "Hide values" : "Show all values"), 1)
|
|
172
176
|
]),
|
|
173
177
|
_: 2
|
|
174
178
|
}, 1024)
|
|
@@ -177,43 +181,43 @@ const oe = {
|
|
|
177
181
|
})) : n("", !0)
|
|
178
182
|
]))
|
|
179
183
|
])) : n("", !0),
|
|
180
|
-
((
|
|
181
|
-
|
|
182
|
-
compact:
|
|
183
|
-
level:
|
|
184
|
+
((L = e.value) == null ? void 0 : L.type) === "object" && ((T = e.value) != null && T.properties || (H = e.value) != null && H.additionalProperties) ? (l(), a("div", ke, [
|
|
185
|
+
i(b, {
|
|
186
|
+
compact: t.compact,
|
|
187
|
+
level: t.level + 1,
|
|
184
188
|
value: e.value
|
|
185
189
|
}, null, 8, ["compact", "level", "value"])
|
|
186
190
|
])) : n("", !0),
|
|
187
|
-
(
|
|
188
|
-
["object"].includes(e.value.items.type) ? (l(),
|
|
189
|
-
|
|
190
|
-
compact:
|
|
191
|
-
level:
|
|
191
|
+
(O = e.value) != null && O.items && typeof e.value.items == "object" && "type" in e.value.items && typeof e.value.items.type == "string" ? (l(), a(p, { key: 6 }, [
|
|
192
|
+
["object"].includes((U = (R = e.value) == null ? void 0 : R.items) == null ? void 0 : U.type) ? (l(), a("div", _e, [
|
|
193
|
+
i(b, {
|
|
194
|
+
compact: t.compact,
|
|
195
|
+
level: t.level + 1,
|
|
192
196
|
value: e.value.items
|
|
193
197
|
}, null, 8, ["compact", "level", "value"])
|
|
194
198
|
])) : n("", !0)
|
|
195
199
|
], 64)) : n("", !0),
|
|
196
|
-
(l(!0),
|
|
197
|
-
var
|
|
198
|
-
return l(),
|
|
199
|
-
(
|
|
200
|
-
(l(!0),
|
|
201
|
-
var M
|
|
202
|
-
return l(),
|
|
203
|
-
key:
|
|
204
|
-
compact:
|
|
205
|
-
level:
|
|
206
|
-
noncollapsible: ((M = e.value) == null ? void 0 : M[
|
|
207
|
-
value:
|
|
200
|
+
(l(!0), a(p, null, m(s(J), (r) => {
|
|
201
|
+
var c, Z;
|
|
202
|
+
return l(), a(p, { key: r }, [
|
|
203
|
+
(c = e.value) != null && c[r] ? (l(), a("div", xe, [
|
|
204
|
+
(l(!0), a(p, null, m(e.value[r], (f) => {
|
|
205
|
+
var M, $;
|
|
206
|
+
return l(), _(b, {
|
|
207
|
+
key: f.id,
|
|
208
|
+
compact: t.compact,
|
|
209
|
+
level: t.level + 1,
|
|
210
|
+
noncollapsible: Array.isArray((M = e.value) == null ? void 0 : M[r]) && (($ = e.value) == null ? void 0 : $[r].length) === 1,
|
|
211
|
+
value: f
|
|
208
212
|
}, null, 8, ["compact", "level", "noncollapsible", "value"]);
|
|
209
213
|
}), 128))
|
|
210
214
|
])) : n("", !0),
|
|
211
|
-
(
|
|
212
|
-
(l(!0),
|
|
213
|
-
key:
|
|
214
|
-
compact:
|
|
215
|
-
level:
|
|
216
|
-
value:
|
|
215
|
+
(Z = e.value) != null && Z.items && typeof s(v) == "string" && typeof e.value.items == "object" && s(v) in e.value.items && Array.isArray(e.value.items[s(v)]) && t.level < 3 ? (l(), a("div", Ee, [
|
|
216
|
+
(l(!0), a(p, null, m(e.value.items[s(v)], (f) => (l(), _(b, {
|
|
217
|
+
key: f.id,
|
|
218
|
+
compact: t.compact,
|
|
219
|
+
level: t.level + 1,
|
|
220
|
+
value: f
|
|
217
221
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
218
222
|
])) : n("", !0)
|
|
219
223
|
], 64);
|
|
@@ -3,7 +3,5 @@ export declare const discriminators: string[];
|
|
|
3
3
|
/**
|
|
4
4
|
* Optimize the value by removing nulls from discriminators.
|
|
5
5
|
*/
|
|
6
|
-
export declare function optimizeValueForDisplay(value: UnknownObject | undefined):
|
|
7
|
-
[x: string]: unknown;
|
|
8
|
-
} | undefined;
|
|
6
|
+
export declare function optimizeValueForDisplay(value: UnknownObject | undefined): Record<string, any> | undefined;
|
|
9
7
|
//# sourceMappingURL=optimizeValueForDisplay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,eAAO,MAAM,cAAc,UAAqC,CAAA;AAEhE;;GAEG;AACH,wBAAgB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,eAAO,MAAM,cAAc,UAAqC,CAAA;AAEhE;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAwDjC"}
|