@scalar/api-reference 1.29.3 → 1.30.0
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/README.md +13 -114
- package/dist/browser/standalone.js +1864 -1773
- package/dist/browser/webpack-stats.json +1 -1
- 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 +118 -84
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +13 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +49 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +4 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +123 -119
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +9 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.js +45 -0
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +2 -2
- package/dist/features/ApiClientModal/useApiClient.d.ts +28 -8
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +14 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.js +7 -0
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +62 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +10 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +30 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +4 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +86 -74
- package/dist/features/Operation/types/schemas.d.ts +3 -0
- package/dist/features/Operation/types/schemas.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as p, createElementBlock as l, openBlock as e, createElementVNode as k, Fragment as t, renderList as n, createBlock as d } from "vue";
|
|
2
|
+
import b from "./Callback.vue.js";
|
|
3
|
+
const f = { class: "mt-6 gap-3" }, g = /* @__PURE__ */ p({
|
|
4
|
+
__name: "Callbacks",
|
|
5
|
+
props: {
|
|
6
|
+
callbacks: {},
|
|
7
|
+
collection: {},
|
|
8
|
+
schemas: {}
|
|
9
|
+
},
|
|
10
|
+
setup(h) {
|
|
11
|
+
return (c, o) => (e(), l("div", f, [
|
|
12
|
+
o[0] || (o[0] = k("div", { class: "text-c-1 my-3 text-lg font-medium" }, "Callbacks", -1)),
|
|
13
|
+
(e(!0), l(t, null, n(c.callbacks, (a, r) => (e(), l(t, { key: r }, [
|
|
14
|
+
(e(!0), l(t, null, n(a, (s, m) => (e(), l(t, null, [
|
|
15
|
+
(e(!0), l(t, null, n(s, (u, i) => (e(), d(b, {
|
|
16
|
+
callback: u,
|
|
17
|
+
collection: c.collection,
|
|
18
|
+
method: i,
|
|
19
|
+
name: r,
|
|
20
|
+
schemas: c.schemas,
|
|
21
|
+
url: m
|
|
22
|
+
}, null, 8, ["callback", "collection", "method", "name", "schemas", "url"]))), 256))
|
|
23
|
+
], 64))), 256))
|
|
24
|
+
], 64))), 128))
|
|
25
|
+
]));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
g as default
|
|
30
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
2
|
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
|
+
import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
id?: string;
|
|
6
6
|
collection: Collection;
|
|
@@ -8,7 +8,7 @@ type __VLS_Props = {
|
|
|
8
8
|
operation: Operation;
|
|
9
9
|
/** @deprecated Use `operation` instead */
|
|
10
10
|
transformedOperation: TransformedOperation;
|
|
11
|
-
schemas?:
|
|
11
|
+
schemas?: Schemas;
|
|
12
12
|
};
|
|
13
13
|
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>;
|
|
14
14
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAuJA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAgBhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAejE,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;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;AA2PF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModernLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-af49b015"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as y, useId as O, computed as S, createBlock as t, openBlock as n, unref as o, withCtx as r, createVNode as a, createCommentVNode as c, createElementVNode as i, normalizeClass as f, createTextVNode as u, toDisplayString as h } from "vue";
|
|
2
|
+
import { ScalarMarkdown as k, ScalarErrorBoundary as l } from "@scalar/components";
|
|
3
|
+
import C from "../../../components/OperationPath.vue.js";
|
|
4
4
|
import { useConfig as B } from "../../../hooks/useConfig.js";
|
|
5
|
-
import { getOperationStability as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import w from "
|
|
9
|
-
import I from "../../../components/Section/
|
|
10
|
-
import R from "../../../components/
|
|
11
|
-
import T from "../../../components/
|
|
5
|
+
import { getOperationStability as b, getOperationStabilityColor as E, isOperationDeprecated as N } from "../../../libs/openapi.js";
|
|
6
|
+
import V from "../components/callbacks/Callbacks.vue.js";
|
|
7
|
+
import _ from "../components/OperationParameters.vue.js";
|
|
8
|
+
import w from "../components/OperationResponses.vue.js";
|
|
9
|
+
import I from "../../../components/Section/Section.vue.js";
|
|
10
|
+
import R from "../../../components/Section/SectionContent.vue.js";
|
|
11
|
+
import T from "../../../components/Badge/Badge.vue.js";
|
|
12
|
+
import $ from "../../../components/Section/SectionHeader.vue.js";
|
|
12
13
|
import q from "../../../components/Anchor/Anchor.vue.js";
|
|
13
14
|
import D from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
14
15
|
import H from "../../../components/Section/SectionColumns.vue.js";
|
|
15
16
|
import g from "../../../components/Section/SectionColumn.vue.js";
|
|
16
17
|
import L from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
17
18
|
import M from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
18
|
-
import
|
|
19
|
-
const
|
|
19
|
+
import z from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
20
|
+
const A = { class: "operation-details" }, P = { class: "examples" }, se = /* @__PURE__ */ y({
|
|
20
21
|
__name: "ModernLayout",
|
|
21
22
|
props: {
|
|
22
23
|
id: {},
|
|
@@ -26,43 +27,43 @@ const z = { class: "operation-details" }, A = { class: "examples" }, ie = /* @__
|
|
|
26
27
|
transformedOperation: {},
|
|
27
28
|
schemas: {}
|
|
28
29
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
return (
|
|
32
|
-
id:
|
|
33
|
-
"aria-labelledby":
|
|
34
|
-
label:
|
|
30
|
+
setup(s) {
|
|
31
|
+
const p = O(), v = B(), m = S(() => s.operation.summary || s.operation.path);
|
|
32
|
+
return (e, j) => (n(), t(o(I), {
|
|
33
|
+
id: e.id,
|
|
34
|
+
"aria-labelledby": o(p),
|
|
35
|
+
label: m.value,
|
|
35
36
|
tabindex: "-1"
|
|
36
37
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
|
|
39
|
-
loading:
|
|
38
|
+
default: r(() => [
|
|
39
|
+
a(o(R), {
|
|
40
|
+
loading: o(v).isLoading
|
|
40
41
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
|
|
42
|
+
default: r(() => [
|
|
43
|
+
o(b)(e.operation) ? (n(), t(o(T), {
|
|
43
44
|
key: 0,
|
|
44
|
-
class:
|
|
45
|
+
class: f(o(E)(e.operation))
|
|
45
46
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
|
|
47
|
+
default: r(() => [
|
|
48
|
+
u(h(o(b)(e.operation)), 1)
|
|
48
49
|
]),
|
|
49
50
|
_: 1
|
|
50
|
-
}, 8, ["class"])) :
|
|
51
|
-
|
|
52
|
-
class:
|
|
51
|
+
}, 8, ["class"])) : c("", !0),
|
|
52
|
+
i("div", {
|
|
53
|
+
class: f(o(N)(e.operation) ? "deprecated" : "")
|
|
53
54
|
}, [
|
|
54
|
-
|
|
55
|
-
default:
|
|
56
|
-
|
|
57
|
-
id:
|
|
55
|
+
a(o($), null, {
|
|
56
|
+
default: r(() => [
|
|
57
|
+
a(o(q), {
|
|
58
|
+
id: e.id ?? ""
|
|
58
59
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
61
|
-
id:
|
|
60
|
+
default: r(() => [
|
|
61
|
+
a(o(D), {
|
|
62
|
+
id: o(p),
|
|
62
63
|
level: 3
|
|
63
64
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
65
|
+
default: r(() => [
|
|
66
|
+
u(h(m.value), 1)
|
|
66
67
|
]),
|
|
67
68
|
_: 1
|
|
68
69
|
}, 8, ["id"])
|
|
@@ -73,61 +74,72 @@ const z = { class: "operation-details" }, A = { class: "examples" }, ie = /* @__
|
|
|
73
74
|
_: 1
|
|
74
75
|
})
|
|
75
76
|
], 2),
|
|
76
|
-
|
|
77
|
-
default:
|
|
78
|
-
|
|
79
|
-
default:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
value:
|
|
77
|
+
a(o(H), null, {
|
|
78
|
+
default: r(() => [
|
|
79
|
+
a(o(g), null, {
|
|
80
|
+
default: r(() => [
|
|
81
|
+
i("div", A, [
|
|
82
|
+
a(o(k), {
|
|
83
|
+
value: e.operation.description,
|
|
83
84
|
withImages: ""
|
|
84
85
|
}, null, 8, ["value"]),
|
|
85
|
-
|
|
86
|
-
operation:
|
|
87
|
-
schemas:
|
|
86
|
+
a(_, {
|
|
87
|
+
operation: e.operation,
|
|
88
|
+
schemas: e.schemas
|
|
88
89
|
}, null, 8, ["operation", "schemas"]),
|
|
89
|
-
|
|
90
|
-
operation:
|
|
91
|
-
schemas:
|
|
92
|
-
}, null, 8, ["operation", "schemas"])
|
|
90
|
+
a(w, {
|
|
91
|
+
operation: e.transformedOperation,
|
|
92
|
+
schemas: e.schemas
|
|
93
|
+
}, null, 8, ["operation", "schemas"]),
|
|
94
|
+
a(o(l), null, {
|
|
95
|
+
default: r(() => [
|
|
96
|
+
e.operation.callbacks ? (n(), t(V, {
|
|
97
|
+
key: 0,
|
|
98
|
+
callbacks: e.operation.callbacks,
|
|
99
|
+
collection: e.collection,
|
|
100
|
+
schemas: e.schemas
|
|
101
|
+
}, null, 8, ["callbacks", "collection", "schemas"])) : c("", !0)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
})
|
|
93
105
|
])
|
|
94
106
|
]),
|
|
95
107
|
_: 1
|
|
96
108
|
}),
|
|
97
|
-
|
|
98
|
-
default:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
default:
|
|
102
|
-
|
|
103
|
-
collection:
|
|
109
|
+
a(o(g), null, {
|
|
110
|
+
default: r(() => [
|
|
111
|
+
i("div", P, [
|
|
112
|
+
a(o(l), null, {
|
|
113
|
+
default: r(() => [
|
|
114
|
+
a(o(L), {
|
|
115
|
+
collection: e.collection,
|
|
104
116
|
fallback: "",
|
|
105
|
-
operation:
|
|
106
|
-
server:
|
|
107
|
-
transformedOperation:
|
|
117
|
+
operation: e.operation,
|
|
118
|
+
server: e.server,
|
|
119
|
+
transformedOperation: e.transformedOperation
|
|
108
120
|
}, {
|
|
109
|
-
header:
|
|
110
|
-
var
|
|
121
|
+
header: r(() => {
|
|
122
|
+
var d;
|
|
111
123
|
return [
|
|
112
|
-
|
|
124
|
+
a(C, {
|
|
113
125
|
class: "example-path",
|
|
114
|
-
deprecated: (
|
|
115
|
-
path:
|
|
126
|
+
deprecated: (d = e.transformedOperation.information) == null ? void 0 : d.deprecated,
|
|
127
|
+
path: e.transformedOperation.path
|
|
116
128
|
}, null, 8, ["deprecated", "path"])
|
|
117
129
|
];
|
|
118
130
|
}),
|
|
119
|
-
footer:
|
|
120
|
-
|
|
131
|
+
footer: r(() => [
|
|
132
|
+
a(o(M), { operation: e.operation }, null, 8, ["operation"])
|
|
121
133
|
]),
|
|
122
134
|
_: 1
|
|
123
135
|
}, 8, ["collection", "operation", "server", "transformedOperation"])
|
|
124
136
|
]),
|
|
125
137
|
_: 1
|
|
126
138
|
}),
|
|
127
|
-
|
|
128
|
-
default:
|
|
129
|
-
|
|
130
|
-
responses:
|
|
139
|
+
a(o(l), null, {
|
|
140
|
+
default: r(() => [
|
|
141
|
+
a(o(z), {
|
|
142
|
+
responses: e.operation.responses,
|
|
131
143
|
style: { "margin-top": "12px" }
|
|
132
144
|
}, null, 8, ["responses"])
|
|
133
145
|
]),
|
|
@@ -149,5 +161,5 @@ const z = { class: "operation-details" }, A = { class: "examples" }, ie = /* @__
|
|
|
149
161
|
}
|
|
150
162
|
});
|
|
151
163
|
export {
|
|
152
|
-
|
|
164
|
+
se as default
|
|
153
165
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/types/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAE9E,MAAM,MAAM,OAAO,GACf,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA"}
|