@scalar/api-reference 1.30.0 → 1.31.1
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 +50 -0
- package/dist/browser/standalone.js +6690 -6569
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +164 -181
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/components/Content/Content.vue2.js +5 -5
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +57 -63
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +46 -46
- package/dist/components/Content/Models/Models.vue.d.ts +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +9 -7
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.preview.d.ts +294 -84
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +21 -4
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +158 -131
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +2 -3
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +29 -29
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +12 -3
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +133 -103
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +133 -126
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +19 -17
- package/dist/components/Layouts/Layouts.vue.js +11 -9
- package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +2 -2
- package/dist/components/Section/SectionAccordion.vue2.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/Section/SectionContainerAccordion.vue2.js +4 -4
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/components/SingleApiReference.vue.js +27 -33
- package/dist/esm.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
- package/dist/features/ApiClientModal/useApiClient.d.ts +196 -196
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
- package/dist/features/DocumentSource/index.d.ts +2 -0
- package/dist/features/DocumentSource/index.d.ts.map +1 -0
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
- package/dist/features/DownloadLink/index.d.ts +1 -0
- package/dist/features/DownloadLink/index.d.ts.map +1 -1
- package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
- package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
- package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +2 -0
- 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 +178 -127
- package/dist/features/Operation/Operation.vue.d.ts +2 -2
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +29 -23
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +7 -3
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +28 -24
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
- 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/ParameterListItem.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
- package/dist/features/Operation/components/RequestBody.vue.d.ts +7 -3
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +41 -36
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +84 -79
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +5 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +66 -57
- package/dist/features/Operation/types/schemas.d.ts +2 -2
- package/dist/features/Operation/types/schemas.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/helpers/local-storage.d.ts +8 -0
- package/dist/helpers/local-storage.d.ts.map +1 -0
- package/dist/helpers/local-storage.js +6 -0
- package/dist/helpers/measure.d.ts +21 -0
- package/dist/helpers/measure.d.ts.map +1 -0
- package/dist/helpers/measure.js +7 -0
- package/dist/helpers/parse.d.ts +3 -5
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +64 -86
- package/dist/helpers/scroll-to-id.d.ts.map +1 -1
- package/dist/helpers/scroll-to-id.js +18 -4
- package/dist/hooks/useDiscriminator.d.ts +53 -0
- package/dist/hooks/useDiscriminator.d.ts.map +1 -0
- package/dist/hooks/useDiscriminator.js +149 -0
- package/dist/hooks/useOperationDiscriminator.d.ts +8 -0
- package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -0
- package/dist/hooks/useOperationDiscriminator.js +57 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -35
- package/dist/libs/openapi.d.ts +3 -3
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +35 -42
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +15 -15
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/stores/useHttpClientStore.js +19 -18
- package/dist/style.css +1 -1
- package/dist/types.d.ts +27 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +15 -16
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +0 -12
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +0 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.js +0 -45
- package/dist/hooks/useReactiveSpec.d.ts +0 -448
- package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
- package/dist/hooks/useReactiveSpec.js +0 -59
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
4
|
-
import { stringify as
|
|
5
|
-
import { mergeAllOfSchemas as
|
|
1
|
+
import { defineComponent as U, ref as D, computed as s, resolveComponent as E, createElementBlock as u, openBlock as m, createCommentVNode as p, createBlock as f, Fragment as H, renderList as F, createVNode as b, createElementVNode as d, unref as v, withCtx as I, toDisplayString as w } from "vue";
|
|
2
|
+
import { ScalarListbox as M, ScalarMarkdown as $ } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as R } from "@scalar/icons";
|
|
4
|
+
import { stringify as j } from "flatted";
|
|
5
|
+
import { mergeAllOfSchemas as Z } from "./helpers/merge-all-of-schemas.js";
|
|
6
6
|
import { hasComposition as g } from "./helpers/schema-composition.js";
|
|
7
7
|
import S from "./Schema.vue.js";
|
|
8
|
-
const
|
|
9
|
-
class: "composition-selector bg-b-1.5 hover:bg-b-2
|
|
8
|
+
const G = { class: "property-rule" }, J = {
|
|
9
|
+
class: "composition-selector bg-b-1.5 hover:bg-b-2 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border border-b-0 px-2 py-1.25 pr-3 text-left",
|
|
10
10
|
type: "button"
|
|
11
|
-
},
|
|
11
|
+
}, K = { class: "text-c-2" }, P = { class: "composition-selector-label text-c-1 relative" }, Q = { class: "composition-panel" }, X = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "property-description border-x border-t p-2"
|
|
14
|
-
},
|
|
14
|
+
}, te = /* @__PURE__ */ U({
|
|
15
15
|
__name: "SchemaComposition",
|
|
16
16
|
props: {
|
|
17
17
|
composition: {},
|
|
@@ -23,21 +23,21 @@ const P = { class: "property-rule" }, Q = {
|
|
|
23
23
|
hideHeading: { type: Boolean }
|
|
24
24
|
},
|
|
25
25
|
setup(l) {
|
|
26
|
-
const y =
|
|
26
|
+
const y = D(0), C = s(
|
|
27
27
|
() => N.value.map((e, o) => ({
|
|
28
28
|
id: String(o),
|
|
29
|
-
label:
|
|
29
|
+
label: A(e) || "Schema"
|
|
30
30
|
}))
|
|
31
|
-
), O =
|
|
31
|
+
), O = s({
|
|
32
32
|
get: () => C.value.find(
|
|
33
33
|
(e) => e.id === String(y.value)
|
|
34
34
|
),
|
|
35
35
|
set: (e) => y.value = Number(e.id)
|
|
36
|
-
}), q =
|
|
36
|
+
}), q = s(() => {
|
|
37
37
|
var t;
|
|
38
38
|
const e = ["oneOf", "anyOf"].includes(l.composition), o = l.composition === "allOf" && ((t = l.value[l.composition]) == null ? void 0 : t.some((n) => g(n)));
|
|
39
39
|
return e || o;
|
|
40
|
-
}),
|
|
40
|
+
}), A = (e) => {
|
|
41
41
|
if (!e)
|
|
42
42
|
return null;
|
|
43
43
|
if (e.title)
|
|
@@ -46,7 +46,7 @@ const P = { class: "property-rule" }, Q = {
|
|
|
46
46
|
return e.name;
|
|
47
47
|
if (l.schemas && typeof l.schemas == "object") {
|
|
48
48
|
for (const [o, t] of Object.entries(l.schemas))
|
|
49
|
-
if (
|
|
49
|
+
if (j(t) === j(e))
|
|
50
50
|
return o;
|
|
51
51
|
}
|
|
52
52
|
if (e.type === "array" && e.items)
|
|
@@ -59,11 +59,11 @@ const P = { class: "property-rule" }, Q = {
|
|
|
59
59
|
return o[0];
|
|
60
60
|
}
|
|
61
61
|
return null;
|
|
62
|
-
}, k = (e) => e.find((o) => g(o)), N =
|
|
62
|
+
}, k = (e) => e.find((o) => g(o)), N = s(() => {
|
|
63
63
|
if (!k(l.value[l.composition]))
|
|
64
64
|
return l.value[l.composition];
|
|
65
65
|
const e = k(l.value[l.composition]);
|
|
66
|
-
return (e.oneOf || e.anyOf).map((t) => {
|
|
66
|
+
return (e.oneOf || e.anyOf || e.allOf).map((t) => {
|
|
67
67
|
if (t.allOf) {
|
|
68
68
|
const n = t.allOf.find((c) => c.title), r = t.allOf.find((c) => !c.title);
|
|
69
69
|
return n && r ? {
|
|
@@ -82,7 +82,7 @@ const P = { class: "property-rule" }, Q = {
|
|
|
82
82
|
}
|
|
83
83
|
return t;
|
|
84
84
|
});
|
|
85
|
-
}),
|
|
85
|
+
}), B = (e) => {
|
|
86
86
|
var o, t;
|
|
87
87
|
if (e === "allOf") {
|
|
88
88
|
const n = (t = (o = l.value) == null ? void 0 : o[e]) == null ? void 0 : t.find(
|
|
@@ -94,57 +94,60 @@ const P = { class: "property-rule" }, Q = {
|
|
|
94
94
|
return "Any of";
|
|
95
95
|
}
|
|
96
96
|
return e.replace(/([A-Z])/g, " $1").replace(/^./, (n) => n.toUpperCase()).toLowerCase().replace(/^(\w)/, (n) => n.toUpperCase());
|
|
97
|
-
},
|
|
97
|
+
}, i = s(
|
|
98
98
|
() => N.value[y.value]
|
|
99
|
-
), h =
|
|
99
|
+
), h = s(() => {
|
|
100
100
|
var e;
|
|
101
|
-
return (e =
|
|
102
|
-
}),
|
|
101
|
+
return (e = i.value) != null && e.oneOf ? "oneOf" : "anyOf";
|
|
102
|
+
}), T = s(() => {
|
|
103
103
|
var o;
|
|
104
104
|
const e = h.value;
|
|
105
|
-
return (o =
|
|
105
|
+
return (o = i.value) == null ? void 0 : o[e];
|
|
106
|
+
}), z = s(() => {
|
|
107
|
+
const e = i.value;
|
|
108
|
+
return e ? !!(e.properties || e.type || e.nullable || e.const !== void 0 || e.enum || e.allOf || e.oneOf || e.anyOf || e.items) : !1;
|
|
106
109
|
});
|
|
107
110
|
return (e, o) => {
|
|
108
|
-
var n, r, c, V
|
|
109
|
-
const t =
|
|
110
|
-
return
|
|
111
|
-
e.composition === "allOf" && e.value[e.composition].some((
|
|
112
|
-
(
|
|
113
|
-
), (
|
|
114
|
-
key:
|
|
111
|
+
var n, r, c, V;
|
|
112
|
+
const t = E("SchemaComposition", !0);
|
|
113
|
+
return m(), u("div", G, [
|
|
114
|
+
e.composition === "allOf" && e.value[e.composition].some((a) => a.oneOf || a.anyOf) ? (m(!0), u(H, { key: 0 }, F(e.value[e.composition].filter(
|
|
115
|
+
(a) => !a.oneOf && !a.anyOf
|
|
116
|
+
), (a, L) => (m(), f(S, {
|
|
117
|
+
key: L,
|
|
115
118
|
compact: e.compact,
|
|
116
119
|
level: e.level,
|
|
117
120
|
name: e.name,
|
|
118
121
|
noncollapsible: e.level == 0,
|
|
119
122
|
schemas: e.schemas,
|
|
120
|
-
value:
|
|
123
|
+
value: a
|
|
121
124
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))), 128)) : p("", !0),
|
|
122
|
-
q.value ? (
|
|
123
|
-
b(v(
|
|
125
|
+
q.value ? (m(), u(H, { key: 1 }, [
|
|
126
|
+
b(v(M), {
|
|
124
127
|
modelValue: O.value,
|
|
125
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
128
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => O.value = a),
|
|
126
129
|
options: C.value,
|
|
127
130
|
resize: ""
|
|
128
131
|
}, {
|
|
129
|
-
default:
|
|
130
|
-
var
|
|
132
|
+
default: I(() => {
|
|
133
|
+
var a;
|
|
131
134
|
return [
|
|
132
|
-
d("button",
|
|
133
|
-
d("span",
|
|
134
|
-
d("span",
|
|
135
|
-
b(v(
|
|
135
|
+
d("button", J, [
|
|
136
|
+
d("span", K, w(B(e.composition)), 1),
|
|
137
|
+
d("span", P, w(((a = O.value) == null ? void 0 : a.label) || "Schema"), 1),
|
|
138
|
+
b(v(R), { class: "z-1" })
|
|
136
139
|
])
|
|
137
140
|
];
|
|
138
141
|
}),
|
|
139
142
|
_: 1
|
|
140
143
|
}, 8, ["modelValue", "options"]),
|
|
141
|
-
d("div",
|
|
142
|
-
(n =
|
|
143
|
-
b(v(
|
|
144
|
-
value:
|
|
144
|
+
d("div", Q, [
|
|
145
|
+
(n = i.value) != null && n.description ? (m(), u("div", X, [
|
|
146
|
+
b(v($), {
|
|
147
|
+
value: i.value.description
|
|
145
148
|
}, null, 8, ["value"])
|
|
146
149
|
])) : p("", !0),
|
|
147
|
-
|
|
150
|
+
z.value ? (m(), f(S, {
|
|
148
151
|
key: 1,
|
|
149
152
|
compact: e.compact,
|
|
150
153
|
level: e.level + 1,
|
|
@@ -152,12 +155,13 @@ const P = { class: "property-rule" }, Q = {
|
|
|
152
155
|
name: e.name,
|
|
153
156
|
noncollapsible: !0,
|
|
154
157
|
schemas: e.schemas,
|
|
155
|
-
value: (
|
|
158
|
+
value: (r = i.value) != null && r.properties ? {
|
|
156
159
|
type: "object",
|
|
157
|
-
properties:
|
|
158
|
-
|
|
160
|
+
properties: i.value.properties,
|
|
161
|
+
required: i.value.required
|
|
162
|
+
} : i.value
|
|
159
163
|
}, null, 8, ["compact", "level", "hideHeading", "name", "schemas", "value"])) : p("", !0),
|
|
160
|
-
(
|
|
164
|
+
(c = i.value) != null && c.oneOf || (V = i.value) != null && V.anyOf ? (m(), f(t, {
|
|
161
165
|
key: 2,
|
|
162
166
|
compact: e.compact,
|
|
163
167
|
composition: h.value,
|
|
@@ -167,23 +171,23 @@ const P = { class: "property-rule" }, Q = {
|
|
|
167
171
|
noncollapsible: !0,
|
|
168
172
|
schemas: e.schemas,
|
|
169
173
|
value: {
|
|
170
|
-
[h.value]:
|
|
174
|
+
[h.value]: T.value
|
|
171
175
|
}
|
|
172
176
|
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "schemas", "value"])) : p("", !0)
|
|
173
177
|
])
|
|
174
|
-
], 64)) : (
|
|
178
|
+
], 64)) : (m(), f(S, {
|
|
175
179
|
key: 2,
|
|
176
180
|
compact: e.compact,
|
|
177
181
|
level: e.level,
|
|
178
182
|
name: e.name,
|
|
179
183
|
noncollapsible: e.level == 0,
|
|
180
184
|
schemas: e.schemas,
|
|
181
|
-
value: v(
|
|
185
|
+
value: v(Z)(e.value[e.composition])
|
|
182
186
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))
|
|
183
187
|
]);
|
|
184
188
|
};
|
|
185
189
|
}
|
|
186
190
|
});
|
|
187
191
|
export {
|
|
188
|
-
|
|
192
|
+
te as default
|
|
189
193
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { DiscriminatorMapping
|
|
1
|
+
import type { DiscriminatorMapping } from '../../../hooks/useDiscriminator.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
discriminatorMapping: DiscriminatorMapping;
|
|
4
|
-
|
|
5
|
-
discriminatorPropertyName?: DiscriminatorPropertyName;
|
|
4
|
+
discriminator: string;
|
|
6
5
|
};
|
|
7
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
7
|
"update:modelValue": (value: string) => any;
|
|
@@ -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":"AAqEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAIpE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC;;;;;;AA+HF,wBAQG"}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
4
|
-
const
|
|
5
|
-
class: "bg-b-1.5 hover:bg-b-2
|
|
1
|
+
import { defineComponent as p, ref as f, computed as n, createBlock as b, openBlock as g, unref as s, withCtx as v, createElementVNode as l, createVNode as x, toDisplayString as h } from "vue";
|
|
2
|
+
import { ScalarListbox as V } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as D } from "@scalar/icons";
|
|
4
|
+
const S = {
|
|
5
|
+
class: "bg-b-1.5 hover:bg-b-2 flex w-full items-center gap-1 rounded border px-2 py-1.25",
|
|
6
6
|
type: "button"
|
|
7
|
-
},
|
|
7
|
+
}, _ = { class: "composition-selector-label text-c-1 relative" }, M = /* @__PURE__ */ p({
|
|
8
8
|
__name: "SchemaDiscriminator",
|
|
9
9
|
props: {
|
|
10
10
|
discriminatorMapping: {},
|
|
11
|
-
|
|
12
|
-
discriminatorPropertyName: {}
|
|
11
|
+
discriminator: {}
|
|
13
12
|
},
|
|
14
13
|
emits: ["update:modelValue"],
|
|
15
|
-
setup(
|
|
16
|
-
const d =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
),
|
|
22
|
-
get: () =>
|
|
23
|
-
(e) => e.id ===
|
|
14
|
+
setup(i, { emit: c }) {
|
|
15
|
+
const m = f(""), d = c, u = (e) => {
|
|
16
|
+
m.value = e, d("update:modelValue", e);
|
|
17
|
+
}, a = n(() => i.discriminatorMapping ? Object.keys(i.discriminatorMapping).map((e) => ({
|
|
18
|
+
id: e,
|
|
19
|
+
label: e
|
|
20
|
+
})) : []), o = n({
|
|
21
|
+
get: () => a.value.find(
|
|
22
|
+
(e) => e.id === i.discriminator
|
|
24
23
|
),
|
|
25
|
-
set: (e) =>
|
|
24
|
+
set: (e) => {
|
|
25
|
+
e != null && e.id && u(e.id);
|
|
26
|
+
}
|
|
26
27
|
});
|
|
27
|
-
return (e,
|
|
28
|
-
modelValue:
|
|
29
|
-
"onUpdate:modelValue":
|
|
30
|
-
options:
|
|
28
|
+
return (e, r) => (g(), b(s(V), {
|
|
29
|
+
modelValue: o.value,
|
|
30
|
+
"onUpdate:modelValue": r[0] || (r[0] = (t) => o.value = t),
|
|
31
|
+
options: a.value,
|
|
31
32
|
resize: ""
|
|
32
33
|
}, {
|
|
33
|
-
default:
|
|
34
|
-
var
|
|
34
|
+
default: v(() => {
|
|
35
|
+
var t;
|
|
35
36
|
return [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
V(s(g))
|
|
37
|
+
l("button", S, [
|
|
38
|
+
l("span", _, h(((t = o.value) == null ? void 0 : t.label) || "Schema"), 1),
|
|
39
|
+
x(s(D), { class: "z-1" })
|
|
40
40
|
])
|
|
41
41
|
];
|
|
42
42
|
}),
|
|
@@ -45,5 +45,5 @@ const v = {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
M as default
|
|
49
49
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
value:
|
|
3
|
+
value: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ArraySchemaObject | OpenAPIV3_1.NonArraySchemaObject;
|
|
4
4
|
name?: string;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,KAAK,WAAW,GAAG;IACjB,KAAK,EACD,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;;AAgFF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaHeading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-eec32394"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
1
|
import { type Component } from 'vue';
|
|
2
|
+
import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
3
3
|
/**
|
|
4
4
|
* Note: We’re taking in a prop called `value` which should be a JSON Schema.
|
|
5
5
|
*
|
|
@@ -18,13 +18,22 @@ type __VLS_Props = {
|
|
|
18
18
|
additional?: boolean;
|
|
19
19
|
pattern?: boolean;
|
|
20
20
|
withExamples?: boolean;
|
|
21
|
-
|
|
21
|
+
hideModelNames?: boolean;
|
|
22
|
+
schemas?: Schemas;
|
|
22
23
|
hideHeading?: boolean;
|
|
24
|
+
discriminatorMapping?: Record<string, string>;
|
|
25
|
+
discriminatorPropertyName?: string;
|
|
26
|
+
isDiscriminator?: boolean;
|
|
23
27
|
};
|
|
24
|
-
declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
28
|
+
declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
|
+
"update:modelValue": (value: string) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
32
|
+
}>, {
|
|
25
33
|
required: boolean;
|
|
26
34
|
level: number;
|
|
27
35
|
compact: boolean;
|
|
36
|
+
hideModelNames: boolean;
|
|
28
37
|
withExamples: boolean;
|
|
29
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
39
|
export default _default_1;
|
|
@@ -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":"AA0kBA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAOtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAUjE;;;;;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,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;;;;;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;oBAKA,OAAO;kBADT,OAAO;;AAmkB1B,0BASG"}
|
|
@@ -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 a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9998b466"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|