@scalar/api-reference 1.25.115 → 1.25.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/dist/browser/standalone.js +15973 -15829
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +39 -38
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +58 -60
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +124 -120
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +1 -3
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +36 -38
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +59 -55
- package/dist/features/ApiClientModal/useApiClient.d.ts +208 -128
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +6 -4
- 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 +130 -119
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -91
- package/dist/features/Operation/Operation.vue.d.ts +4 -5
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +34 -41
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -6
- 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 +54 -51
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -6
- 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 +71 -71
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts +1 -1
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useConfig.js +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +26 -24
- package/dist/hooks/useReactiveSpec.d.ts +1 -1
- package/dist/index.js +66 -72
- package/dist/style.css +1 -1
- package/package.json +12 -12
- package/dist/features/Operation/hooks/useRequestExample.d.ts +0 -17
- package/dist/features/Operation/hooks/useRequestExample.d.ts.map +0 -1
- package/dist/features/Operation/hooks/useRequestExample.js +0 -68
- package/dist/helpers/convertRequestToHarRequest.d.ts +0 -7
- package/dist/helpers/convertRequestToHarRequest.d.ts.map +0 -1
- package/dist/helpers/convertRequestToHarRequest.js +0 -64
- package/dist/helpers/get-request.js +0 -6
- package/dist/helpers/getExampleCode.d.ts +0 -8
- package/dist/helpers/getExampleCode.d.ts.map +0 -1
- package/dist/helpers/getExampleCode.js +0 -16
- package/dist/helpers/joinWithSlash.d.ts +0 -5
- package/dist/helpers/joinWithSlash.d.ts.map +0 -1
- package/dist/helpers/joinWithSlash.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ExampleResponses.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import p from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-d84b9039"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,170 +1,165 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
import { normalizeMimeTypeObject as
|
|
4
|
-
import { useClipboard as
|
|
1
|
+
import { defineComponent as M, useId as N, ref as C, computed as d, openBlock as o, createBlock as r, unref as l, withCtx as u, createVNode as y, createElementBlock as v, createCommentVNode as x, createTextVNode as R, withDirectives as F, createElementVNode as E, vModelCheckbox as I, Fragment as _, renderList as O, toDisplayString as A } from "vue";
|
|
2
|
+
import { ScalarIcon as D, ScalarCodeBlock as P, ScalarMarkdown as U } from "@scalar/components";
|
|
3
|
+
import { normalizeMimeTypeObject as H } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useClipboard as J } from "@scalar/use-hooks/useClipboard";
|
|
5
5
|
import T from "./ExampleResponse.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
6
|
+
import K from "../../components/Card/Card.vue.js";
|
|
7
|
+
import L from "../../components/Card/CardTabHeader.vue.js";
|
|
8
|
+
import W from "../../components/Card/CardTab.vue.js";
|
|
9
|
+
import q from "../../components/Card/CardContent.vue.js";
|
|
10
|
+
import G from "../../components/Card/CardFooter.vue.js";
|
|
11
|
+
import Q from "../ExampleRequest/ExamplePicker.vue.js";
|
|
12
|
+
const X = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "scalar-card-checkbox"
|
|
15
|
-
},
|
|
15
|
+
}, Y = ["aria-controls"], Z = { class: "scalar-card-container custom-scroll" }, $ = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "response-description"
|
|
18
|
-
},
|
|
18
|
+
}, pe = /* @__PURE__ */ M({
|
|
19
19
|
__name: "ExampleResponses",
|
|
20
20
|
props: {
|
|
21
|
-
|
|
21
|
+
responses: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
() =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return (m = (e = k.operation.information) == null ? void 0 : e.responses) == null ? void 0 : m[a];
|
|
35
|
-
}), l = v(() => {
|
|
36
|
-
var e;
|
|
37
|
-
const a = J(
|
|
38
|
-
(e = i.value) == null ? void 0 : e.content
|
|
23
|
+
setup(S) {
|
|
24
|
+
const c = N(), { copyToClipboard: V } = J(), p = C(), b = d(() => Object.keys(S.responses ?? {}).sort()), k = d(
|
|
25
|
+
() => !!s.value.examples
|
|
26
|
+
), g = C(0), i = d(() => {
|
|
27
|
+
var a;
|
|
28
|
+
const e = b.value[g.value];
|
|
29
|
+
return (a = S.responses) == null ? void 0 : a[e];
|
|
30
|
+
}), s = d(() => {
|
|
31
|
+
var a;
|
|
32
|
+
const e = H(
|
|
33
|
+
(a = i.value) == null ? void 0 : a.content
|
|
39
34
|
);
|
|
40
35
|
return (
|
|
41
36
|
// OpenAPI 3.x
|
|
42
|
-
(
|
|
37
|
+
(e == null ? void 0 : e["application/json"]) ?? (e == null ? void 0 : e["application/xml"]) ?? (e == null ? void 0 : e["text/plain"]) ?? (e == null ? void 0 : e["text/html"]) ?? // Swagger 2.0
|
|
43
38
|
i.value
|
|
44
39
|
);
|
|
45
|
-
}),
|
|
46
|
-
if (
|
|
47
|
-
if (Array.isArray(
|
|
48
|
-
return
|
|
40
|
+
}), j = () => {
|
|
41
|
+
if (k.value) {
|
|
42
|
+
if (Array.isArray(s.value.examples))
|
|
43
|
+
return s.value.examples[0];
|
|
49
44
|
{
|
|
50
|
-
const
|
|
51
|
-
return
|
|
45
|
+
const e = Object.keys(s.value.examples)[0];
|
|
46
|
+
return s.value.examples[e];
|
|
52
47
|
}
|
|
53
|
-
} else return
|
|
54
|
-
},
|
|
55
|
-
...
|
|
56
|
-
example:
|
|
57
|
-
})),
|
|
58
|
-
g.value =
|
|
59
|
-
},
|
|
60
|
-
return (
|
|
48
|
+
} else return s.value.example;
|
|
49
|
+
}, f = d(() => ({
|
|
50
|
+
...s.value,
|
|
51
|
+
example: k.value && p.value ? s.value.examples[p.value].value ?? s.value.examples[p.value] : j()
|
|
52
|
+
})), B = (e) => {
|
|
53
|
+
g.value = e, p.value = void 0;
|
|
54
|
+
}, h = C(!1);
|
|
55
|
+
return (e, a) => b.value.length ? (o(), r(l(K), { key: 0 }, {
|
|
61
56
|
default: u(() => {
|
|
62
|
-
var
|
|
57
|
+
var w;
|
|
63
58
|
return [
|
|
64
|
-
|
|
59
|
+
y(l(L), {
|
|
65
60
|
muted: "",
|
|
66
61
|
x: "as",
|
|
67
|
-
onChange:
|
|
62
|
+
onChange: B
|
|
68
63
|
}, {
|
|
69
64
|
actions: u(() => {
|
|
70
|
-
var
|
|
65
|
+
var t, m;
|
|
71
66
|
return [
|
|
72
|
-
(
|
|
67
|
+
(t = s.value) != null && t.example ? (o(), v("button", {
|
|
73
68
|
key: 0,
|
|
74
69
|
class: "code-copy",
|
|
75
70
|
type: "button",
|
|
76
|
-
onClick:
|
|
71
|
+
onClick: a[0] || (a[0] = () => {
|
|
77
72
|
var n;
|
|
78
|
-
return
|
|
73
|
+
return l(V)((n = s.value) == null ? void 0 : n.example);
|
|
79
74
|
})
|
|
80
75
|
}, [
|
|
81
|
-
|
|
76
|
+
y(l(D), {
|
|
82
77
|
icon: "Clipboard",
|
|
83
78
|
width: "12px"
|
|
84
79
|
})
|
|
85
|
-
])) :
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"onUpdate:modelValue":
|
|
90
|
-
"aria-controls":
|
|
80
|
+
])) : x("", !0),
|
|
81
|
+
(m = s.value) != null && m.schema ? (o(), v("label", X, [
|
|
82
|
+
a[3] || (a[3] = R(" Show Schema ")),
|
|
83
|
+
F(E("input", {
|
|
84
|
+
"onUpdate:modelValue": a[1] || (a[1] = (n) => h.value = n),
|
|
85
|
+
"aria-controls": l(c),
|
|
91
86
|
class: "scalar-card-checkbox-input",
|
|
92
87
|
type: "checkbox"
|
|
93
|
-
}, null, 8,
|
|
94
|
-
[
|
|
88
|
+
}, null, 8, Y), [
|
|
89
|
+
[I, h.value]
|
|
95
90
|
]),
|
|
96
|
-
|
|
97
|
-
])) :
|
|
91
|
+
a[4] || (a[4] = E("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
|
|
92
|
+
])) : x("", !0)
|
|
98
93
|
];
|
|
99
94
|
}),
|
|
100
95
|
default: u(() => [
|
|
101
|
-
(
|
|
102
|
-
key:
|
|
103
|
-
"aria-controls":
|
|
96
|
+
(o(!0), v(_, null, O(b.value, (t) => (o(), r(l(W), {
|
|
97
|
+
key: t,
|
|
98
|
+
"aria-controls": l(c)
|
|
104
99
|
}, {
|
|
105
100
|
default: u(() => [
|
|
106
|
-
|
|
101
|
+
R(A(t), 1)
|
|
107
102
|
]),
|
|
108
103
|
_: 2
|
|
109
104
|
}, 1032, ["aria-controls"]))), 128))
|
|
110
105
|
]),
|
|
111
106
|
_: 1
|
|
112
107
|
}),
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
E("div", Z, [
|
|
109
|
+
y(l(q), { muted: "" }, {
|
|
115
110
|
default: u(() => {
|
|
116
|
-
var
|
|
111
|
+
var t;
|
|
117
112
|
return [
|
|
118
|
-
(
|
|
119
|
-
|
|
113
|
+
(t = s.value) != null && t.schema ? (o(), v(_, { key: 0 }, [
|
|
114
|
+
h.value && f.value ? (o(), r(l(P), {
|
|
120
115
|
key: 0,
|
|
121
|
-
id:
|
|
122
|
-
content:
|
|
116
|
+
id: l(c),
|
|
117
|
+
content: f.value,
|
|
123
118
|
lang: "json"
|
|
124
|
-
}, null, 8, ["id", "content"])) : (
|
|
119
|
+
}, null, 8, ["id", "content"])) : (o(), r(T, {
|
|
125
120
|
key: 1,
|
|
126
|
-
id:
|
|
127
|
-
response:
|
|
121
|
+
id: l(c),
|
|
122
|
+
response: f.value
|
|
128
123
|
}, null, 8, ["id", "response"]))
|
|
129
|
-
], 64)) : (
|
|
124
|
+
], 64)) : (o(), r(T, {
|
|
130
125
|
key: 1,
|
|
131
|
-
id:
|
|
132
|
-
response:
|
|
126
|
+
id: l(c),
|
|
127
|
+
response: f.value
|
|
133
128
|
}, null, 8, ["id", "response"]))
|
|
134
129
|
];
|
|
135
130
|
}),
|
|
136
131
|
_: 1
|
|
137
132
|
})
|
|
138
133
|
]),
|
|
139
|
-
(
|
|
134
|
+
(w = i.value) != null && w.description || k.value ? (o(), r(l(G), {
|
|
140
135
|
key: 0,
|
|
141
136
|
class: "response-card-footer",
|
|
142
137
|
muted: ""
|
|
143
138
|
}, {
|
|
144
139
|
default: u(() => {
|
|
145
|
-
var
|
|
140
|
+
var t, m;
|
|
146
141
|
return [
|
|
147
|
-
|
|
142
|
+
k.value ? (o(), r(l(Q), {
|
|
148
143
|
key: 0,
|
|
149
144
|
class: "response-example-selector",
|
|
150
|
-
examples: (
|
|
151
|
-
"onUpdate:modelValue":
|
|
152
|
-
}, null, 8, ["examples"])) : (
|
|
153
|
-
|
|
145
|
+
examples: (t = s.value) == null ? void 0 : t.examples,
|
|
146
|
+
"onUpdate:modelValue": a[2] || (a[2] = (n) => p.value = n)
|
|
147
|
+
}, null, 8, ["examples"])) : (m = i.value) != null && m.description ? (o(), v("div", $, [
|
|
148
|
+
y(l(U), {
|
|
154
149
|
class: "markdown",
|
|
155
150
|
value: i.value.description
|
|
156
151
|
}, null, 8, ["value"])
|
|
157
|
-
])) :
|
|
152
|
+
])) : x("", !0)
|
|
158
153
|
];
|
|
159
154
|
}),
|
|
160
155
|
_: 1
|
|
161
|
-
})) :
|
|
156
|
+
})) : x("", !0)
|
|
162
157
|
];
|
|
163
158
|
}),
|
|
164
159
|
_: 1
|
|
165
|
-
})) :
|
|
160
|
+
})) : x("", !0);
|
|
166
161
|
}
|
|
167
162
|
});
|
|
168
163
|
export {
|
|
169
|
-
|
|
164
|
+
pe as default
|
|
170
165
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Collection, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
id?: string;
|
|
5
5
|
layout?: 'modern' | 'classic';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
securitySchemes: WorkspaceStore['securitySchemes'];
|
|
6
|
+
transformedOperation: TransformedOperation;
|
|
7
|
+
collection: Collection | undefined;
|
|
8
|
+
server: Server | undefined;
|
|
10
9
|
};
|
|
11
10
|
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>;
|
|
12
11
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,UAAU,EAAE,UAAU,GAAG,SAAS,CAAA;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAC;;AAmGF,wBAMG"}
|
|
@@ -1,53 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getPointer as
|
|
3
|
-
import { useBlockProps as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const M = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as s, unref as r, openBlock as t, createElementBlock as l, Fragment as p, createBlock as a, createCommentVNode as m } from "vue";
|
|
2
|
+
import { getPointer as c } from "../../blocks/helpers/getPointer.js";
|
|
3
|
+
import { useBlockProps as d } from "../../blocks/hooks/useBlockProps.js";
|
|
4
|
+
import { useWorkspace as f } from "@scalar/api-client/store";
|
|
5
|
+
import u from "./layouts/ClassicLayout.vue.js";
|
|
6
|
+
import O from "./layouts/ModernLayout.vue.js";
|
|
7
|
+
const g = /* @__PURE__ */ s({
|
|
9
8
|
__name: "Operation",
|
|
10
9
|
props: {
|
|
11
10
|
id: {},
|
|
12
11
|
layout: { default: "modern" },
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
securitySchemes: {}
|
|
12
|
+
transformedOperation: {},
|
|
13
|
+
collection: {},
|
|
14
|
+
server: {}
|
|
17
15
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
requests: e.requests,
|
|
23
|
-
requestExamples: e.requestExamples,
|
|
24
|
-
securitySchemes: e.securitySchemes,
|
|
25
|
-
server: c
|
|
26
|
-
}), l = p(f), { operation: i } = q({
|
|
27
|
-
store: l,
|
|
28
|
-
location: d([
|
|
16
|
+
setup(n) {
|
|
17
|
+
const i = f(), { operation: o } = d({
|
|
18
|
+
store: i,
|
|
19
|
+
location: c([
|
|
29
20
|
"paths",
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
n.transformedOperation.path,
|
|
22
|
+
n.transformedOperation.httpVerb.toLowerCase()
|
|
32
23
|
])
|
|
33
24
|
});
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
25
|
+
return (e, k) => e.collection && r(o) ? (t(), l(p, { key: 0 }, [
|
|
26
|
+
e.layout === "classic" ? (t(), a(u, {
|
|
27
|
+
key: 0,
|
|
28
|
+
id: e.id,
|
|
29
|
+
collection: e.collection,
|
|
30
|
+
operation: r(o),
|
|
31
|
+
server: e.server,
|
|
32
|
+
transformedOperation: e.transformedOperation
|
|
33
|
+
}, null, 8, ["id", "collection", "operation", "server", "transformedOperation"])) : (t(), a(O, {
|
|
34
|
+
key: 1,
|
|
35
|
+
id: e.id,
|
|
36
|
+
collection: e.collection,
|
|
37
|
+
operation: r(o),
|
|
38
|
+
server: e.server,
|
|
39
|
+
transformedOperation: e.transformedOperation
|
|
40
|
+
}, null, 8, ["id", "collection", "operation", "server", "transformedOperation"]))
|
|
41
|
+
], 64)) : m("", !0);
|
|
49
42
|
}
|
|
50
43
|
});
|
|
51
44
|
export {
|
|
52
|
-
|
|
45
|
+
g as default
|
|
53
46
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
id?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
operation:
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
collection: Collection;
|
|
6
|
+
server: Server | undefined;
|
|
7
|
+
operation: Operation;
|
|
8
|
+
/** @deprecated Use `operation` instead */
|
|
9
|
+
transformedOperation: TransformedOperation;
|
|
10
10
|
};
|
|
11
11
|
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>;
|
|
12
12
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAiUA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAQhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;CAC3C,CAAC;;AAsQF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClassicLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e104650f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, openBlock as a, createBlock as s, unref as e, createSlots as y, withCtx as n, createElementVNode as t, createVNode as r, toDisplayString as m, normalizeClass as O, createTextVNode as _, createCommentVNode as c, withModifiers as C } from "vue";
|
|
2
2
|
import b from "../../../components/OperationPath.vue.js";
|
|
3
3
|
import { useConfig as k } from "../../../hooks/useConfig.js";
|
|
4
|
-
import { ScalarIcon as g, ScalarIconButton as
|
|
5
|
-
import { useClipboard as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { isOperationDeprecated as
|
|
12
|
-
import
|
|
4
|
+
import { ScalarIcon as g, ScalarIconButton as S, ScalarMarkdown as B } from "@scalar/components";
|
|
5
|
+
import { useClipboard as R } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import w from "../components/OperationParameters.vue.js";
|
|
7
|
+
import I from "../components/OperationResponses.vue.js";
|
|
8
|
+
import N from "../../../components/Section/SectionAccordion.vue.js";
|
|
9
|
+
import T from "../../../components/HttpMethod/HttpMethod.vue.js";
|
|
10
|
+
import V from "../../../components/Anchor/Anchor.vue.js";
|
|
11
|
+
import { isOperationDeprecated as $, getOperationStability as f, getOperationStabilityColor as q } from "../../../helpers/operation.js";
|
|
12
|
+
import E from "../../../components/Badge/Badge.vue.js";
|
|
13
13
|
import z from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
14
14
|
import A from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
15
15
|
import D from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
16
|
-
const L = { class: "operation-title" }, M = { class: "operation-details" }, P = { class: "endpoint-label" }, U = { class: "endpoint-label-path" }, j = { class: "endpoint-label-name" }, F = { class: "endpoint-content" }, G = { class: "operation-details-card" }, H = { class: "operation-details-card-item" }, J = { class: "operation-details-card-item" },
|
|
16
|
+
const L = { class: "operation-title" }, M = { class: "operation-details" }, P = { class: "endpoint-label" }, U = { class: "endpoint-label-path" }, j = { class: "endpoint-label-name" }, F = { class: "endpoint-content" }, G = { class: "operation-details-card" }, H = { class: "operation-details-card-item" }, J = { class: "operation-details-card-item" }, mo = /* @__PURE__ */ v({
|
|
17
17
|
__name: "ClassicLayout",
|
|
18
18
|
props: {
|
|
19
19
|
id: {},
|
|
20
|
-
|
|
20
|
+
collection: {},
|
|
21
|
+
server: {},
|
|
21
22
|
operation: {},
|
|
22
|
-
|
|
23
|
-
secretCredentials: {}
|
|
23
|
+
transformedOperation: {}
|
|
24
24
|
},
|
|
25
25
|
setup(K) {
|
|
26
|
-
const { copyToClipboard:
|
|
27
|
-
return (
|
|
26
|
+
const { copyToClipboard: u } = R(), h = k();
|
|
27
|
+
return (o, p) => {
|
|
28
28
|
var l;
|
|
29
|
-
return a(), s(
|
|
30
|
-
id:
|
|
29
|
+
return a(), s(e(N), {
|
|
30
|
+
id: o.id,
|
|
31
31
|
class: "reference-endpoint",
|
|
32
32
|
transparent: ""
|
|
33
|
-
},
|
|
33
|
+
}, y({
|
|
34
34
|
title: n(() => [
|
|
35
35
|
t("h3", L, [
|
|
36
36
|
t("div", M, [
|
|
37
|
-
|
|
37
|
+
r(e(T), {
|
|
38
38
|
class: "endpoint-type",
|
|
39
|
-
method:
|
|
39
|
+
method: o.operation.method,
|
|
40
40
|
short: ""
|
|
41
41
|
}, null, 8, ["method"]),
|
|
42
|
-
|
|
43
|
-
id:
|
|
42
|
+
r(e(V), {
|
|
43
|
+
id: o.id ?? "",
|
|
44
44
|
class: "endpoint-anchor"
|
|
45
45
|
}, {
|
|
46
46
|
default: n(() => [
|
|
47
47
|
t("div", P, [
|
|
48
48
|
t("div", U, [
|
|
49
|
-
|
|
50
|
-
deprecated:
|
|
51
|
-
path:
|
|
49
|
+
r(b, {
|
|
50
|
+
deprecated: e($)(o.transformedOperation),
|
|
51
|
+
path: o.operation.path
|
|
52
52
|
}, null, 8, ["deprecated", "path"])
|
|
53
53
|
]),
|
|
54
|
-
t("div", j,
|
|
55
|
-
|
|
54
|
+
t("div", j, m(o.transformedOperation.name), 1),
|
|
55
|
+
e(f)(o.transformedOperation) ? (a(), s(e(E), {
|
|
56
56
|
key: 0,
|
|
57
|
-
class:
|
|
57
|
+
class: O(e(q)(o.transformedOperation))
|
|
58
58
|
}, {
|
|
59
59
|
default: n(() => [
|
|
60
|
-
|
|
60
|
+
_(m(e(f)(o.transformedOperation)), 1)
|
|
61
61
|
]),
|
|
62
62
|
_: 1
|
|
63
|
-
}, 8, ["class"])) :
|
|
63
|
+
}, 8, ["class"])) : c("", !0)
|
|
64
64
|
])
|
|
65
65
|
]),
|
|
66
66
|
_: 1
|
|
@@ -68,25 +68,25 @@ const L = { class: "operation-title" }, M = { class: "operation-details" }, P =
|
|
|
68
68
|
])
|
|
69
69
|
])
|
|
70
70
|
]),
|
|
71
|
-
actions: n(({ active:
|
|
71
|
+
actions: n(({ active: i }) => {
|
|
72
72
|
var d;
|
|
73
73
|
return [
|
|
74
|
-
|
|
74
|
+
i ? (a(), s(e(z), {
|
|
75
75
|
key: 0,
|
|
76
|
-
operation:
|
|
77
|
-
}, null, 8, ["operation"])) : (d =
|
|
76
|
+
operation: o.operation
|
|
77
|
+
}, null, 8, ["operation"])) : (d = e(h)) != null && d.hideTestRequestButton ? c("", !0) : (a(), s(e(g), {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "endpoint-try-hint",
|
|
80
80
|
icon: "Play",
|
|
81
81
|
thickness: "1.75px"
|
|
82
82
|
})),
|
|
83
|
-
|
|
83
|
+
r(e(S), {
|
|
84
84
|
class: "endpoint-copy",
|
|
85
85
|
icon: "Clipboard",
|
|
86
86
|
label: "Copy endpoint URL",
|
|
87
87
|
size: "xs",
|
|
88
88
|
variant: "ghost",
|
|
89
|
-
onClick: p[0] || (p[0] =
|
|
89
|
+
onClick: p[0] || (p[0] = C((Q) => e(u)(o.operation.path), ["stop"]))
|
|
90
90
|
})
|
|
91
91
|
];
|
|
92
92
|
}),
|
|
@@ -94,32 +94,35 @@ const L = { class: "operation-title" }, M = { class: "operation-details" }, P =
|
|
|
94
94
|
t("div", F, [
|
|
95
95
|
t("div", G, [
|
|
96
96
|
t("div", H, [
|
|
97
|
-
|
|
97
|
+
r(w, { operation: o.operation }, null, 8, ["operation"])
|
|
98
98
|
]),
|
|
99
99
|
t("div", J, [
|
|
100
|
-
|
|
100
|
+
r(I, {
|
|
101
101
|
collapsableItems: !1,
|
|
102
|
-
operation:
|
|
102
|
+
operation: o.transformedOperation
|
|
103
103
|
}, null, 8, ["operation"])
|
|
104
104
|
])
|
|
105
105
|
]),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
r(e(A), {
|
|
107
|
+
responses: o.operation.responses
|
|
108
|
+
}, null, 8, ["responses"]),
|
|
109
|
+
r(e(D), {
|
|
110
|
+
collection: o.collection,
|
|
111
|
+
operation: o.operation,
|
|
112
|
+
server: o.server,
|
|
113
|
+
transformedOperation: o.transformedOperation
|
|
114
|
+
}, null, 8, ["collection", "operation", "server", "transformedOperation"])
|
|
112
115
|
])
|
|
113
116
|
]),
|
|
114
117
|
_: 2
|
|
115
118
|
}, [
|
|
116
|
-
(l =
|
|
119
|
+
(l = o.operation) != null && l.description ? {
|
|
117
120
|
name: "description",
|
|
118
121
|
fn: n(() => {
|
|
119
|
-
var
|
|
122
|
+
var i;
|
|
120
123
|
return [
|
|
121
|
-
|
|
122
|
-
value: (
|
|
124
|
+
r(e(B), {
|
|
125
|
+
value: (i = o.operation) == null ? void 0 : i.description,
|
|
123
126
|
withImages: ""
|
|
124
127
|
}, null, 8, ["value"])
|
|
125
128
|
];
|
|
@@ -131,5 +134,5 @@ const L = { class: "operation-title" }, M = { class: "operation-details" }, P =
|
|
|
131
134
|
}
|
|
132
135
|
});
|
|
133
136
|
export {
|
|
134
|
-
|
|
137
|
+
mo as default
|
|
135
138
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
id?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
collection: Collection;
|
|
6
|
+
server: Server | undefined;
|
|
7
|
+
operation: Operation;
|
|
8
|
+
/** @deprecated Use `operation` instead */
|
|
9
|
+
transformedOperation: TransformedOperation;
|
|
10
10
|
};
|
|
11
11
|
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>;
|
|
12
12
|
export default _default;
|