@scalar/api-reference 1.36.0 → 1.36.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 +16 -0
- package/dist/browser/standalone.js +14762 -14744
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -0
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +52 -41
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +9 -8
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +46 -42
- package/dist/components/Content/Schema/Schema.vue.d.ts +3 -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 +72 -75
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +29 -40
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -5
- 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 +72 -76
- package/dist/components/Content/Schema/types.d.ts +17 -0
- package/dist/components/Content/Schema/types.d.ts.map +1 -0
- package/dist/features/Operation/components/Header.vue.d.ts +2 -0
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js +15 -10
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue2.js +23 -21
- 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 +55 -48
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +74 -61
- package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/helpers/convert-security-scheme.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
- package/package.json +10 -10
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import { getResolvedRef as
|
|
1
|
+
import { defineComponent as w, computed as t, createBlock as d, openBlock as n, resolveDynamicComponent as A, normalizeClass as T, withCtx as c, createCommentVNode as s, createElementBlock as o, createVNode as m, createSlots as q, unref as i, toDisplayString as v, Fragment as f, createTextVNode as P, renderList as E } from "vue";
|
|
2
|
+
import { ScalarMarkdown as O } from "@scalar/components";
|
|
3
|
+
import { isDefined as F } from "@scalar/helpers/array/is-defined";
|
|
4
|
+
import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
5
|
import { isArraySchema as u } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
6
|
-
import { isTypeObject as
|
|
7
|
-
import { optimizeValueForDisplay as
|
|
8
|
-
import { compositions as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
6
|
+
import { isTypeObject as M } from "./helpers/is-type-object.js";
|
|
7
|
+
import { optimizeValueForDisplay as $ } from "./helpers/optimize-value-for-display.js";
|
|
8
|
+
import { compositions as I } from "./helpers/schema-composition.js";
|
|
9
|
+
import C from "./Schema.vue.js";
|
|
10
|
+
import z from "./SchemaComposition.vue.js";
|
|
11
|
+
import U from "./SchemaEnumValues.vue.js";
|
|
12
|
+
import Z from "./SchemaPropertyHeading.vue.js";
|
|
13
|
+
import L from "../../Anchor/WithBreadcrumb.vue2.js";
|
|
14
|
+
import G from "../../../features/specification-extension/SpecificationExtension.vue2.js";
|
|
15
|
+
const J = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "property-name-pattern-properties"
|
|
18
|
-
},
|
|
18
|
+
}, K = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "property-name-additional-properties"
|
|
21
|
-
},
|
|
21
|
+
}, Q = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "property-description"
|
|
24
|
-
},
|
|
24
|
+
}, W = {
|
|
25
25
|
key: 2,
|
|
26
26
|
class: "property-description"
|
|
27
27
|
}, X = {
|
|
@@ -30,11 +30,11 @@ const G = {
|
|
|
30
30
|
}, Y = {
|
|
31
31
|
key: 0,
|
|
32
32
|
class: "children"
|
|
33
|
-
},
|
|
33
|
+
}, de = /* @__PURE__ */ w({
|
|
34
34
|
__name: "SchemaProperty",
|
|
35
35
|
props: {
|
|
36
36
|
is: {},
|
|
37
|
-
|
|
37
|
+
schema: {},
|
|
38
38
|
noncollapsible: { type: Boolean },
|
|
39
39
|
level: { default: 0 },
|
|
40
40
|
name: {},
|
|
@@ -44,13 +44,12 @@ const G = {
|
|
|
44
44
|
description: {},
|
|
45
45
|
hideModelNames: { type: Boolean, default: !1 },
|
|
46
46
|
hideHeading: { type: Boolean },
|
|
47
|
-
hideReadOnly: { type: Boolean },
|
|
48
|
-
hideWriteOnly: { type: Boolean },
|
|
49
47
|
variant: {},
|
|
50
|
-
breadcrumb: {}
|
|
48
|
+
breadcrumb: {},
|
|
49
|
+
options: {}
|
|
51
50
|
},
|
|
52
|
-
setup(
|
|
53
|
-
const
|
|
51
|
+
setup(j) {
|
|
52
|
+
const p = j, b = {
|
|
54
53
|
integer: {
|
|
55
54
|
_default: "Integer numbers.",
|
|
56
55
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -64,32 +63,32 @@ const G = {
|
|
|
64
63
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
65
64
|
binary: "binary data, used to describe files"
|
|
66
65
|
}
|
|
67
|
-
},
|
|
66
|
+
}, h = (e) => !e || !b[e.type] ? null : b[e.type][e.format || e.contentEncoding || "_default"], B = (e) => e?.enum || e?.items?.enum || [], a = t(() => $(p.schema)), g = t(() => {
|
|
68
67
|
const e = a.value;
|
|
69
|
-
return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e?.allOf || e?.allOf ? null :
|
|
70
|
-
}),
|
|
68
|
+
return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e?.allOf || e?.allOf ? null : p.description || e?.description || null;
|
|
69
|
+
}), N = (e, r, l) => r || e?.deprecated || e?.const !== void 0 || e?.enum && e.enum.length === 1 || e?.type || e?.nullable === !0 || e?.writeOnly || e?.readOnly || l, k = t(() => {
|
|
71
70
|
const e = a.value;
|
|
72
71
|
if (!e || !u(e) || typeof e.items != "object")
|
|
73
72
|
return !1;
|
|
74
|
-
const
|
|
75
|
-
return "type" in
|
|
76
|
-
}),
|
|
77
|
-
const
|
|
78
|
-
return
|
|
79
|
-
},
|
|
73
|
+
const r = e.items;
|
|
74
|
+
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;
|
|
75
|
+
}), S = (e) => {
|
|
76
|
+
const r = a.value;
|
|
77
|
+
return r && u(r) === !1 || !r?.items || typeof r.items != "object" || !(e in r.items) ? !1 : !k.value;
|
|
78
|
+
}, R = t(() => k.value), D = t(() => {
|
|
80
79
|
if (!a.value)
|
|
81
80
|
return !1;
|
|
82
|
-
const e = a.value,
|
|
83
|
-
return
|
|
84
|
-
}),
|
|
81
|
+
const e = a.value, r = M(e), l = "properties" in e || "additionalProperties" in e;
|
|
82
|
+
return r && l;
|
|
83
|
+
}), H = t(() => p.level <= 1), V = t(() => a.value ? I.map((e) => a.value?.[e] && !(u(a.value) && a.value?.items && typeof e == "string" && typeof a.value.items == "object" && e in a.value.items) ? {
|
|
85
84
|
composition: e,
|
|
86
85
|
value: a.value
|
|
87
|
-
} :
|
|
86
|
+
} : S(e) && a.value && u(a.value) && a.value.items ? {
|
|
88
87
|
composition: e,
|
|
89
88
|
value: a.value.items
|
|
90
|
-
} : null).filter(
|
|
91
|
-
return (e,
|
|
92
|
-
class:
|
|
89
|
+
} : null).filter(F) : []);
|
|
90
|
+
return (e, r) => (n(), d(A(e.is ?? "li"), {
|
|
91
|
+
class: T(["property", [
|
|
93
92
|
`property--level-${e.level}`,
|
|
94
93
|
{
|
|
95
94
|
"property--compact": e.compact,
|
|
@@ -98,24 +97,24 @@ const G = {
|
|
|
98
97
|
]])
|
|
99
98
|
}, {
|
|
100
99
|
default: c(() => [
|
|
101
|
-
|
|
100
|
+
N(a.value, e.name, e.required) ? (n(), d(Z, {
|
|
102
101
|
key: 0,
|
|
103
102
|
class: "group",
|
|
104
|
-
enum:
|
|
103
|
+
enum: B(a.value).length > 0,
|
|
105
104
|
hideModelNames: e.hideModelNames,
|
|
106
105
|
isDiscriminator: e.discriminator && e.discriminator.propertyName === e.name,
|
|
107
106
|
required: e.required,
|
|
108
107
|
value: a.value
|
|
109
|
-
},
|
|
108
|
+
}, q({ _: 2 }, [
|
|
110
109
|
e.name ? {
|
|
111
110
|
name: "name",
|
|
112
111
|
fn: c(() => [
|
|
113
|
-
|
|
114
|
-
breadcrumb:
|
|
112
|
+
m(i(L), {
|
|
113
|
+
breadcrumb: H.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
|
|
115
114
|
}, {
|
|
116
115
|
default: c(() => [
|
|
117
|
-
e.variant === "patternProperties" ? (
|
|
118
|
-
|
|
116
|
+
e.variant === "patternProperties" ? (n(), o("span", J, v(e.name), 1)) : e.variant === "additionalProperties" ? (n(), o("span", K, v(e.name), 1)) : (n(), o(f, { key: 2 }, [
|
|
117
|
+
P(v(e.name), 1)
|
|
119
118
|
], 64))
|
|
120
119
|
]),
|
|
121
120
|
_: 1
|
|
@@ -126,67 +125,64 @@ const G = {
|
|
|
126
125
|
a.value?.example ? {
|
|
127
126
|
name: "example",
|
|
128
127
|
fn: c(() => [
|
|
129
|
-
|
|
128
|
+
P(" Example: " + v(a.value.example), 1)
|
|
130
129
|
]),
|
|
131
130
|
key: "1"
|
|
132
131
|
} : void 0
|
|
133
132
|
]), 1032, ["enum", "hideModelNames", "isDiscriminator", "required", "value"])) : s("", !0),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
])) :
|
|
137
|
-
|
|
138
|
-
value:
|
|
133
|
+
g.value ? (n(), o("div", Q, [
|
|
134
|
+
m(i(O), { value: g.value }, null, 8, ["value"])
|
|
135
|
+
])) : h(a.value) ? (n(), o("div", W, [
|
|
136
|
+
m(i(O), {
|
|
137
|
+
value: h(a.value) || ""
|
|
139
138
|
}, null, 8, ["value"])
|
|
140
139
|
])) : s("", !0),
|
|
141
|
-
(a.value?.enum || a.value &&
|
|
140
|
+
(a.value?.enum || a.value && i(u)(a.value) && i(y)(a.value?.items)?.enum || []).length ? (n(), d(U, {
|
|
142
141
|
key: 3,
|
|
143
142
|
value: a.value
|
|
144
143
|
}, null, 8, ["value"])) : s("", !0),
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
D.value ? (n(), o("div", X, [
|
|
145
|
+
m(C, {
|
|
147
146
|
breadcrumb: e.breadcrumb && e.name ? [...e.breadcrumb, e.name] : void 0,
|
|
148
147
|
compact: e.compact,
|
|
149
|
-
hideReadOnly: e.hideReadOnly,
|
|
150
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
151
148
|
level: e.level + 1,
|
|
152
149
|
name: e.name,
|
|
153
150
|
noncollapsible: e.noncollapsible,
|
|
151
|
+
options: e.options,
|
|
154
152
|
schema: a.value
|
|
155
|
-
}, null, 8, ["breadcrumb", "compact", "
|
|
153
|
+
}, null, 8, ["breadcrumb", "compact", "level", "name", "noncollapsible", "options", "schema"])
|
|
156
154
|
])) : s("", !0),
|
|
157
|
-
a.value &&
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
a.value && i(u)(a.value) && typeof a.value.items == "object" ? (n(), o(f, { key: 5 }, [
|
|
156
|
+
R.value ? (n(), o("div", Y, [
|
|
157
|
+
m(C, {
|
|
160
158
|
compact: e.compact,
|
|
161
|
-
hideReadOnly: e.hideReadOnly,
|
|
162
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
163
159
|
level: e.level + 1,
|
|
164
160
|
name: e.name,
|
|
165
161
|
noncollapsible: e.noncollapsible,
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
options: e.options,
|
|
163
|
+
schema: i(y)(a.value.items)
|
|
164
|
+
}, null, 8, ["compact", "level", "name", "noncollapsible", "options", "schema"])
|
|
168
165
|
])) : s("", !0)
|
|
169
166
|
], 64)) : s("", !0),
|
|
170
|
-
(
|
|
171
|
-
key:
|
|
167
|
+
(n(!0), o(f, null, E(V.value, (l) => (n(), d(z, {
|
|
168
|
+
key: l.composition,
|
|
172
169
|
breadcrumb: e.breadcrumb,
|
|
173
170
|
compact: e.compact,
|
|
174
|
-
composition:
|
|
175
|
-
discriminator: e.
|
|
171
|
+
composition: l.composition,
|
|
172
|
+
discriminator: e.schema?.discriminator,
|
|
176
173
|
hideHeading: e.hideHeading,
|
|
177
|
-
hideReadOnly: e.hideReadOnly,
|
|
178
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
179
174
|
level: e.level,
|
|
180
175
|
name: e.name,
|
|
181
176
|
noncollapsible: e.noncollapsible,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
177
|
+
options: e.options,
|
|
178
|
+
schema: i(y)(p.schema)
|
|
179
|
+
}, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "level", "name", "noncollapsible", "options", "schema"]))), 128)),
|
|
180
|
+
m(i(G), { value: a.value }, null, 8, ["value"])
|
|
185
181
|
]),
|
|
186
182
|
_: 1
|
|
187
183
|
}, 8, ["class"]));
|
|
188
184
|
}
|
|
189
185
|
});
|
|
190
186
|
export {
|
|
191
|
-
|
|
187
|
+
de as default
|
|
192
188
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
|
+
/**
|
|
3
|
+
* Options for the schema component tree
|
|
4
|
+
*
|
|
5
|
+
* These options should be prop drilled through the Schema component tree and shouldn't be changed
|
|
6
|
+
*/
|
|
7
|
+
export type SchemaOptions = {
|
|
8
|
+
/** Hide read-only properties */
|
|
9
|
+
hideReadOnly?: boolean;
|
|
10
|
+
/** Hide write-only properties */
|
|
11
|
+
hideWriteOnly?: boolean;
|
|
12
|
+
/** Order schema properties, defaults to 'alpha' */
|
|
13
|
+
orderSchemaPropertiesBy?: ApiReferenceConfiguration['orderSchemaPropertiesBy'];
|
|
14
|
+
/** Order required properties first */
|
|
15
|
+
orderRequiredPropertiesFirst?: ApiReferenceConfiguration['orderRequiredPropertiesFirst'];
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,mDAAmD;IACnD,uBAAuB,CAAC,EAAE,yBAAyB,CAAC,yBAAyB,CAAC,CAAA;IAC9E,sCAAsC;IACtC,4BAA4B,CAAC,EAAE,yBAAyB,CAAC,8BAA8B,CAAC,CAAA;CACzF,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
1
2
|
import type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
header: HeaderObject;
|
|
4
5
|
name: string;
|
|
5
6
|
breadcrumb?: string[];
|
|
7
|
+
config: ApiReferenceConfiguration;
|
|
6
8
|
};
|
|
7
9
|
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>;
|
|
8
10
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Header.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Header.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AA0DF,wBAMG"}
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import { defineComponent as r, createBlock as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as r, createBlock as o, createCommentVNode as a, openBlock as m, unref as d } from "vue";
|
|
2
|
+
import { getResolvedRef as i } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import n from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
4
|
+
const u = /* @__PURE__ */ r({
|
|
5
5
|
__name: "Header",
|
|
6
6
|
props: {
|
|
7
7
|
header: {},
|
|
8
8
|
name: {},
|
|
9
|
-
breadcrumb: {}
|
|
9
|
+
breadcrumb: {},
|
|
10
|
+
config: {}
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
return (e,
|
|
12
|
+
setup(s) {
|
|
13
|
+
return (e, p) => "schema" in e.header && e.header.schema ? (m(), o(n, {
|
|
13
14
|
key: 0,
|
|
14
15
|
breadcrumb: e.breadcrumb ? [...e.breadcrumb, "headers"] : void 0,
|
|
15
16
|
description: e.header.description,
|
|
16
17
|
name: e.name,
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
options: {
|
|
19
|
+
orderRequiredPropertiesFirst: e.config.orderRequiredPropertiesFirst,
|
|
20
|
+
orderSchemaPropertiesBy: e.config.orderSchemaPropertiesBy
|
|
21
|
+
},
|
|
22
|
+
schema: d(i)(e.header.schema)
|
|
23
|
+
}, null, 8, ["breadcrumb", "description", "name", "options", "schema"])) : a("", !0);
|
|
19
24
|
}
|
|
20
25
|
});
|
|
21
26
|
export {
|
|
22
|
-
|
|
27
|
+
u as default
|
|
23
28
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
1
2
|
import type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
headers: Record<string, HeaderObject>;
|
|
4
5
|
breadcrumb?: string[];
|
|
6
|
+
config: ApiReferenceConfiguration;
|
|
5
7
|
};
|
|
6
8
|
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>;
|
|
7
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Headers.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Headers.vue"],"names":[],"mappings":"AAyHA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AAoJF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Headers.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-6b889a81"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
import { defineComponent as p, createBlock as i, openBlock as e, unref as r, withCtx as d, createElementVNode as m, normalizeClass as
|
|
2
|
-
import { Disclosure as b, DisclosureButton as _, DisclosurePanel as
|
|
3
|
-
import { ScalarIcon as
|
|
4
|
-
import { getResolvedRef as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as p, createBlock as i, openBlock as e, unref as r, withCtx as d, createElementVNode as m, normalizeClass as c, createVNode as o, createElementBlock as t, Fragment as l, createTextVNode as u, renderList as f } from "vue";
|
|
2
|
+
import { Disclosure as b, DisclosureButton as _, DisclosurePanel as g } from "@headlessui/vue";
|
|
3
|
+
import { ScalarIcon as v } from "@scalar/components";
|
|
4
|
+
import { getResolvedRef as k } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
|
+
import B from "./Header.vue.js";
|
|
6
6
|
const z = /* @__PURE__ */ p({
|
|
7
7
|
__name: "Headers",
|
|
8
8
|
props: {
|
|
9
9
|
headers: {},
|
|
10
|
-
breadcrumb: {}
|
|
10
|
+
breadcrumb: {},
|
|
11
|
+
config: {}
|
|
11
12
|
},
|
|
12
|
-
setup(
|
|
13
|
-
return (
|
|
14
|
-
default: d(({ open:
|
|
13
|
+
setup(H) {
|
|
14
|
+
return (a, C) => (e(), i(r(b), null, {
|
|
15
|
+
default: d(({ open: s }) => [
|
|
15
16
|
m("div", {
|
|
16
|
-
class:
|
|
17
|
+
class: c(["headers-card headers-card--compact", [{ "headers-card--open": s }]])
|
|
17
18
|
}, [
|
|
18
19
|
m("div", {
|
|
19
|
-
class:
|
|
20
|
+
class: c(["headers-properties", { "headers-properties-open": s }])
|
|
20
21
|
}, [
|
|
21
|
-
|
|
22
|
+
o(r(_), {
|
|
22
23
|
class: "headers-card-title headers-card-title--compact",
|
|
23
24
|
style: {
|
|
24
25
|
top: "calc(var(--refs-header-height)))"
|
|
25
26
|
}
|
|
26
27
|
}, {
|
|
27
28
|
default: d(() => [
|
|
28
|
-
|
|
29
|
-
class:
|
|
29
|
+
o(r(v), {
|
|
30
|
+
class: c(["headers-card-title-icon", { "headers-card-title-icon--open": s }]),
|
|
30
31
|
icon: "Add",
|
|
31
32
|
size: "sm"
|
|
32
33
|
}, null, 8, ["class"]),
|
|
33
|
-
|
|
34
|
+
s ? (e(), t(l, { key: 0 }, [
|
|
34
35
|
u(" Hide Headers ")
|
|
35
|
-
], 64)) : (e(),
|
|
36
|
+
], 64)) : (e(), t(l, { key: 1 }, [
|
|
36
37
|
u(" Show Headers ")
|
|
37
38
|
], 64))
|
|
38
39
|
]),
|
|
39
40
|
_: 2
|
|
40
41
|
}, 1024),
|
|
41
|
-
|
|
42
|
+
o(r(g), null, {
|
|
42
43
|
default: d(() => [
|
|
43
|
-
(e(!0),
|
|
44
|
+
(e(!0), t(l, null, f(a.headers, (h, n) => (e(), i(B, {
|
|
44
45
|
key: n,
|
|
45
|
-
breadcrumb:
|
|
46
|
-
|
|
46
|
+
breadcrumb: a.breadcrumb ? [...a.breadcrumb, "headers"] : void 0,
|
|
47
|
+
config: a.config,
|
|
48
|
+
header: r(k)(h),
|
|
47
49
|
name: n
|
|
48
|
-
}, null, 8, ["breadcrumb", "header", "name"]))), 128))
|
|
50
|
+
}, null, 8, ["breadcrumb", "config", "header", "name"]))), 128))
|
|
49
51
|
]),
|
|
50
52
|
_: 1
|
|
51
53
|
})
|
|
@@ -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":"AA8RA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AASrE,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;;AAqTF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ParameterListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const a = /* @__PURE__ */
|
|
3
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-de860ce9"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import { isDefined as
|
|
5
|
-
import { ScalarIconCaretRight as
|
|
6
|
-
import { getResolvedRef as
|
|
1
|
+
import { defineComponent as E, computed as o, ref as B, createElementBlock as C, openBlock as n, createVNode as u, createElementVNode as p, unref as r, withCtx as b, createBlock as d, createCommentVNode as h, normalizeClass as y, toDisplayString as P } from "vue";
|
|
2
|
+
import { Disclosure as S, DisclosureButton as q, DisclosurePanel as V } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as D } from "@scalar/components";
|
|
4
|
+
import { isDefined as R } from "@scalar/helpers/array/is-defined";
|
|
5
|
+
import { ScalarIconCaretRight as I } from "@scalar/icons";
|
|
6
|
+
import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
7
7
|
import O from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
8
|
+
import { useConfig as N } from "../../../hooks/useConfig.js";
|
|
9
|
+
import j from "./ContentTypeSelect.vue.js";
|
|
10
|
+
import z from "./Headers.vue.js";
|
|
11
|
+
const F = { class: "parameter-item group/parameter-item relative" }, W = { class: "parameter-item-name" }, H = { class: "parameter-item-type" }, L = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, Z = /* @__PURE__ */ E({
|
|
11
12
|
__name: "ParameterListItem",
|
|
12
13
|
props: {
|
|
13
14
|
parameter: {},
|
|
@@ -17,62 +18,63 @@ const j = { class: "parameter-item group/parameter-item relative" }, z = { class
|
|
|
17
18
|
breadcrumb: {}
|
|
18
19
|
},
|
|
19
20
|
setup(e) {
|
|
20
|
-
const s =
|
|
21
|
-
() => "schema" in e.parameter && e.parameter.schema ?
|
|
22
|
-
), t =
|
|
21
|
+
const v = N(), s = o(
|
|
22
|
+
() => "schema" in e.parameter && e.parameter.schema ? g(e.parameter.schema) : null
|
|
23
|
+
), t = o(
|
|
23
24
|
() => "content" in e.parameter && e.parameter.content ? e.parameter.content : null
|
|
24
|
-
), i =
|
|
25
|
+
), i = B(Object.keys(t.value || {})[0]), f = o(
|
|
25
26
|
() => "headers" in e.parameter && e.parameter.headers ? e.parameter.headers : null
|
|
26
|
-
),
|
|
27
|
-
const a = t.value ? t.value?.[i.value]?.schema : s.value,
|
|
28
|
-
...
|
|
27
|
+
), k = o(() => {
|
|
28
|
+
const a = t.value ? t.value?.[i.value]?.schema : s.value, c = "deprecated" in e.parameter ? e.parameter.deprecated : s.value?.deprecated, m = "examples" in e.parameter ? e.parameter.examples : {}, w = s.value?.examples ?? [], x = [...Object.values({
|
|
29
|
+
...m,
|
|
29
30
|
...t.value?.[i.value]?.examples
|
|
30
|
-
}), ...
|
|
31
|
+
}), ...w];
|
|
31
32
|
return {
|
|
32
|
-
...
|
|
33
|
-
deprecated:
|
|
34
|
-
..."example" in e.parameter &&
|
|
35
|
-
examples:
|
|
33
|
+
...g(a),
|
|
34
|
+
deprecated: c,
|
|
35
|
+
..."example" in e.parameter && R(e.parameter.example) && { example: e.parameter.example },
|
|
36
|
+
examples: x
|
|
36
37
|
};
|
|
37
|
-
}), l =
|
|
38
|
-
() => !!(e.collapsableItems && (t.value ||
|
|
38
|
+
}), l = o(
|
|
39
|
+
() => !!(e.collapsableItems && (t.value || f.value || s.value))
|
|
39
40
|
);
|
|
40
|
-
return (a,
|
|
41
|
-
|
|
42
|
-
default:
|
|
43
|
-
l.value ? (n(), d(
|
|
41
|
+
return (a, c) => (n(), C("li", F, [
|
|
42
|
+
u(r(S), null, {
|
|
43
|
+
default: b(({ open: m }) => [
|
|
44
|
+
l.value ? (n(), d(r(q), {
|
|
44
45
|
key: 0,
|
|
45
|
-
class:
|
|
46
|
+
class: y(["parameter-item-trigger", { "parameter-item-trigger-open": m }])
|
|
46
47
|
}, {
|
|
47
|
-
default:
|
|
48
|
-
p("span",
|
|
49
|
-
|
|
50
|
-
class:
|
|
48
|
+
default: b(() => [
|
|
49
|
+
p("span", W, [
|
|
50
|
+
u(r(I), {
|
|
51
|
+
class: y(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": m }]),
|
|
51
52
|
weight: "bold"
|
|
52
53
|
}, null, 8, ["class"]),
|
|
53
|
-
p("span", null,
|
|
54
|
+
p("span", null, P(a.name), 1)
|
|
54
55
|
]),
|
|
55
56
|
p("span", H, [
|
|
56
|
-
a.parameter.description ? (n(), d(
|
|
57
|
+
a.parameter.description ? (n(), d(r(D), {
|
|
57
58
|
key: 0,
|
|
58
59
|
class: "markdown",
|
|
59
60
|
value: a.parameter.description
|
|
60
|
-
}, null, 8, ["value"])) :
|
|
61
|
+
}, null, 8, ["value"])) : h("", !0)
|
|
61
62
|
])
|
|
62
63
|
]),
|
|
63
64
|
_: 2
|
|
64
|
-
}, 1032, ["class"])) :
|
|
65
|
-
|
|
65
|
+
}, 1032, ["class"])) : h("", !0),
|
|
66
|
+
u(r(V), {
|
|
66
67
|
class: "parameter-item-container parameter-item-container-markdown",
|
|
67
68
|
static: !l.value
|
|
68
69
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
|
|
70
|
+
default: b(() => [
|
|
71
|
+
f.value ? (n(), d(z, {
|
|
71
72
|
key: 0,
|
|
72
73
|
breadcrumb: a.breadcrumb,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
config: r(v),
|
|
75
|
+
headers: f.value
|
|
76
|
+
}, null, 8, ["breadcrumb", "config", "headers"])) : h("", !0),
|
|
77
|
+
u(O, {
|
|
76
78
|
is: "div",
|
|
77
79
|
breadcrumb: a.breadcrumb,
|
|
78
80
|
compact: "",
|
|
@@ -80,10 +82,15 @@ const j = { class: "parameter-item group/parameter-item relative" }, z = { class
|
|
|
80
82
|
hideWriteOnly: !0,
|
|
81
83
|
name: l.value ? "" : a.name,
|
|
82
84
|
noncollapsible: !0,
|
|
85
|
+
options: {
|
|
86
|
+
hideWriteOnly: !0,
|
|
87
|
+
orderRequiredPropertiesFirst: r(v).orderRequiredPropertiesFirst,
|
|
88
|
+
orderSchemaPropertiesBy: r(v).orderSchemaPropertiesBy
|
|
89
|
+
},
|
|
83
90
|
required: "required" in a.parameter && a.parameter.required,
|
|
84
|
-
|
|
91
|
+
schema: k.value,
|
|
85
92
|
withExamples: a.withExamples
|
|
86
|
-
}, null, 8, ["breadcrumb", "description", "name", "required", "
|
|
93
|
+
}, null, 8, ["breadcrumb", "description", "name", "options", "required", "schema", "withExamples"])
|
|
87
94
|
]),
|
|
88
95
|
_: 1
|
|
89
96
|
}, 8, ["static"])
|
|
@@ -91,17 +98,17 @@ const j = { class: "parameter-item group/parameter-item relative" }, z = { class
|
|
|
91
98
|
_: 1
|
|
92
99
|
}),
|
|
93
100
|
p("div", L, [
|
|
94
|
-
l.value && t.value ? (n(), d(
|
|
101
|
+
l.value && t.value ? (n(), d(j, {
|
|
95
102
|
key: 0,
|
|
96
103
|
modelValue: i.value,
|
|
97
|
-
"onUpdate:modelValue":
|
|
104
|
+
"onUpdate:modelValue": c[0] || (c[0] = (m) => i.value = m),
|
|
98
105
|
class: "parameter-item-content-type",
|
|
99
106
|
content: t.value
|
|
100
|
-
}, null, 8, ["modelValue", "content"])) :
|
|
107
|
+
}, null, 8, ["modelValue", "content"])) : h("", !0)
|
|
101
108
|
])
|
|
102
109
|
]));
|
|
103
110
|
}
|
|
104
111
|
});
|
|
105
112
|
export {
|
|
106
|
-
|
|
113
|
+
Z as default
|
|
107
114
|
};
|
|
@@ -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":"AAqNA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAarG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AAqPF,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;AA0B7C,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"}
|