@scalar/api-reference 1.25.52 → 1.25.53
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 +32 -0
- package/README.md +3 -2
- package/dist/browser/standalone.js +12953 -12838
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +1 -1
- package/dist/components/Anchor/Anchor.vue2.js +9 -9
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +26 -31
- package/dist/components/Card/CardTab.vue.d.ts.map +1 -1
- package/dist/components/Card/CardTab.vue.js +2 -2
- package/dist/components/Card/CardTab.vue2.js +3 -3
- package/dist/components/Content/Operation/ParameterItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/ParameterItem.vue.js +4 -4
- package/dist/components/Content/Operation/ParameterItem.vue2.js +72 -54
- package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
- package/dist/components/Content/Operation/TestRequestButton.vue2.js +22 -15
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +3 -3
- 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 +114 -88
- package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +79 -64
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +3 -3
- package/dist/components/Content/Tag/Tag.vue2.js +34 -21
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +3 -9
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +27 -33
- package/dist/features/ApiClientModal/useApiClient.d.ts +140 -12
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +4 -4
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +11 -9
- package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExamplePicker.vue.js +3 -3
- package/dist/features/ExampleRequest/ExamplePicker.vue2.js +28 -21
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +139 -119
- package/dist/features/ExampleRequest/TextSelect.vue.d.ts +2 -0
- package/dist/features/ExampleRequest/TextSelect.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/TextSelect.vue.js +22 -19
- package/dist/features/ExampleResponses/ExampleResponse.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +88 -81
- package/dist/index.js +1 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +3 -3
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +30 -25
- package/dist/style.css +1 -1
- package/package.json +10 -9
|
@@ -1,164 +1,171 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
import { normalizeMimeTypeObject as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useClipboard as
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as N, useId as F, ref as S, computed as v, openBlock as t, createBlock as r, unref as o, withCtx as u, createVNode as h, createElementBlock as x, createCommentVNode as f, createTextVNode as w, withDirectives as I, createElementVNode as _, vModelCheckbox as O, Fragment as R, renderList as A, toDisplayString as D } from "vue";
|
|
2
|
+
import { ScalarIcon as P, ScalarCodeBlock as U, ScalarMarkdown as H } from "@scalar/components";
|
|
3
|
+
import { normalizeMimeTypeObject as J } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import T from "./ExampleResponse.vue.js";
|
|
5
|
+
import K from "../../components/Card/Card.vue.js";
|
|
6
|
+
import L from "../../components/Card/CardTabHeader.vue.js";
|
|
7
|
+
import W from "../../components/Card/CardTab.vue.js";
|
|
8
|
+
import q from "../../components/Card/CardContent.vue.js";
|
|
9
|
+
import G from "../../components/Card/CardFooter.vue.js";
|
|
10
|
+
import Q from "../ExampleRequest/ExamplePicker.vue.js";
|
|
11
|
+
import { useClipboard as X } from "../../hooks/useClipboard.js";
|
|
12
|
+
const Y = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "scalar-card-checkbox"
|
|
15
|
-
},
|
|
15
|
+
}, Z = ["aria-controls"], $ = { class: "scalar-card-container custom-scroll" }, z = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "response-description"
|
|
18
|
-
},
|
|
18
|
+
}, ie = /* @__PURE__ */ N({
|
|
19
19
|
__name: "ExampleResponses",
|
|
20
20
|
props: {
|
|
21
21
|
operation: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
23
|
+
setup(V) {
|
|
24
|
+
const k = V, c = F(), { copyToClipboard: j } = X(), p = S(), C = v(
|
|
25
25
|
() => {
|
|
26
26
|
var a, e;
|
|
27
|
-
return Object.keys(((e = (a =
|
|
27
|
+
return Object.keys(((e = (a = k == null ? void 0 : k.operation) == null ? void 0 : a.information) == null ? void 0 : e.responses) ?? {}).sort();
|
|
28
28
|
}
|
|
29
|
-
),
|
|
30
|
-
() => !!
|
|
31
|
-
), g =
|
|
29
|
+
), y = v(
|
|
30
|
+
() => !!l.value.examples
|
|
31
|
+
), g = S(0), i = v(() => {
|
|
32
32
|
var e, m;
|
|
33
|
-
const a =
|
|
34
|
-
return (m = (e =
|
|
35
|
-
}),
|
|
33
|
+
const a = C.value[g.value];
|
|
34
|
+
return (m = (e = k.operation.information) == null ? void 0 : e.responses) == null ? void 0 : m[a];
|
|
35
|
+
}), l = v(() => {
|
|
36
36
|
var e;
|
|
37
|
-
const a =
|
|
38
|
-
(e =
|
|
37
|
+
const a = J(
|
|
38
|
+
(e = i.value) == null ? void 0 : e.content
|
|
39
39
|
);
|
|
40
40
|
return (
|
|
41
41
|
// OpenAPI 3.x
|
|
42
42
|
(a == null ? void 0 : a["application/json"]) ?? (a == null ? void 0 : a["text/plain"]) ?? // Swagger 2.0
|
|
43
|
-
|
|
43
|
+
i.value
|
|
44
44
|
);
|
|
45
|
-
}),
|
|
46
|
-
if (
|
|
47
|
-
if (Array.isArray(
|
|
48
|
-
return
|
|
45
|
+
}), B = () => {
|
|
46
|
+
if (y.value) {
|
|
47
|
+
if (Array.isArray(l.value.examples))
|
|
48
|
+
return l.value.examples[0];
|
|
49
49
|
{
|
|
50
|
-
const a = Object.keys(
|
|
51
|
-
return
|
|
50
|
+
const a = Object.keys(l.value.examples)[0];
|
|
51
|
+
return l.value.examples[a];
|
|
52
52
|
}
|
|
53
|
-
} else return
|
|
54
|
-
},
|
|
55
|
-
...
|
|
56
|
-
example:
|
|
57
|
-
})),
|
|
58
|
-
g.value = a,
|
|
59
|
-
},
|
|
60
|
-
return (a, e) =>
|
|
53
|
+
} else return l.value.example;
|
|
54
|
+
}, b = v(() => ({
|
|
55
|
+
...l.value,
|
|
56
|
+
example: y.value && p.value ? l.value.examples[p.value].value ?? l.value.examples[p.value] : B()
|
|
57
|
+
})), M = (a) => {
|
|
58
|
+
g.value = a, p.value = void 0;
|
|
59
|
+
}, E = S(!1);
|
|
60
|
+
return (a, e) => C.value.length ? (t(), r(o(K), { key: 0 }, {
|
|
61
61
|
default: u(() => {
|
|
62
62
|
var m;
|
|
63
63
|
return [
|
|
64
|
-
|
|
64
|
+
h(o(L), {
|
|
65
65
|
muted: "",
|
|
66
66
|
x: "as",
|
|
67
|
-
onChange:
|
|
67
|
+
onChange: M
|
|
68
68
|
}, {
|
|
69
69
|
actions: u(() => {
|
|
70
|
-
var
|
|
70
|
+
var s, d;
|
|
71
71
|
return [
|
|
72
|
-
(
|
|
72
|
+
(s = l.value) != null && s.example ? (t(), x("button", {
|
|
73
73
|
key: 0,
|
|
74
74
|
class: "code-copy",
|
|
75
75
|
type: "button",
|
|
76
76
|
onClick: e[0] || (e[0] = () => {
|
|
77
77
|
var n;
|
|
78
|
-
return
|
|
78
|
+
return o(j)((n = l.value) == null ? void 0 : n.example);
|
|
79
79
|
})
|
|
80
80
|
}, [
|
|
81
|
-
|
|
81
|
+
h(o(P), {
|
|
82
82
|
icon: "Clipboard",
|
|
83
83
|
width: "12px",
|
|
84
84
|
x: "asd"
|
|
85
85
|
})
|
|
86
|
-
])) :
|
|
87
|
-
(
|
|
86
|
+
])) : f("", !0),
|
|
87
|
+
(d = l.value) != null && d.schema ? (t(), x("label", Y, [
|
|
88
88
|
e[3] || (e[3] = w(" Show Schema ")),
|
|
89
|
-
|
|
90
|
-
"onUpdate:modelValue": e[1] || (e[1] = (n) =>
|
|
89
|
+
I(_("input", {
|
|
90
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => E.value = n),
|
|
91
|
+
"aria-controls": o(c),
|
|
91
92
|
class: "scalar-card-checkbox-input",
|
|
92
93
|
type: "checkbox"
|
|
93
|
-
}, null,
|
|
94
|
-
[
|
|
94
|
+
}, null, 8, Z), [
|
|
95
|
+
[O, E.value]
|
|
95
96
|
]),
|
|
96
|
-
e[4] || (e[4] =
|
|
97
|
-
])) :
|
|
97
|
+
e[4] || (e[4] = _("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
|
|
98
|
+
])) : f("", !0)
|
|
98
99
|
];
|
|
99
100
|
}),
|
|
100
101
|
default: u(() => [
|
|
101
|
-
(
|
|
102
|
+
(t(!0), x(R, null, A(C.value, (s) => (t(), r(o(W), {
|
|
103
|
+
key: s,
|
|
104
|
+
"aria-controls": o(c)
|
|
105
|
+
}, {
|
|
102
106
|
default: u(() => [
|
|
103
|
-
w(
|
|
107
|
+
w(D(s), 1)
|
|
104
108
|
]),
|
|
105
109
|
_: 2
|
|
106
|
-
},
|
|
110
|
+
}, 1032, ["aria-controls"]))), 128))
|
|
107
111
|
]),
|
|
108
112
|
_: 1
|
|
109
113
|
}),
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
_("div", $, [
|
|
115
|
+
h(o(q), { muted: "" }, {
|
|
112
116
|
default: u(() => {
|
|
113
|
-
var
|
|
117
|
+
var s;
|
|
114
118
|
return [
|
|
115
|
-
(
|
|
116
|
-
|
|
119
|
+
(s = l.value) != null && s.schema ? (t(), x(R, { key: 0 }, [
|
|
120
|
+
E.value && b.value ? (t(), r(o(U), {
|
|
117
121
|
key: 0,
|
|
118
|
-
|
|
122
|
+
id: o(c),
|
|
123
|
+
content: b.value,
|
|
119
124
|
lang: "json"
|
|
120
|
-
}, null, 8, ["content"])) : (
|
|
125
|
+
}, null, 8, ["id", "content"])) : (t(), r(T, {
|
|
121
126
|
key: 1,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
127
|
+
id: o(c),
|
|
128
|
+
response: b.value
|
|
129
|
+
}, null, 8, ["id", "response"]))
|
|
130
|
+
], 64)) : (t(), r(T, {
|
|
125
131
|
key: 1,
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
id: o(c),
|
|
133
|
+
response: b.value
|
|
134
|
+
}, null, 8, ["id", "response"]))
|
|
128
135
|
];
|
|
129
136
|
}),
|
|
130
137
|
_: 1
|
|
131
138
|
})
|
|
132
139
|
]),
|
|
133
|
-
(m =
|
|
140
|
+
(m = i.value) != null && m.description || y.value ? (t(), r(o(G), {
|
|
134
141
|
key: 0,
|
|
135
142
|
class: "response-card-footer",
|
|
136
143
|
muted: ""
|
|
137
144
|
}, {
|
|
138
145
|
default: u(() => {
|
|
139
|
-
var
|
|
146
|
+
var s, d;
|
|
140
147
|
return [
|
|
141
|
-
|
|
148
|
+
y.value ? (t(), r(o(Q), {
|
|
142
149
|
key: 0,
|
|
143
150
|
class: "response-example-selector",
|
|
144
|
-
examples: (
|
|
145
|
-
"onUpdate:modelValue": e[2] || (e[2] = (n) =>
|
|
146
|
-
}, null, 8, ["examples"])) : (
|
|
147
|
-
|
|
151
|
+
examples: (s = l.value) == null ? void 0 : s.examples,
|
|
152
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => p.value = n)
|
|
153
|
+
}, null, 8, ["examples"])) : (d = i.value) != null && d.description ? (t(), x("div", z, [
|
|
154
|
+
h(o(H), {
|
|
148
155
|
class: "markdown",
|
|
149
|
-
value:
|
|
156
|
+
value: i.value.description
|
|
150
157
|
}, null, 8, ["value"])
|
|
151
|
-
])) :
|
|
158
|
+
])) : f("", !0)
|
|
152
159
|
];
|
|
153
160
|
}),
|
|
154
161
|
_: 1
|
|
155
|
-
})) :
|
|
162
|
+
})) : f("", !0)
|
|
156
163
|
];
|
|
157
164
|
}),
|
|
158
165
|
_: 1
|
|
159
|
-
})) :
|
|
166
|
+
})) : f("", !0);
|
|
160
167
|
}
|
|
161
168
|
});
|
|
162
169
|
export {
|
|
163
|
-
|
|
170
|
+
ie as default
|
|
164
171
|
};
|