@scalar/api-reference 1.24.1 → 1.24.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 +26 -0
- package/dist/browser/standalone.js +8 -15
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +116 -113
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.stories.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +3 -2
- 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 +18 -15
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +3 -3
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +26 -23
- package/dist/helpers/parse.d.ts +3 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +50 -45
- package/dist/hooks/useReactiveSpec.d.ts +4 -4
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.js +25 -23
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -11
|
@@ -2,7 +2,7 @@ import o from "./Content.vue2.js";
|
|
|
2
2
|
import "./Content.vue3.js";
|
|
3
3
|
import "./Content.vue4.js";
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-705c9b46"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useServerStore as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as E, watch as P, computed as S, openBlock as r, createElementBlock as l, Fragment as m, createElementVNode as w, renderSlot as y, createVNode as u, unref as o, createBlock as i, withCtx as f, normalizeClass as W, renderList as $, resolveDynamicComponent as k, createCommentVNode as L, createStaticVNode as D } from "vue";
|
|
2
|
+
import { useServerStore as F } from "@scalar/api-client";
|
|
3
|
+
import j from "./Tag/TagAccordion.vue.js";
|
|
4
|
+
import q from "./Tag/Tag.vue.js";
|
|
5
|
+
import G from "./Operation/OperationAccordion.vue.js";
|
|
6
|
+
import H from "./Operation/Operation.vue.js";
|
|
7
|
+
import J from "./Lazy/Loading.vue.js";
|
|
8
8
|
import "./Lazy/Loading.vue2.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { useSidebar as
|
|
18
|
-
import { hasModels as
|
|
19
|
-
import { getModels as
|
|
20
|
-
import { useNavState as
|
|
21
|
-
const
|
|
9
|
+
import K from "./Introduction/Introduction.vue.js";
|
|
10
|
+
import Q from "./BaseUrl/BaseUrl.vue.js";
|
|
11
|
+
import X from "./Authentication/Authentication.vue.js";
|
|
12
|
+
import Y from "./ClientLibraries/ClientLibraries.vue.js";
|
|
13
|
+
import C from "./Lazy/Lazy.vue.js";
|
|
14
|
+
import Z from "./Webhooks/Webhooks.vue.js";
|
|
15
|
+
import _ from "./Models/ModelsAccordion.vue.js";
|
|
16
|
+
import x from "./Models/Models.vue.js";
|
|
17
|
+
import { useSidebar as ee } from "../../hooks/useSidebar.js";
|
|
18
|
+
import { hasModels as oe } from "../../helpers/hasModels.js";
|
|
19
|
+
import { getModels as g } from "../../helpers/getModels.js";
|
|
20
|
+
import { useNavState as re } from "../../hooks/useNavState.js";
|
|
21
|
+
const te = /* @__PURE__ */ D('<div class="section-flare" data-v-705c9b46><div class="section-flare-item" data-v-705c9b46></div><div class="section-flare-item" data-v-705c9b46></div><div class="section-flare-item" data-v-705c9b46></div><div class="section-flare-item" data-v-705c9b46></div><div class="section-flare-item" data-v-705c9b46></div><div class="section-flare-item" data-v-705c9b46></div><div class="section-flare-item" data-v-705c9b46></div><div class="section-flare-item" data-v-705c9b46></div></div>', 1), ae = { class: "narrow-references-container" }, ge = /* @__PURE__ */ E({
|
|
22
22
|
__name: "Content",
|
|
23
23
|
props: {
|
|
24
24
|
parsedSpec: {},
|
|
@@ -26,115 +26,118 @@ const x = /* @__PURE__ */ T('<div class="section-flare" data-v-70a3e92a><div cla
|
|
|
26
26
|
baseServerURL: {},
|
|
27
27
|
proxy: {}
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const t =
|
|
29
|
+
setup(z) {
|
|
30
|
+
const t = z, { getOperationId: h, getTagId: p, hash: I } = re(), { setServer: M } = F(), { hideModels: N, collapsedSidebarItems: R } = ee(), U = (e) => {
|
|
31
31
|
if (e.url.match(/^(?!(https?|file):\/\/|{).+/)) {
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
e.url = `${
|
|
32
|
+
let a = t.baseServerURL ?? window.location.origin;
|
|
33
|
+
a = a.replace(/\/$/, "");
|
|
34
|
+
const d = e.url.startsWith("/") ? e.url : `/${e.url}`;
|
|
35
|
+
e.url = `${a}${d}`.replace(/\/$/, "");
|
|
36
36
|
}
|
|
37
37
|
return e;
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
P(
|
|
40
40
|
() => t.parsedSpec,
|
|
41
41
|
(e) => {
|
|
42
|
-
var
|
|
43
|
-
let
|
|
42
|
+
var d, c;
|
|
43
|
+
let a = [
|
|
44
44
|
{ url: typeof window < "u" ? window.location.origin : "/" }
|
|
45
45
|
];
|
|
46
|
-
e.servers && e.servers.length > 0 ?
|
|
46
|
+
e.servers && e.servers.length > 0 ? a = e.servers : t.parsedSpec.host && (a = [
|
|
47
47
|
{
|
|
48
|
-
url: `${((
|
|
48
|
+
url: `${((d = t.parsedSpec.schemes) == null ? void 0 : d[0]) ?? "http"}://${t.parsedSpec.host}${((c = t.parsedSpec) == null ? void 0 : c.basePath) ?? ""}`
|
|
49
49
|
}
|
|
50
|
-
]), (t.baseServerURL || typeof window < "u") && (
|
|
50
|
+
]), (t.baseServerURL || typeof window < "u") && (a = a.map(U)), M({ servers: a });
|
|
51
51
|
},
|
|
52
52
|
{ deep: !0, immediate: !0 }
|
|
53
53
|
);
|
|
54
|
-
const
|
|
55
|
-
() => t.layout === "accordion" ?
|
|
56
|
-
),
|
|
57
|
-
() => t.layout === "accordion" ?
|
|
58
|
-
),
|
|
54
|
+
const V = S(
|
|
55
|
+
() => t.layout === "accordion" ? j : q
|
|
56
|
+
), A = S(
|
|
57
|
+
() => t.layout === "accordion" ? G : H
|
|
58
|
+
), B = S(
|
|
59
59
|
() => t.layout === "accordion" ? "after" : "aside"
|
|
60
|
-
),
|
|
61
|
-
return (e,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
parsedSpec: e.parsedSpec
|
|
73
|
-
}, {
|
|
74
|
-
[U.value]: m(() => [
|
|
75
|
-
y("div", {
|
|
76
|
-
class: O(["introduction-card", { "introduction-card-row": e.layout === "accordion" }])
|
|
77
|
-
}, [
|
|
78
|
-
l(o(G)),
|
|
79
|
-
l(o(H), {
|
|
80
|
-
parsedSpec: e.parsedSpec,
|
|
81
|
-
proxy: e.proxy
|
|
82
|
-
}, null, 8, ["parsedSpec", "proxy"]),
|
|
83
|
-
l(o(J))
|
|
84
|
-
], 2)
|
|
85
|
-
]),
|
|
86
|
-
_: 2
|
|
87
|
-
}, 1032, ["info", "parsedSpec"])) : f(e.$slots, "empty-state", { key: 1 }, void 0, !0),
|
|
88
|
-
(r(!0), c(p, null, h(e.parsedSpec.tags, (a) => (r(), d(o(k), {
|
|
89
|
-
id: o(n)(a),
|
|
90
|
-
key: o(n)(a),
|
|
91
|
-
isLazy: o(V) && !o(I)[o(n)(a)]
|
|
92
|
-
}, {
|
|
93
|
-
default: m(() => [
|
|
94
|
-
(r(), d(w(N.value), {
|
|
95
|
-
id: o(n)(a),
|
|
96
|
-
spec: e.parsedSpec,
|
|
97
|
-
tag: a
|
|
98
|
-
}, {
|
|
99
|
-
default: m(() => [
|
|
100
|
-
(r(!0), c(p, null, h(a.operations, (i, S) => (r(), d(o(k), {
|
|
101
|
-
id: o(v)(i, a),
|
|
102
|
-
key: `${i.httpVerb}-${i.operationId}`,
|
|
103
|
-
isLazy: S > 0
|
|
104
|
-
}, {
|
|
105
|
-
default: m(() => [
|
|
106
|
-
(r(), d(w(R.value), {
|
|
107
|
-
id: o(v)(i, a),
|
|
108
|
-
operation: i,
|
|
109
|
-
tag: a
|
|
110
|
-
}, null, 8, ["id", "operation", "tag"]))
|
|
111
|
-
]),
|
|
112
|
-
_: 2
|
|
113
|
-
}, 1032, ["id", "isLazy"]))), 128))
|
|
114
|
-
]),
|
|
115
|
-
_: 2
|
|
116
|
-
}, 1032, ["id", "spec", "tag"]))
|
|
117
|
-
]),
|
|
118
|
-
_: 2
|
|
119
|
-
}, 1032, ["id", "isLazy"]))), 128)),
|
|
120
|
-
e.parsedSpec.webhooks ? (r(), d(o(K), {
|
|
121
|
-
key: 2,
|
|
122
|
-
webhooks: e.parsedSpec.webhooks
|
|
123
|
-
}, null, 8, ["webhooks"])) : $("", !0),
|
|
124
|
-
o(Z)(e.parsedSpec) && !o(z) ? (r(), c(p, { key: 3 }, [
|
|
125
|
-
e.layout === "accordion" ? (r(), d(o(Q), {
|
|
60
|
+
), O = t.layout !== "accordion" && !I.value.startsWith("model");
|
|
61
|
+
return (e, a) => {
|
|
62
|
+
var d, c, v, b;
|
|
63
|
+
return r(), l(m, null, [
|
|
64
|
+
te,
|
|
65
|
+
w("div", ae, [
|
|
66
|
+
y(e.$slots, "start", {}, void 0, !0),
|
|
67
|
+
u(o(J), {
|
|
68
|
+
layout: e.layout,
|
|
69
|
+
parsedSpec: e.parsedSpec
|
|
70
|
+
}, null, 8, ["layout", "parsedSpec"]),
|
|
71
|
+
(c = (d = e.parsedSpec) == null ? void 0 : d.info) != null && c.title || (b = (v = e.parsedSpec) == null ? void 0 : v.info) != null && b.description ? (r(), i(o(K), {
|
|
126
72
|
key: 0,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
73
|
+
info: e.parsedSpec.info,
|
|
74
|
+
parsedSpec: e.parsedSpec
|
|
75
|
+
}, {
|
|
76
|
+
[B.value]: f(() => [
|
|
77
|
+
w("div", {
|
|
78
|
+
class: W(["introduction-card", { "introduction-card-row": e.layout === "accordion" }])
|
|
79
|
+
}, [
|
|
80
|
+
u(o(Q)),
|
|
81
|
+
u(o(X), {
|
|
82
|
+
parsedSpec: e.parsedSpec,
|
|
83
|
+
proxy: e.proxy
|
|
84
|
+
}, null, 8, ["parsedSpec", "proxy"]),
|
|
85
|
+
u(o(Y))
|
|
86
|
+
], 2)
|
|
87
|
+
]),
|
|
88
|
+
_: 2
|
|
89
|
+
}, 1032, ["info", "parsedSpec"])) : y(e.$slots, "empty-state", { key: 1 }, void 0, !0),
|
|
90
|
+
(r(!0), l(m, null, $(e.parsedSpec.tags, (s) => (r(), i(o(C), {
|
|
91
|
+
id: o(p)(s),
|
|
92
|
+
key: o(p)(s),
|
|
93
|
+
isLazy: o(O) && !o(R)[o(p)(s)]
|
|
94
|
+
}, {
|
|
95
|
+
default: f(() => [
|
|
96
|
+
(r(), i(k(V.value), {
|
|
97
|
+
id: o(p)(s),
|
|
98
|
+
spec: e.parsedSpec,
|
|
99
|
+
tag: s
|
|
100
|
+
}, {
|
|
101
|
+
default: f(() => [
|
|
102
|
+
(r(!0), l(m, null, $(s.operations, (n, T) => (r(), i(o(C), {
|
|
103
|
+
id: o(h)(n, s),
|
|
104
|
+
key: `${n.httpVerb}-${n.operationId}`,
|
|
105
|
+
isLazy: T > 0
|
|
106
|
+
}, {
|
|
107
|
+
default: f(() => [
|
|
108
|
+
(r(), i(k(A.value), {
|
|
109
|
+
id: o(h)(n, s),
|
|
110
|
+
operation: n,
|
|
111
|
+
tag: s
|
|
112
|
+
}, null, 8, ["id", "operation", "tag"]))
|
|
113
|
+
]),
|
|
114
|
+
_: 2
|
|
115
|
+
}, 1032, ["id", "isLazy"]))), 128))
|
|
116
|
+
]),
|
|
117
|
+
_: 2
|
|
118
|
+
}, 1032, ["id", "spec", "tag"]))
|
|
119
|
+
]),
|
|
120
|
+
_: 2
|
|
121
|
+
}, 1032, ["id", "isLazy"]))), 128)),
|
|
122
|
+
e.parsedSpec.webhooks ? (r(), i(o(Z), {
|
|
123
|
+
key: 2,
|
|
124
|
+
webhooks: e.parsedSpec.webhooks
|
|
125
|
+
}, null, 8, ["webhooks"])) : L("", !0),
|
|
126
|
+
o(oe)(e.parsedSpec) && !o(N) ? (r(), l(m, { key: 3 }, [
|
|
127
|
+
e.layout === "accordion" ? (r(), i(o(_), {
|
|
128
|
+
key: 0,
|
|
129
|
+
schemas: o(g)(e.parsedSpec)
|
|
130
|
+
}, null, 8, ["schemas"])) : (r(), i(o(x), {
|
|
131
|
+
key: 1,
|
|
132
|
+
schemas: o(g)(e.parsedSpec)
|
|
133
|
+
}, null, 8, ["schemas"]))
|
|
134
|
+
], 64)) : L("", !0),
|
|
135
|
+
y(e.$slots, "end", {}, void 0, !0)
|
|
136
|
+
])
|
|
137
|
+
], 64);
|
|
138
|
+
};
|
|
136
139
|
}
|
|
137
140
|
});
|
|
138
141
|
export {
|
|
139
|
-
|
|
142
|
+
ge as default
|
|
140
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"AA2NA,OAAO,KAAK,EACV,IAAI,EAGL,MAAM,mBAAmB,CAAA;;;;;;;;;;;;;;AAoT1B,wBAMG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModelsAccordion.vue2.js";
|
|
2
2
|
import "./ModelsAccordion.vue3.js";
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-304ad700"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,MAAM,MAAM,cAAc,CAAA;AAEjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAI7B,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAoFpC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
|
-
value?:
|
|
3
|
+
value?: OpenAPIV3_1.SchemaObject | OpenAPIV3.SchemaObject | OpenAPIV2.DefinitionsObject | undefined;
|
|
3
4
|
/** Track how deep we’ve gone */
|
|
4
5
|
level?: number | undefined;
|
|
5
6
|
name?: string | undefined;
|
|
@@ -10,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
10
11
|
}>, {
|
|
11
12
|
level: number;
|
|
12
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
13
|
-
value?:
|
|
14
|
+
value?: OpenAPIV3_1.SchemaObject | OpenAPIV3.SchemaObject | OpenAPIV2.DefinitionsObject | undefined;
|
|
14
15
|
/** Track how deep we’ve gone */
|
|
15
16
|
level?: number | undefined;
|
|
16
17
|
name?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AA0RA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;;;IAiB3E,gCAAgC;;;IAIhC,+DAA+D;;IAE/D,2CAA2C;;;;;;IAN3C,gCAAgC;;;IAIhC,+DAA+D;;IAE/D,2CAA2C;;;;;;;AAiT/C,wBAMG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Schema.vue2.js";
|
|
2
2
|
import "./Schema.vue3.js";
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-25443e6c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as j, computed as O, openBlock as l, createBlock as i, unref as p, withCtx as y, createElementVNode as k, normalizeClass as d, createElementBlock as a, createVNode as v, createCommentVNode as r, withDirectives as D, normalizeStyle as q, Fragment as t, createTextVNode as C, toDisplayString as P, vShow as z, renderList as I, pushScopeId as N, popScopeId as V } from "vue";
|
|
2
2
|
import { Disclosure as A, DisclosureButton as E, DisclosurePanel as H } from "@headlessui/vue";
|
|
3
3
|
import { ScalarMarkdown as T, ScalarIcon as $ } from "@scalar/components";
|
|
4
4
|
import F from "./SchemaHeading.vue.js";
|
|
5
|
-
import
|
|
6
|
-
const L = (s) => (N("data-v-
|
|
5
|
+
import m from "./SchemaProperty.vue.js";
|
|
6
|
+
const L = (s) => (N("data-v-25443e6c"), s = s(), V(), s), M = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "schema-card-description"
|
|
9
9
|
}, R = /* @__PURE__ */ L(() => /* @__PURE__ */ k("polygon", {
|
|
@@ -11,10 +11,10 @@ const L = (s) => (N("data-v-078f41be"), s = s(), V(), s), M = {
|
|
|
11
11
|
points: "14 8 8 8 8 14 6 14 6 8 0 8 0 6 6 6 6 0 8 0 8 6 14 6"
|
|
12
12
|
}, null, -1)), G = [
|
|
13
13
|
R
|
|
14
|
-
], Y = /* @__PURE__ */
|
|
14
|
+
], Y = /* @__PURE__ */ j({
|
|
15
15
|
__name: "Schema",
|
|
16
16
|
props: {
|
|
17
|
-
value: {},
|
|
17
|
+
value: { type: [Object, Boolean] },
|
|
18
18
|
level: { default: 0 },
|
|
19
19
|
name: {},
|
|
20
20
|
compact: { type: Boolean },
|
|
@@ -35,15 +35,15 @@ const L = (s) => (N("data-v-078f41be"), s = s(), V(), s), M = {
|
|
|
35
35
|
{ "schema-card--compact": e.compact, "schema-card--open": n }
|
|
36
36
|
]])
|
|
37
37
|
}, [
|
|
38
|
-
(b = e.value) != null && b.description ? (l(), a("div", M, [
|
|
39
|
-
|
|
38
|
+
(b = e.value) != null && b.description && typeof e.value.description == "string" ? (l(), a("div", M, [
|
|
39
|
+
v(p(T), {
|
|
40
40
|
value: e.value.description
|
|
41
41
|
}, null, 8, ["value"])
|
|
42
42
|
])) : r("", !0),
|
|
43
43
|
k("div", {
|
|
44
44
|
class: d(["schema-properties", { "schema-properties-open": n }])
|
|
45
45
|
}, [
|
|
46
|
-
|
|
46
|
+
D(v(p(E), {
|
|
47
47
|
as: e.noncollapsible ? "div" : "button",
|
|
48
48
|
class: d(["schema-card-title", { "schema-card-title--compact": e.compact }]),
|
|
49
49
|
style: q({
|
|
@@ -76,7 +76,7 @@ const L = (s) => (N("data-v-078f41be"), s = s(), V(), s), M = {
|
|
|
76
76
|
icon: "ChevronRight",
|
|
77
77
|
size: "md"
|
|
78
78
|
}, null, 8, ["class"])) : r("", !0),
|
|
79
|
-
|
|
79
|
+
v(F, {
|
|
80
80
|
name: ((u = e.value) == null ? void 0 : u.title) ?? e.name,
|
|
81
81
|
value: e.value
|
|
82
82
|
}, null, 8, ["name", "value"])
|
|
@@ -87,14 +87,14 @@ const L = (s) => (N("data-v-078f41be"), s = s(), V(), s), M = {
|
|
|
87
87
|
}, 1032, ["as", "class", "style"]), [
|
|
88
88
|
[z, !(e.noncollapsible && e.compact)]
|
|
89
89
|
]),
|
|
90
|
-
|
|
90
|
+
v(p(H), { static: e.noncollapsible }, {
|
|
91
91
|
default: y(() => {
|
|
92
92
|
var c;
|
|
93
93
|
return [
|
|
94
94
|
e.value.properties || e.value.additionalProperties ? (l(), a(t, { key: 0 }, [
|
|
95
95
|
e.value.properties ? (l(!0), a(t, { key: 0 }, I(Object.keys((c = e.value) == null ? void 0 : c.properties), (o) => {
|
|
96
96
|
var u, g, w, S;
|
|
97
|
-
return l(), i(
|
|
97
|
+
return l(), i(m, {
|
|
98
98
|
key: o,
|
|
99
99
|
compact: e.compact,
|
|
100
100
|
level: e.level,
|
|
@@ -104,14 +104,17 @@ const L = (s) => (N("data-v-078f41be"), s = s(), V(), s), M = {
|
|
|
104
104
|
}, null, 8, ["compact", "level", "name", "required", "value"]);
|
|
105
105
|
}), 128)) : r("", !0),
|
|
106
106
|
e.value.additionalProperties ? (l(), a(t, { key: 1 }, [
|
|
107
|
-
e.value.additionalProperties === !0 || Object.keys(e.value.additionalProperties).length === 0 || !e.value.additionalProperties.type ? (l(), i(
|
|
107
|
+
e.value.additionalProperties === !0 || Object.keys(e.value.additionalProperties).length === 0 || !e.value.additionalProperties.type ? (l(), i(m, {
|
|
108
108
|
key: 0,
|
|
109
109
|
additional: "",
|
|
110
110
|
compact: e.compact,
|
|
111
111
|
level: e.level,
|
|
112
112
|
noncollapsible: "",
|
|
113
|
-
value: {
|
|
114
|
-
|
|
113
|
+
value: {
|
|
114
|
+
type: "any",
|
|
115
|
+
...typeof e.value.additionalProperties == "object" ? e.value.additionalProperties : {}
|
|
116
|
+
}
|
|
117
|
+
}, null, 8, ["compact", "level", "value"])) : (l(), i(m, {
|
|
115
118
|
key: 1,
|
|
116
119
|
additional: "",
|
|
117
120
|
compact: e.compact,
|
|
@@ -120,7 +123,7 @@ const L = (s) => (N("data-v-078f41be"), s = s(), V(), s), M = {
|
|
|
120
123
|
value: e.value.additionalProperties
|
|
121
124
|
}, null, 8, ["compact", "level", "value"]))
|
|
122
125
|
], 64)) : r("", !0)
|
|
123
|
-
], 64)) : (l(), i(
|
|
126
|
+
], 64)) : (l(), i(m, {
|
|
124
127
|
key: 1,
|
|
125
128
|
compact: e.compact,
|
|
126
129
|
level: e.level,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { OpenAPIV2 } from '@scalar/openapi-parser';
|
|
1
|
+
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
-
value: OpenAPIV2.
|
|
3
|
+
value: OpenAPIV3_1.SchemaObject | OpenAPIV3.SchemaObject | OpenAPIV2.DefinitionsObject;
|
|
4
4
|
name?: string | undefined;
|
|
5
5
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
6
|
-
value: OpenAPIV2.
|
|
6
|
+
value: OpenAPIV3_1.SchemaObject | OpenAPIV3.SchemaObject | OpenAPIV2.DefinitionsObject;
|
|
7
7
|
name?: string | undefined;
|
|
8
8
|
}>>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;AA2F/E,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./SchemaHeading.vue2.js";
|
|
2
2
|
import "./SchemaHeading.vue3.js";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const c = /* @__PURE__ */ o(a, [["__scopeId", "data-v-c0a69ad0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { defineComponent as v, openBlock as a, createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as v, openBlock as a, createElementBlock as t, createElementVNode as k, Fragment as n, createTextVNode as o, createCommentVNode as l, toDisplayString as r } from "vue";
|
|
2
|
+
const d = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "schema-type"
|
|
5
|
+
}, c = ["title"], j = /* @__PURE__ */ v({
|
|
3
6
|
__name: "SchemaHeading",
|
|
4
7
|
props: {
|
|
5
|
-
value: {},
|
|
8
|
+
value: { type: [Object, Boolean] },
|
|
6
9
|
name: {}
|
|
7
10
|
},
|
|
8
11
|
setup(f) {
|
|
9
12
|
return (e, h) => {
|
|
10
|
-
var
|
|
11
|
-
return a(),
|
|
12
|
-
|
|
13
|
+
var p, u, m, y, s, i;
|
|
14
|
+
return typeof e.value == "object" ? (a(), t("span", d, [
|
|
15
|
+
k("span", {
|
|
13
16
|
class: "schema-type-icon",
|
|
14
17
|
title: typeof e.value.type == "string" ? e.value.type : Array.isArray(e.value.type) ? e.value.type.join(" | ") : "unkown type"
|
|
15
18
|
}, [
|
|
16
|
-
e.value.type === "object" ? (a(), n
|
|
17
|
-
|
|
18
|
-
], 64)) :
|
|
19
|
-
e.value.type === "array" ? (a(), n
|
|
20
|
-
|
|
21
|
-
], 64)) :
|
|
22
|
-
e.value.enum ? (a(), n
|
|
23
|
-
|
|
24
|
-
], 64)) :
|
|
19
|
+
e.value.type === "object" ? (a(), t(n, { key: 0 }, [
|
|
20
|
+
o(" {} ")
|
|
21
|
+
], 64)) : l("", !0),
|
|
22
|
+
e.value.type === "array" ? (a(), t(n, { key: 1 }, [
|
|
23
|
+
o(" [] ")
|
|
24
|
+
], 64)) : l("", !0),
|
|
25
|
+
e.value.enum ? (a(), t(n, { key: 2 }, [
|
|
26
|
+
o(" enum ")
|
|
27
|
+
], 64)) : l("", !0)
|
|
25
28
|
], 8, c),
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
], 64)) : e.name ? (a(), n
|
|
29
|
-
|
|
30
|
-
], 64)) : (a(), n
|
|
31
|
-
|
|
29
|
+
(u = (p = e.value) == null ? void 0 : p.xml) != null && u.name && ((y = (m = e.value) == null ? void 0 : m.xml) == null ? void 0 : y.name) !== "##default" ? (a(), t(n, { key: 0 }, [
|
|
30
|
+
o(" <" + r((i = (s = e.value) == null ? void 0 : s.xml) == null ? void 0 : i.name) + " /> ", 1)
|
|
31
|
+
], 64)) : e.name ? (a(), t(n, { key: 1 }, [
|
|
32
|
+
o(r(e.name), 1)
|
|
33
|
+
], 64)) : (a(), t(n, { key: 2 }, [
|
|
34
|
+
o(r(e.value.type), 1)
|
|
32
35
|
], 64))
|
|
33
|
-
]);
|
|
36
|
+
])) : l("", !0);
|
|
34
37
|
};
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
j as default
|
|
39
42
|
};
|
package/dist/helpers/parse.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { Spec } from '@scalar/oas-utils';
|
|
2
|
-
export declare const parse: (specification: any
|
|
2
|
+
export declare const parse: (specification: any, { proxy, }?: {
|
|
3
|
+
proxy?: string | undefined;
|
|
4
|
+
}) => Promise<Spec>;
|
|
3
5
|
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAc7C,eAAO,MAAM,KAAK,kBACD,GAAG;;MAMjB,QAAQ,IAAI,CAwDd,CAAA"}
|