@scalar/api-reference 1.35.3 → 1.35.4
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 +11 -0
- package/dist/browser/standalone.js +2161 -2145
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +4 -0
- 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 +71 -65
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +44 -38
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +4 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +49 -41
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -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 +96 -88
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +20 -19
- 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 +28 -25
- package/dist/features/api-client-modal/useApiClient.d.ts +90 -90
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -11
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import { getResolvedRef as
|
|
5
|
-
import { isArraySchema as
|
|
6
|
-
import { isTypeObject as
|
|
7
|
-
import { optimizeValueForDisplay as
|
|
8
|
-
import { compositions as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
1
|
+
import { defineComponent as F, computed as l, createBlock as c, openBlock as i, resolveDynamicComponent as M, normalizeClass as $, withCtx as y, createCommentVNode as s, createElementBlock as a, createVNode as d, createSlots as I, unref as o, toDisplayString as f, Fragment as h, createTextVNode as N, renderList as z } from "vue";
|
|
2
|
+
import { ScalarMarkdown as S } from "@scalar/components";
|
|
3
|
+
import { isDefined as U } from "@scalar/helpers/array/is-defined";
|
|
4
|
+
import { getResolvedRef as b } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
|
+
import { isArraySchema as m } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
6
|
+
import { isTypeObject as Z } from "./helpers/is-type-object.js";
|
|
7
|
+
import { optimizeValueForDisplay as L } from "./helpers/optimize-value-for-display.js";
|
|
8
|
+
import { compositions as G } from "./helpers/schema-composition.js";
|
|
9
|
+
import W from "./Schema.vue.js";
|
|
10
|
+
import J from "./SchemaComposition.vue.js";
|
|
11
|
+
import K from "./SchemaEnumValues.vue.js";
|
|
12
|
+
import Q from "./SchemaPropertyHeading.vue.js";
|
|
13
13
|
import X from "../../Anchor/WithBreadcrumb.vue2.js";
|
|
14
14
|
import Y from "../../../features/specification-extension/SpecificationExtension.vue2.js";
|
|
15
15
|
const _ = {
|
|
@@ -21,16 +21,16 @@ const _ = {
|
|
|
21
21
|
}, ee = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "property-description"
|
|
24
|
-
},
|
|
24
|
+
}, ne = {
|
|
25
25
|
key: 2,
|
|
26
26
|
class: "property-description"
|
|
27
|
-
},
|
|
27
|
+
}, re = {
|
|
28
28
|
key: 4,
|
|
29
29
|
class: "children"
|
|
30
|
-
},
|
|
30
|
+
}, ie = {
|
|
31
31
|
key: 0,
|
|
32
32
|
class: "children"
|
|
33
|
-
}, ve = /* @__PURE__ */
|
|
33
|
+
}, ve = /* @__PURE__ */ F({
|
|
34
34
|
__name: "SchemaProperty",
|
|
35
35
|
props: {
|
|
36
36
|
is: {},
|
|
@@ -44,11 +44,13 @@ const _ = {
|
|
|
44
44
|
description: {},
|
|
45
45
|
hideModelNames: { type: Boolean, default: !1 },
|
|
46
46
|
hideHeading: { type: Boolean },
|
|
47
|
+
hideReadOnly: { type: Boolean },
|
|
48
|
+
hideWriteOnly: { type: Boolean },
|
|
47
49
|
variant: {},
|
|
48
50
|
breadcrumb: {}
|
|
49
51
|
},
|
|
50
|
-
setup(
|
|
51
|
-
const
|
|
52
|
+
setup(D) {
|
|
53
|
+
const u = D, v = {
|
|
52
54
|
integer: {
|
|
53
55
|
_default: "Integer numbers.",
|
|
54
56
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -62,68 +64,68 @@ const _ = {
|
|
|
62
64
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
63
65
|
binary: "binary data, used to describe files"
|
|
64
66
|
}
|
|
65
|
-
},
|
|
66
|
-
var
|
|
67
|
-
return (e == null ? void 0 : e.enum) || ((
|
|
68
|
-
},
|
|
69
|
-
const e =
|
|
70
|
-
return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e != null && e.allOf || e != null && e.allOf ? null :
|
|
71
|
-
}),
|
|
72
|
-
const e =
|
|
73
|
-
if (!e || !
|
|
67
|
+
}, O = (e) => !e || !v[e.type] ? null : v[e.type][e.format || e.contentEncoding || "_default"], H = (e) => {
|
|
68
|
+
var r;
|
|
69
|
+
return (e == null ? void 0 : e.enum) || ((r = e == null ? void 0 : e.items) == null ? void 0 : r.enum) || [];
|
|
70
|
+
}, n = l(() => L(u.value)), g = l(() => {
|
|
71
|
+
const e = n.value;
|
|
72
|
+
return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e != null && e.allOf || e != null && e.allOf ? null : u.description || (e == null ? void 0 : e.description) || null;
|
|
73
|
+
}), V = (e, r, t) => r || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) !== void 0 || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || t, k = l(() => {
|
|
74
|
+
const e = n.value;
|
|
75
|
+
if (!e || !m(e) || typeof e.items != "object")
|
|
74
76
|
return !1;
|
|
75
|
-
const
|
|
76
|
-
return "type" in
|
|
77
|
-
}),
|
|
78
|
-
const
|
|
79
|
-
return
|
|
80
|
-
},
|
|
81
|
-
if (!
|
|
77
|
+
const r = e.items;
|
|
78
|
+
return "type" in r && r.type && (Array.isArray(r.type) ? r.type.includes("object") : ["object"].includes(r.type)) || "properties" in r || "$ref" in r || "discriminator" in r || "allOf" in r || "oneOf" in r || "anyOf" in r;
|
|
79
|
+
}), w = (e) => {
|
|
80
|
+
const r = n.value;
|
|
81
|
+
return r && m(r) === !1 || !(r != null && r.items) || typeof r.items != "object" || !(e in r.items) ? !1 : !k.value;
|
|
82
|
+
}, A = l(() => k.value), T = l(() => {
|
|
83
|
+
if (!n.value)
|
|
82
84
|
return !1;
|
|
83
|
-
const e =
|
|
84
|
-
return
|
|
85
|
-
}),
|
|
86
|
-
var
|
|
87
|
-
return ((
|
|
85
|
+
const e = n.value, r = Z(e), t = "properties" in e || "additionalProperties" in e;
|
|
86
|
+
return r && t;
|
|
87
|
+
}), q = l(() => u.level <= 1), E = l(() => n.value ? G.map((e) => {
|
|
88
|
+
var t, p;
|
|
89
|
+
return ((t = n.value) == null ? void 0 : t[e]) && !(m(n.value) && ((p = n.value) != null && p.items) && typeof e == "string" && typeof n.value.items == "object" && e in n.value.items) ? {
|
|
88
90
|
composition: e,
|
|
89
|
-
value:
|
|
90
|
-
} :
|
|
91
|
+
value: n.value
|
|
92
|
+
} : w(e) && n.value && m(n.value) && n.value.items ? {
|
|
91
93
|
composition: e,
|
|
92
|
-
value:
|
|
94
|
+
value: n.value.items
|
|
93
95
|
} : null;
|
|
94
|
-
}).filter(
|
|
95
|
-
return (e,
|
|
96
|
-
var
|
|
97
|
-
return
|
|
98
|
-
class:
|
|
96
|
+
}).filter(U) : []);
|
|
97
|
+
return (e, r) => {
|
|
98
|
+
var t;
|
|
99
|
+
return i(), c(M(e.is ?? "li"), {
|
|
100
|
+
class: $(["property", [
|
|
99
101
|
`property--level-${e.level}`,
|
|
100
102
|
{
|
|
101
103
|
"property--compact": e.compact,
|
|
102
|
-
"property--deprecated": (
|
|
104
|
+
"property--deprecated": (t = n.value) == null ? void 0 : t.deprecated
|
|
103
105
|
}
|
|
104
106
|
]])
|
|
105
107
|
}, {
|
|
106
|
-
default:
|
|
107
|
-
var
|
|
108
|
+
default: y(() => {
|
|
109
|
+
var p, R, P, B;
|
|
108
110
|
return [
|
|
109
|
-
|
|
111
|
+
V(n.value, e.name, e.required) ? (i(), c(Q, {
|
|
110
112
|
key: 0,
|
|
111
113
|
class: "group",
|
|
112
|
-
enum:
|
|
114
|
+
enum: H(n.value).length > 0,
|
|
113
115
|
hideModelNames: e.hideModelNames,
|
|
114
116
|
isDiscriminator: e.discriminator && e.discriminator.propertyName === e.name,
|
|
115
117
|
required: e.required,
|
|
116
|
-
value:
|
|
117
|
-
},
|
|
118
|
+
value: n.value
|
|
119
|
+
}, I({ _: 2 }, [
|
|
118
120
|
e.name ? {
|
|
119
121
|
name: "name",
|
|
120
|
-
fn:
|
|
121
|
-
|
|
122
|
-
breadcrumb:
|
|
122
|
+
fn: y(() => [
|
|
123
|
+
d(o(X), {
|
|
124
|
+
breadcrumb: q.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
|
|
123
125
|
}, {
|
|
124
|
-
default:
|
|
125
|
-
e.variant === "patternProperties" ? (
|
|
126
|
-
|
|
126
|
+
default: y(() => [
|
|
127
|
+
e.variant === "patternProperties" ? (i(), a("span", _, f(e.name), 1)) : e.variant === "additionalProperties" ? (i(), a("span", x, f(e.name), 1)) : (i(), a(h, { key: 2 }, [
|
|
128
|
+
N(f(e.name), 1)
|
|
127
129
|
], 64))
|
|
128
130
|
]),
|
|
129
131
|
_: 1
|
|
@@ -131,62 +133,68 @@ const _ = {
|
|
|
131
133
|
]),
|
|
132
134
|
key: "0"
|
|
133
135
|
} : void 0,
|
|
134
|
-
(
|
|
136
|
+
(p = n.value) != null && p.example ? {
|
|
135
137
|
name: "example",
|
|
136
|
-
fn:
|
|
137
|
-
|
|
138
|
+
fn: y(() => [
|
|
139
|
+
N(" Example: " + f(n.value.example), 1)
|
|
138
140
|
]),
|
|
139
141
|
key: "1"
|
|
140
142
|
} : void 0
|
|
141
143
|
]), 1032, ["enum", "hideModelNames", "isDiscriminator", "required", "value"])) : s("", !0),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
])) :
|
|
145
|
-
|
|
146
|
-
value:
|
|
144
|
+
g.value ? (i(), a("div", ee, [
|
|
145
|
+
d(o(S), { value: g.value }, null, 8, ["value"])
|
|
146
|
+
])) : O(n.value) ? (i(), a("div", ne, [
|
|
147
|
+
d(o(S), {
|
|
148
|
+
value: O(n.value) || ""
|
|
147
149
|
}, null, 8, ["value"])
|
|
148
150
|
])) : s("", !0),
|
|
149
|
-
(((
|
|
151
|
+
(((R = n.value) == null ? void 0 : R.enum) || n.value && o(m)(n.value) && ((B = o(b)((P = n.value) == null ? void 0 : P.items)) == null ? void 0 : B.enum) || []).length ? (i(), c(K, {
|
|
150
152
|
key: 3,
|
|
151
|
-
value:
|
|
153
|
+
value: n.value
|
|
152
154
|
}, null, 8, ["value"])) : s("", !0),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
T.value ? (i(), a("div", re, [
|
|
156
|
+
d(W, {
|
|
155
157
|
breadcrumb: e.breadcrumb && e.name ? [...e.breadcrumb, e.name] : void 0,
|
|
156
158
|
compact: e.compact,
|
|
159
|
+
hideReadOnly: e.hideReadOnly,
|
|
160
|
+
hideWriteOnly: e.hideWriteOnly,
|
|
157
161
|
level: e.level + 1,
|
|
158
162
|
name: e.name,
|
|
159
163
|
noncollapsible: e.noncollapsible,
|
|
160
|
-
schema:
|
|
161
|
-
}, null, 8, ["breadcrumb", "compact", "level", "name", "noncollapsible", "schema"])
|
|
164
|
+
schema: n.value
|
|
165
|
+
}, null, 8, ["breadcrumb", "compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
|
|
162
166
|
])) : s("", !0),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
167
|
+
n.value && o(m)(n.value) && typeof n.value.items == "object" ? (i(), a(h, { key: 5 }, [
|
|
168
|
+
A.value ? (i(), a("div", ie, [
|
|
169
|
+
d(W, {
|
|
166
170
|
compact: e.compact,
|
|
171
|
+
hideReadOnly: e.hideReadOnly,
|
|
172
|
+
hideWriteOnly: e.hideWriteOnly,
|
|
167
173
|
level: e.level + 1,
|
|
168
174
|
name: e.name,
|
|
169
175
|
noncollapsible: e.noncollapsible,
|
|
170
|
-
schema:
|
|
171
|
-
}, null, 8, ["compact", "level", "name", "noncollapsible", "schema"])
|
|
176
|
+
schema: o(b)(n.value.items)
|
|
177
|
+
}, null, 8, ["compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
|
|
172
178
|
])) : s("", !0)
|
|
173
179
|
], 64)) : s("", !0),
|
|
174
|
-
(
|
|
175
|
-
var
|
|
176
|
-
return
|
|
177
|
-
key:
|
|
180
|
+
(i(!0), a(h, null, z(E.value, (C) => {
|
|
181
|
+
var j;
|
|
182
|
+
return i(), c(J, {
|
|
183
|
+
key: C.composition,
|
|
178
184
|
breadcrumb: e.breadcrumb,
|
|
179
185
|
compact: e.compact,
|
|
180
|
-
composition:
|
|
181
|
-
discriminator: (
|
|
186
|
+
composition: C.composition,
|
|
187
|
+
discriminator: (j = e.value) == null ? void 0 : j.discriminator,
|
|
182
188
|
hideHeading: e.hideHeading,
|
|
189
|
+
hideReadOnly: e.hideReadOnly,
|
|
190
|
+
hideWriteOnly: e.hideWriteOnly,
|
|
183
191
|
level: e.level,
|
|
184
192
|
name: e.name,
|
|
185
193
|
noncollapsible: e.noncollapsible,
|
|
186
|
-
value:
|
|
187
|
-
}, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "level", "name", "noncollapsible", "value"]);
|
|
194
|
+
value: o(b)(u.value)
|
|
195
|
+
}, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "value"]);
|
|
188
196
|
}), 128)),
|
|
189
|
-
|
|
197
|
+
d(o(Y), { value: n.value }, null, 8, ["value"])
|
|
190
198
|
];
|
|
191
199
|
}),
|
|
192
200
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAqRA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAsSF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ParameterListItem.vue2.js";
|
|
2
2
|
import "./ParameterListItem.vue3.js";
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f259ff0d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as S, computed as m, ref as q, createElementBlock as I, openBlock as n, createVNode as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import { isDefined as
|
|
1
|
+
import { defineComponent as S, computed as m, ref as q, createElementBlock as I, openBlock as n, createVNode as c, createElementVNode as p, unref as o, withCtx as f, createBlock as d, createCommentVNode as v, normalizeClass as E, toDisplayString as N } from "vue";
|
|
2
|
+
import { Disclosure as O, DisclosureButton as P, DisclosurePanel as R } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as j } from "@scalar/components";
|
|
4
|
+
import { isDefined as z } from "@scalar/helpers/array/is-defined";
|
|
5
5
|
import { ScalarIconCaretRight as H } from "@scalar/icons";
|
|
6
6
|
import { getResolvedRef as B } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
7
7
|
import L from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
8
8
|
import M from "./ContentTypeSelect.vue.js";
|
|
9
9
|
import T from "./Headers.vue.js";
|
|
10
|
-
const U = { class: "parameter-item group/parameter-item relative" },
|
|
10
|
+
const U = { class: "parameter-item group/parameter-item relative" }, W = { class: "parameter-item-name" }, $ = { class: "parameter-item-type" }, A = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, ae = /* @__PURE__ */ S({
|
|
11
11
|
__name: "ParameterListItem",
|
|
12
12
|
props: {
|
|
13
13
|
parameter: {},
|
|
@@ -25,36 +25,36 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
|
|
|
25
25
|
() => "headers" in e.parameter && e.parameter.headers ? e.parameter.headers : null
|
|
26
26
|
), C = m(() => {
|
|
27
27
|
var b, y, g, k, w, x;
|
|
28
|
-
const a = t.value ? (y = (b = t.value) == null ? void 0 : b[i.value]) == null ? void 0 : y.schema : s.value,
|
|
28
|
+
const a = t.value ? (y = (b = t.value) == null ? void 0 : b[i.value]) == null ? void 0 : y.schema : s.value, u = "deprecated" in e.parameter ? e.parameter.deprecated : (g = s.value) == null ? void 0 : g.deprecated, r = "examples" in e.parameter ? e.parameter.examples : {}, V = ((k = s.value) == null ? void 0 : k.examples) ?? [], D = [...Object.values({
|
|
29
29
|
...r,
|
|
30
30
|
...(x = (w = t.value) == null ? void 0 : w[i.value]) == null ? void 0 : x.examples
|
|
31
31
|
}), ...V];
|
|
32
32
|
return {
|
|
33
33
|
...B(a),
|
|
34
|
-
deprecated:
|
|
35
|
-
..."example" in e.parameter &&
|
|
34
|
+
deprecated: u,
|
|
35
|
+
..."example" in e.parameter && z(e.parameter.example) && { example: e.parameter.example },
|
|
36
36
|
examples: D
|
|
37
37
|
};
|
|
38
38
|
}), l = m(
|
|
39
39
|
() => !!(e.collapsableItems && (t.value || h.value || s.value))
|
|
40
40
|
);
|
|
41
|
-
return (a,
|
|
42
|
-
|
|
41
|
+
return (a, u) => (n(), I("li", U, [
|
|
42
|
+
c(o(O), null, {
|
|
43
43
|
default: f(({ open: r }) => [
|
|
44
|
-
l.value ? (n(), d(o(
|
|
44
|
+
l.value ? (n(), d(o(P), {
|
|
45
45
|
key: 0,
|
|
46
46
|
class: E(["parameter-item-trigger", { "parameter-item-trigger-open": r }])
|
|
47
47
|
}, {
|
|
48
48
|
default: f(() => [
|
|
49
|
-
p("span",
|
|
50
|
-
|
|
49
|
+
p("span", W, [
|
|
50
|
+
c(o(H), {
|
|
51
51
|
class: E(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": r }]),
|
|
52
52
|
weight: "bold"
|
|
53
53
|
}, null, 8, ["class"]),
|
|
54
54
|
p("span", null, N(a.name), 1)
|
|
55
55
|
]),
|
|
56
|
-
p("span",
|
|
57
|
-
a.parameter.description ? (n(), d(o(
|
|
56
|
+
p("span", $, [
|
|
57
|
+
a.parameter.description ? (n(), d(o(j), {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: "markdown",
|
|
60
60
|
value: a.parameter.description
|
|
@@ -63,7 +63,7 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
|
|
|
63
63
|
]),
|
|
64
64
|
_: 2
|
|
65
65
|
}, 1032, ["class"])) : v("", !0),
|
|
66
|
-
|
|
66
|
+
c(o(R), {
|
|
67
67
|
class: "parameter-item-container parameter-item-container-markdown",
|
|
68
68
|
static: !l.value
|
|
69
69
|
}, {
|
|
@@ -73,11 +73,12 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
|
|
|
73
73
|
breadcrumb: a.breadcrumb,
|
|
74
74
|
headers: h.value
|
|
75
75
|
}, null, 8, ["breadcrumb", "headers"])) : v("", !0),
|
|
76
|
-
|
|
76
|
+
c(L, {
|
|
77
77
|
is: "div",
|
|
78
78
|
breadcrumb: a.breadcrumb,
|
|
79
79
|
compact: "",
|
|
80
80
|
description: l.value ? "" : a.parameter.description,
|
|
81
|
+
hideWriteOnly: !0,
|
|
81
82
|
name: l.value ? "" : a.name,
|
|
82
83
|
noncollapsible: !0,
|
|
83
84
|
required: "required" in a.parameter && a.parameter.required,
|
|
@@ -90,11 +91,11 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
|
|
|
90
91
|
]),
|
|
91
92
|
_: 1
|
|
92
93
|
}),
|
|
93
|
-
p("div",
|
|
94
|
+
p("div", A, [
|
|
94
95
|
l.value && t.value ? (n(), d(M, {
|
|
95
96
|
key: 0,
|
|
96
97
|
modelValue: i.value,
|
|
97
|
-
"onUpdate:modelValue":
|
|
98
|
+
"onUpdate:modelValue": u[0] || (u[0] = (r) => i.value = r),
|
|
98
99
|
class: "parameter-item-content-type",
|
|
99
100
|
content: t.value
|
|
100
101
|
}, null, 8, ["modelValue", "content"])) : v("", !0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAQrG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AA0MF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBody.vue2.js";
|
|
2
2
|
import "./RequestBody.vue3.js";
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-74a1b5fb"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { getResolvedRef as
|
|
4
|
-
import { isTypeObject as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as q, computed as m, ref as f, createElementBlock as s, createCommentVNode as d, openBlock as a, createElementVNode as h, createVNode as n, renderSlot as B, unref as u } from "vue";
|
|
2
|
+
import { ScalarMarkdown as R } from "@scalar/components";
|
|
3
|
+
import { getResolvedRef as k } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
+
import { isTypeObject as O } from "../../../components/Content/Schema/helpers/is-type-object.js";
|
|
5
|
+
import _ from "./ContentTypeSelect.vue.js";
|
|
6
6
|
import p from "../../../components/Content/Schema/Schema.vue.js";
|
|
7
|
-
const
|
|
7
|
+
const E = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "request-body"
|
|
10
|
-
},
|
|
10
|
+
}, P = { class: "request-body-header" }, V = { class: "request-body-title" }, j = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "request-body-required"
|
|
13
13
|
}, S = {
|
|
@@ -19,28 +19,28 @@ const P = {
|
|
|
19
19
|
}, T = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "request-body-schema"
|
|
22
|
-
}, b = 12, A = /* @__PURE__ */
|
|
22
|
+
}, b = 12, A = /* @__PURE__ */ q({
|
|
23
23
|
__name: "RequestBody",
|
|
24
24
|
props: {
|
|
25
25
|
breadcrumb: {},
|
|
26
26
|
requestBody: {}
|
|
27
27
|
},
|
|
28
|
-
setup(
|
|
28
|
+
setup(c) {
|
|
29
29
|
var v;
|
|
30
30
|
const y = m(
|
|
31
31
|
() => {
|
|
32
32
|
var e;
|
|
33
|
-
return Object.keys(((e =
|
|
33
|
+
return Object.keys(((e = c.requestBody) == null ? void 0 : e.content) ?? {});
|
|
34
34
|
}
|
|
35
35
|
), l = f("application/json");
|
|
36
|
-
(v =
|
|
36
|
+
(v = c.requestBody) != null && v.content && y.value.length > 0 && (l.value = y.value[0]);
|
|
37
37
|
const r = m(
|
|
38
38
|
() => {
|
|
39
39
|
var e, o, t;
|
|
40
|
-
return
|
|
40
|
+
return k((t = (o = (e = c.requestBody) == null ? void 0 : e.content) == null ? void 0 : o[l.value]) == null ? void 0 : t.schema);
|
|
41
41
|
}
|
|
42
42
|
), i = m(() => {
|
|
43
|
-
if (!r.value || !
|
|
43
|
+
if (!r.value || !O(r.value))
|
|
44
44
|
return null;
|
|
45
45
|
const e = Object.entries(r.value.properties ?? {});
|
|
46
46
|
if (e.length <= b)
|
|
@@ -61,48 +61,51 @@ const P = {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
|
-
return (e, o) => e.requestBody ? (a(), s("div",
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
return (e, o) => e.requestBody ? (a(), s("div", E, [
|
|
65
|
+
h("div", P, [
|
|
66
|
+
h("span", V, [
|
|
67
67
|
B(e.$slots, "title", {}, void 0, !0),
|
|
68
|
-
e.requestBody.required ? (a(), s("div",
|
|
68
|
+
e.requestBody.required ? (a(), s("div", j, " required ")) : d("", !0)
|
|
69
69
|
]),
|
|
70
|
-
n(
|
|
70
|
+
n(_, {
|
|
71
71
|
modelValue: l.value,
|
|
72
72
|
"onUpdate:modelValue": o[0] || (o[0] = (t) => l.value = t),
|
|
73
73
|
content: e.requestBody.content
|
|
74
74
|
}, null, 8, ["modelValue", "content"]),
|
|
75
75
|
e.requestBody.description ? (a(), s("div", S, [
|
|
76
|
-
n(
|
|
76
|
+
n(u(R), {
|
|
77
77
|
value: e.requestBody.description
|
|
78
78
|
}, null, 8, ["value"])
|
|
79
|
-
])) :
|
|
79
|
+
])) : d("", !0)
|
|
80
80
|
]),
|
|
81
81
|
i.value ? (a(), s("div", C, [
|
|
82
|
-
n(
|
|
82
|
+
n(u(p), {
|
|
83
83
|
breadcrumb: e.breadcrumb,
|
|
84
84
|
compact: "",
|
|
85
|
+
hideReadOnly: !0,
|
|
85
86
|
name: "Request Body",
|
|
86
87
|
noncollapsible: "",
|
|
87
88
|
schema: i.value.visibleProperties
|
|
88
89
|
}, null, 8, ["breadcrumb", "schema"]),
|
|
89
|
-
n(
|
|
90
|
+
n(u(p), {
|
|
90
91
|
additionalProperties: "",
|
|
91
92
|
breadcrumb: e.breadcrumb,
|
|
92
93
|
compact: "",
|
|
94
|
+
hideReadOnly: !0,
|
|
93
95
|
name: "Request Body",
|
|
94
96
|
schema: i.value.collapsedProperties
|
|
95
97
|
}, null, 8, ["breadcrumb", "schema"])
|
|
96
98
|
])) : r.value ? (a(), s("div", T, [
|
|
97
|
-
n(
|
|
99
|
+
n(u(p), {
|
|
98
100
|
breadcrumb: e.breadcrumb,
|
|
99
101
|
compact: "",
|
|
102
|
+
hideReadOnly: !0,
|
|
100
103
|
name: "Request Body",
|
|
101
104
|
noncollapsible: "",
|
|
102
105
|
schema: r.value
|
|
103
106
|
}, null, 8, ["breadcrumb", "schema"])
|
|
104
|
-
])) :
|
|
105
|
-
])) :
|
|
107
|
+
])) : d("", !0)
|
|
108
|
+
])) : d("", !0);
|
|
106
109
|
}
|
|
107
110
|
});
|
|
108
111
|
export {
|