@scalar/api-reference 1.31.1 → 1.31.3
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 +33 -0
- package/dist/browser/standalone.js +7532 -7508
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +3 -2
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +87 -103
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +16 -0
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-name.js +40 -0
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
- package/dist/features/DownloadLink/DownloadLink.vue2.js +45 -28
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
- package/dist/index.js +1 -1
- package/dist/libs/download.d.ts +2 -1
- package/dist/libs/download.d.ts.map +1 -1
- package/dist/libs/download.js +23 -11
- package/dist/stores/useHttpClientStore.js +17 -18
- package/dist/style.css +1 -1
- package/package.json +9 -9
- package/dist/helpers/local-storage.d.ts +0 -8
- package/dist/helpers/local-storage.d.ts.map +0 -1
- package/dist/helpers/local-storage.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AA6kBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAgCvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAIhB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AA4OxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBAhbZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EAqb/D;AA0BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YAtfqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA6f9D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c97b32f7"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
|
@@ -111,10 +111,11 @@ const ze = ["innerHTML"], Ge = { class: "references-header" }, Ke = ["aria-label
|
|
|
111
111
|
spec: D.value
|
|
112
112
|
}));
|
|
113
113
|
k(
|
|
114
|
-
() => _.on(({ filename: e }) => {
|
|
114
|
+
() => _.on(({ filename: e, format: o }) => {
|
|
115
115
|
Be(
|
|
116
116
|
N(Y) || N(b.rawSpec) || "",
|
|
117
|
-
e
|
|
117
|
+
e,
|
|
118
|
+
o
|
|
118
119
|
);
|
|
119
120
|
})
|
|
120
121
|
), se(() => _.reset()), ve(() => le()), u(ge, "modal"), u(Pe, t), u(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.vue"],"names":[],"mappings":"AA4BA,iBAAS,cAAc;WAsCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -7,7 +7,7 @@ function s(e, a) {
|
|
|
7
7
|
r(e.$slots, "default", {}, void 0, !0)
|
|
8
8
|
]);
|
|
9
9
|
}
|
|
10
|
-
const l = /* @__PURE__ */ c(n, [["render", s], ["__scopeId", "data-v-
|
|
10
|
+
const l = /* @__PURE__ */ c(n, [["render", s], ["__scopeId", "data-v-1eb90c5b"]]);
|
|
11
11
|
export {
|
|
12
12
|
l as default
|
|
13
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClientLibraries.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1ad6c6bc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as K, ref as w, useId as h, watch as P, onMounted as B,
|
|
|
2
2
|
import { TabGroup as M, TabList as O, TabPanels as R, TabPanel as j } from "@headlessui/vue";
|
|
3
3
|
import { useWorkspace as G } from "@scalar/api-client/store";
|
|
4
4
|
import { ScalarMarkdown as J, ScalarCodeBlock as W } from "@scalar/components";
|
|
5
|
-
import { REFERENCE_LS_KEYS as Y } from "
|
|
5
|
+
import { REFERENCE_LS_KEYS as Y } from "@scalar/oas-utils/helpers";
|
|
6
6
|
import { useHttpClientStore as q } from "../../../stores/useHttpClientStore.js";
|
|
7
7
|
import z from "./ClientSelector.vue.js";
|
|
8
8
|
import { useFeaturedHttpClients as Q } from "./useFeaturedHttpClients.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AAwRA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAEjE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAA;AAKrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAqUF,wBAOG"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as E, ref as F, computed as r, resolveComponent as I, createElementBlock as u, openBlock as m, createCommentVNode as p, createBlock as d, Fragment as V, renderList as M, createVNode as b, createElementVNode as v, unref as f, withCtx as T, toDisplayString as w } from "vue";
|
|
2
|
+
import { ScalarListbox as j, ScalarMarkdown as R } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as Z } from "@scalar/icons";
|
|
4
|
+
import { mergeAllOfSchemas as $ } from "./helpers/merge-all-of-schemas.js";
|
|
5
|
+
import { getCompositionDisplay as G, getModelNameFromSchema as J } from "./helpers/schema-name.js";
|
|
6
6
|
import { hasComposition as g } from "./helpers/schema-composition.js";
|
|
7
7
|
import S from "./Schema.vue.js";
|
|
8
|
-
const
|
|
8
|
+
const K = { class: "property-rule" }, P = {
|
|
9
9
|
class: "composition-selector bg-b-1.5 hover:bg-b-2 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border border-b-0 px-2 py-1.25 pr-3 text-left",
|
|
10
10
|
type: "button"
|
|
11
|
-
},
|
|
11
|
+
}, Q = { class: "text-c-2" }, X = { class: "composition-selector-label text-c-1 relative" }, Y = { class: "composition-panel" }, W = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "property-description border-x border-t p-2"
|
|
14
|
-
}, te = /* @__PURE__ */
|
|
14
|
+
}, te = /* @__PURE__ */ E({
|
|
15
15
|
__name: "SchemaComposition",
|
|
16
16
|
props: {
|
|
17
17
|
composition: {},
|
|
@@ -22,132 +22,116 @@ const G = { class: "property-rule" }, J = {
|
|
|
22
22
|
compact: { type: Boolean },
|
|
23
23
|
hideHeading: { type: Boolean }
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
setup(n) {
|
|
26
|
+
const h = F(0), q = r(() => n.value[n.composition] || []), B = r(() => G(
|
|
27
|
+
q.value,
|
|
28
|
+
N.value,
|
|
29
|
+
n.schemas
|
|
30
|
+
)), C = r(
|
|
31
|
+
() => B.value.map(
|
|
32
|
+
(e, a) => ({
|
|
33
|
+
id: String(a),
|
|
34
|
+
label: J(e, n.schemas) || "Schema"
|
|
35
|
+
})
|
|
36
|
+
)
|
|
37
|
+
), O = r({
|
|
32
38
|
get: () => C.value.find(
|
|
33
|
-
(e) => e.id === String(
|
|
39
|
+
(e) => e.id === String(h.value)
|
|
34
40
|
),
|
|
35
|
-
set: (e) =>
|
|
36
|
-
}),
|
|
37
|
-
var
|
|
38
|
-
const e = ["oneOf", "anyOf"].includes(
|
|
39
|
-
return e ||
|
|
40
|
-
}),
|
|
41
|
-
if (!
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (j(t) === j(e))
|
|
50
|
-
return o;
|
|
51
|
-
}
|
|
52
|
-
if (e.type === "array" && e.items)
|
|
53
|
-
return `Array of ${e.items.type || "any"}`;
|
|
54
|
-
if (e.type)
|
|
55
|
-
return e.type;
|
|
56
|
-
if (typeof e == "object") {
|
|
57
|
-
const o = Object.keys(e);
|
|
58
|
-
if (o.length > 0)
|
|
59
|
-
return o[0];
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}, k = (e) => e.find((o) => g(o)), N = s(() => {
|
|
63
|
-
if (!k(l.value[l.composition]))
|
|
64
|
-
return l.value[l.composition];
|
|
65
|
-
const e = k(l.value[l.composition]);
|
|
66
|
-
return (e.oneOf || e.anyOf || e.allOf).map((t) => {
|
|
67
|
-
if (t.allOf) {
|
|
68
|
-
const n = t.allOf.find((c) => c.title), r = t.allOf.find((c) => !c.title);
|
|
69
|
-
return n && r ? {
|
|
70
|
-
...n,
|
|
41
|
+
set: (e) => h.value = Number(e.id)
|
|
42
|
+
}), A = r(() => {
|
|
43
|
+
var l;
|
|
44
|
+
const e = ["oneOf", "anyOf"].includes(n.composition), a = n.composition === "allOf" && ((l = n.value[n.composition]) == null ? void 0 : l.some((o) => g(o)));
|
|
45
|
+
return e || a;
|
|
46
|
+
}), k = (e) => e.find((a) => g(a)), N = r(() => {
|
|
47
|
+
if (!k(n.value[n.composition]))
|
|
48
|
+
return n.value[n.composition];
|
|
49
|
+
const e = k(n.value[n.composition]);
|
|
50
|
+
return (e.oneOf || e.anyOf || e.allOf).map((l) => {
|
|
51
|
+
if (l.allOf) {
|
|
52
|
+
const o = l.allOf.find((c) => c.title), s = l.allOf.find((c) => !c.title);
|
|
53
|
+
return o && s ? {
|
|
54
|
+
...o,
|
|
71
55
|
properties: {
|
|
72
|
-
...
|
|
73
|
-
...
|
|
56
|
+
...o.properties,
|
|
57
|
+
...s.properties
|
|
74
58
|
},
|
|
75
59
|
required: [
|
|
76
|
-
...
|
|
77
|
-
...
|
|
60
|
+
...o.required || [],
|
|
61
|
+
...s.required || []
|
|
78
62
|
],
|
|
79
|
-
oneOf:
|
|
80
|
-
anyOf:
|
|
81
|
-
} :
|
|
63
|
+
oneOf: s.oneOf,
|
|
64
|
+
anyOf: s.anyOf
|
|
65
|
+
} : o || l;
|
|
82
66
|
}
|
|
83
|
-
return
|
|
67
|
+
return l;
|
|
84
68
|
});
|
|
85
|
-
}),
|
|
86
|
-
var
|
|
69
|
+
}), D = (e) => {
|
|
70
|
+
var a, l;
|
|
87
71
|
if (e === "allOf") {
|
|
88
|
-
const
|
|
89
|
-
(
|
|
72
|
+
const o = (l = (a = n.value) == null ? void 0 : a[e]) == null ? void 0 : l.find(
|
|
73
|
+
(s) => g(s)
|
|
90
74
|
);
|
|
91
|
-
if (
|
|
75
|
+
if (o != null && o.oneOf)
|
|
92
76
|
return "One of";
|
|
93
|
-
if (
|
|
77
|
+
if (o != null && o.anyOf)
|
|
94
78
|
return "Any of";
|
|
95
79
|
}
|
|
96
|
-
return e.replace(/([A-Z])/g, " $1").replace(/^./, (
|
|
97
|
-
}, i =
|
|
98
|
-
() => N.value[
|
|
99
|
-
),
|
|
80
|
+
return e.replace(/([A-Z])/g, " $1").replace(/^./, (o) => o.toUpperCase()).toLowerCase().replace(/^(\w)/, (o) => o.toUpperCase());
|
|
81
|
+
}, i = r(
|
|
82
|
+
() => N.value[h.value]
|
|
83
|
+
), y = r(() => {
|
|
100
84
|
var e;
|
|
101
85
|
return (e = i.value) != null && e.oneOf ? "oneOf" : "anyOf";
|
|
102
|
-
}),
|
|
103
|
-
var
|
|
104
|
-
const e =
|
|
105
|
-
return (
|
|
106
|
-
}),
|
|
86
|
+
}), z = r(() => {
|
|
87
|
+
var a;
|
|
88
|
+
const e = y.value;
|
|
89
|
+
return (a = i.value) == null ? void 0 : a[e];
|
|
90
|
+
}), L = r(() => {
|
|
107
91
|
const e = i.value;
|
|
108
92
|
return e ? !!(e.properties || e.type || e.nullable || e.const !== void 0 || e.enum || e.allOf || e.oneOf || e.anyOf || e.items) : !1;
|
|
109
93
|
});
|
|
110
|
-
return (e,
|
|
111
|
-
var
|
|
112
|
-
const
|
|
113
|
-
return m(), u("div",
|
|
114
|
-
e.composition === "allOf" && e.value[e.composition].some((
|
|
115
|
-
(
|
|
116
|
-
), (
|
|
117
|
-
key:
|
|
94
|
+
return (e, a) => {
|
|
95
|
+
var o, s, c, H;
|
|
96
|
+
const l = I("SchemaComposition", !0);
|
|
97
|
+
return m(), u("div", K, [
|
|
98
|
+
e.composition === "allOf" && e.value[e.composition].some((t) => t.oneOf || t.anyOf) ? (m(!0), u(V, { key: 0 }, M(e.value[e.composition].filter(
|
|
99
|
+
(t) => !t.oneOf && !t.anyOf
|
|
100
|
+
), (t, U) => (m(), d(S, {
|
|
101
|
+
key: U,
|
|
118
102
|
compact: e.compact,
|
|
119
103
|
level: e.level,
|
|
120
104
|
name: e.name,
|
|
121
105
|
noncollapsible: e.level == 0,
|
|
122
106
|
schemas: e.schemas,
|
|
123
|
-
value:
|
|
107
|
+
value: t
|
|
124
108
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))), 128)) : p("", !0),
|
|
125
|
-
|
|
126
|
-
b(
|
|
109
|
+
A.value ? (m(), u(V, { key: 1 }, [
|
|
110
|
+
b(f(j), {
|
|
127
111
|
modelValue: O.value,
|
|
128
|
-
"onUpdate:modelValue":
|
|
112
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => O.value = t),
|
|
129
113
|
options: C.value,
|
|
130
114
|
resize: ""
|
|
131
115
|
}, {
|
|
132
|
-
default:
|
|
133
|
-
var
|
|
116
|
+
default: T(() => {
|
|
117
|
+
var t;
|
|
134
118
|
return [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
b(
|
|
119
|
+
v("button", P, [
|
|
120
|
+
v("span", Q, w(D(e.composition)), 1),
|
|
121
|
+
v("span", X, w(((t = O.value) == null ? void 0 : t.label) || "Schema"), 1),
|
|
122
|
+
b(f(Z), { class: "z-1" })
|
|
139
123
|
])
|
|
140
124
|
];
|
|
141
125
|
}),
|
|
142
126
|
_: 1
|
|
143
127
|
}, 8, ["modelValue", "options"]),
|
|
144
|
-
|
|
145
|
-
(
|
|
146
|
-
b(
|
|
128
|
+
v("div", Y, [
|
|
129
|
+
(o = i.value) != null && o.description ? (m(), u("div", W, [
|
|
130
|
+
b(f(R), {
|
|
147
131
|
value: i.value.description
|
|
148
132
|
}, null, 8, ["value"])
|
|
149
133
|
])) : p("", !0),
|
|
150
|
-
|
|
134
|
+
L.value ? (m(), d(S, {
|
|
151
135
|
key: 1,
|
|
152
136
|
compact: e.compact,
|
|
153
137
|
level: e.level + 1,
|
|
@@ -155,34 +139,34 @@ const G = { class: "property-rule" }, J = {
|
|
|
155
139
|
name: e.name,
|
|
156
140
|
noncollapsible: !0,
|
|
157
141
|
schemas: e.schemas,
|
|
158
|
-
value: (
|
|
142
|
+
value: (s = i.value) != null && s.properties ? {
|
|
159
143
|
type: "object",
|
|
160
144
|
properties: i.value.properties,
|
|
161
145
|
required: i.value.required
|
|
162
146
|
} : i.value
|
|
163
147
|
}, null, 8, ["compact", "level", "hideHeading", "name", "schemas", "value"])) : p("", !0),
|
|
164
|
-
(c = i.value) != null && c.oneOf || (
|
|
148
|
+
(c = i.value) != null && c.oneOf || (H = i.value) != null && H.anyOf ? (m(), d(l, {
|
|
165
149
|
key: 2,
|
|
166
150
|
compact: e.compact,
|
|
167
|
-
composition:
|
|
151
|
+
composition: y.value,
|
|
168
152
|
hideHeading: e.hideHeading,
|
|
169
153
|
level: e.level + 1,
|
|
170
154
|
name: e.name,
|
|
171
155
|
noncollapsible: !0,
|
|
172
156
|
schemas: e.schemas,
|
|
173
157
|
value: {
|
|
174
|
-
[
|
|
158
|
+
[y.value]: z.value
|
|
175
159
|
}
|
|
176
160
|
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "schemas", "value"])) : p("", !0)
|
|
177
161
|
])
|
|
178
|
-
], 64)) : (m(),
|
|
162
|
+
], 64)) : (m(), d(S, {
|
|
179
163
|
key: 2,
|
|
180
164
|
compact: e.compact,
|
|
181
165
|
level: e.level,
|
|
182
166
|
name: e.name,
|
|
183
167
|
noncollapsible: e.level == 0,
|
|
184
168
|
schemas: e.schemas,
|
|
185
|
-
value:
|
|
169
|
+
value: f($)(e.value[e.composition])
|
|
186
170
|
}, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))
|
|
187
171
|
]);
|
|
188
172
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import type { Schemas } from '../../../../features/Operation/types/schemas';
|
|
3
|
+
/**
|
|
4
|
+
* Extract schema name from various schema formats
|
|
5
|
+
* Handles $ref, title, name, type, and schema dictionary lookup
|
|
6
|
+
*/
|
|
7
|
+
export declare function getModelNameFromSchema(schema: OpenAPIV3_1.SchemaObject, schemas?: Schemas): string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Check if a schema has a name (title, name, or custom identifier)
|
|
10
|
+
*/
|
|
11
|
+
export declare function hasName(name: string | null): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Choose the schemas to display in composition panel
|
|
14
|
+
*/
|
|
15
|
+
export declare function getCompositionDisplay(baseSchemas: OpenAPIV3_1.SchemaObject[], compositionSchemas: OpenAPIV3_1.SchemaObject[], schemas?: Schemas): OpenAPIV3_1.SchemaObject[];
|
|
16
|
+
//# sourceMappingURL=schema-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAEjE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAuDzG;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAgBpD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,CAAC,YAAY,EAAE,EACvC,kBAAkB,EAAE,WAAW,CAAC,YAAY,EAAE,EAC9C,OAAO,CAAC,EAAE,OAAO,GAChB,WAAW,CAAC,YAAY,EAAE,CA0B5B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { stringify as o } from "flatted";
|
|
2
|
+
function f(t, r) {
|
|
3
|
+
if (!t)
|
|
4
|
+
return null;
|
|
5
|
+
if ("title" in t && t.title)
|
|
6
|
+
return t.title;
|
|
7
|
+
if ("name" in t && t.name)
|
|
8
|
+
return t.name;
|
|
9
|
+
if (r && typeof r == "object") {
|
|
10
|
+
for (const [i, e] of Object.entries(r))
|
|
11
|
+
if (o(e) === o(t))
|
|
12
|
+
return i;
|
|
13
|
+
}
|
|
14
|
+
if ("$ref" in t) {
|
|
15
|
+
const e = t.$ref.match(/\/([^\/]+)$/);
|
|
16
|
+
if (e)
|
|
17
|
+
return e[1];
|
|
18
|
+
}
|
|
19
|
+
if ("type" in t && t.type === "array" && "items" in t && t.items)
|
|
20
|
+
return `Array of ${"type" in t.items && t.items.type || "any"}`;
|
|
21
|
+
if ("type" in t && t.type)
|
|
22
|
+
return Array.isArray(t.type) ? t.type.join(" | ") : t.type;
|
|
23
|
+
if (typeof t == "object") {
|
|
24
|
+
const i = Object.keys(t);
|
|
25
|
+
if (i.length > 0)
|
|
26
|
+
return i[0];
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
function y(t) {
|
|
31
|
+
return !t || ["anyOf", "oneOf", "allOf"].includes(t) ? !1 : /[A-Z]/.test(t) || /\s/.test(t) || /\(\d+\)/.test(t);
|
|
32
|
+
}
|
|
33
|
+
function N(t, r, i) {
|
|
34
|
+
return t.some((n) => "$ref" in n) || t.map((n) => f(n, i)).some((n) => y(n)) ? t : r.map((n) => f(n, i)).some((n) => y(n)) ? r : t;
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
N as getCompositionDisplay,
|
|
38
|
+
f as getModelNameFromSchema,
|
|
39
|
+
y as hasName
|
|
40
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
title?: string;
|
|
3
3
|
};
|
|
4
|
-
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, {},
|
|
4
|
+
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>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=DownloadLink.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadLink.vue.d.ts","sourceRoot":"","sources":["../../../src/features/DownloadLink/DownloadLink.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DownloadLink.vue.d.ts","sourceRoot":"","sources":["../../../src/features/DownloadLink/DownloadLink.vue"],"names":[],"mappings":"AA+JA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;AAyHF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DownloadLink.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-cdfec824"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,38 +1,55 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as g, computed as v, createElementBlock as b, createCommentVNode as k, unref as C, openBlock as D, createElementVNode as o, withModifiers as s, createVNode as i, withCtx as r, createTextVNode as d } from "vue";
|
|
2
|
+
import c from "github-slugger";
|
|
3
|
+
import a from "../../components/Badge/Badge.vue.js";
|
|
4
|
+
import { useConfig as x } from "../../hooks/useConfig.js";
|
|
5
|
+
import { downloadEventBus as y } from "../../libs/download.js";
|
|
6
|
+
const B = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "download-container"
|
|
9
|
+
}, I = /* @__PURE__ */ g({
|
|
6
10
|
__name: "DownloadLink",
|
|
7
11
|
props: {
|
|
8
12
|
title: {}
|
|
9
13
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
14
|
+
setup(u) {
|
|
15
|
+
const m = x(), p = new c(), f = v(() => p.slug(u.title ?? "")), n = (e) => {
|
|
16
|
+
y.emit({ id: "", filename: f.value, format: e });
|
|
13
17
|
};
|
|
14
|
-
return (
|
|
15
|
-
var l
|
|
16
|
-
return
|
|
17
|
-
(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
return (e, t) => {
|
|
19
|
+
var l;
|
|
20
|
+
return (l = C(m)) != null && l.hideDownloadButton ? k("", !0) : (D(), b("div", B, [
|
|
21
|
+
o("button", {
|
|
22
|
+
type: "button",
|
|
23
|
+
class: "download-button",
|
|
24
|
+
onClick: t[0] || (t[0] = s((w) => n("json"), ["prevent"])),
|
|
25
|
+
variant: "ghost"
|
|
26
|
+
}, [
|
|
27
|
+
t[3] || (t[3] = o("span", null, " Download OpenAPI Document ", -1)),
|
|
28
|
+
i(a, { class: "extension" }, {
|
|
29
|
+
default: r(() => t[2] || (t[2] = [
|
|
30
|
+
d("json")
|
|
31
|
+
])),
|
|
32
|
+
_: 1
|
|
33
|
+
})
|
|
34
|
+
]),
|
|
35
|
+
o("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
class: "download-button",
|
|
38
|
+
onClick: t[1] || (t[1] = s((w) => n("yaml"), ["prevent"])),
|
|
39
|
+
variant: "ghost"
|
|
40
|
+
}, [
|
|
41
|
+
t[5] || (t[5] = o("span", null, " Download OpenAPI Document ", -1)),
|
|
42
|
+
i(a, { class: "extension" }, {
|
|
43
|
+
default: r(() => t[4] || (t[4] = [
|
|
44
|
+
d("yaml")
|
|
45
|
+
])),
|
|
46
|
+
_: 1
|
|
47
|
+
})
|
|
48
|
+
])
|
|
49
|
+
]));
|
|
33
50
|
};
|
|
34
51
|
}
|
|
35
52
|
});
|
|
36
53
|
export {
|
|
37
|
-
|
|
54
|
+
I as default
|
|
38
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterHeaders.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterHeaders.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAMxD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC,YAAY,CAAA;KAAE,CAAA;CACrD,CAAC;;AAiJF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./ParameterHeaders.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ a(r, [["__scopeId", "data-v-9293fa9e"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|