@scalar/api-reference 1.31.12 → 1.31.14
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 +22 -0
- package/dist/browser/standalone.js +11731 -11715
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +27 -26
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +73 -73
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +12 -14
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +97 -73
- package/dist/helpers/parse.js +1 -1
- package/dist/index.js +1 -1
- package/dist/libs/openapi.js +24 -24
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +8 -7
- package/package.json +9 -9
package/dist/libs/openapi.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { XScalarStability as o } from "@scalar/types/legacy";
|
|
2
|
-
function
|
|
2
|
+
function p(e, t) {
|
|
3
3
|
var n;
|
|
4
4
|
let r = e;
|
|
5
5
|
const i = (n = t.required) == null ? void 0 : n.includes(e);
|
|
6
6
|
return r += i ? " REQUIRED " : " optional ", t.properties[e] && (r += t.properties[e].type, t.properties[e].description && (r += " " + t.properties[e].description)), r;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function d(e) {
|
|
9
9
|
var i;
|
|
10
10
|
const t = ["Body"], r = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
|
|
11
11
|
return r && Object.keys(r).forEach((n) => {
|
|
12
12
|
if (!e.schema)
|
|
13
13
|
return;
|
|
14
|
-
t.push(
|
|
14
|
+
t.push(p(n, e.schema));
|
|
15
15
|
const s = r[n];
|
|
16
|
-
s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((
|
|
17
|
-
var
|
|
18
|
-
t.push(`${
|
|
16
|
+
s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((u) => {
|
|
17
|
+
var a, f;
|
|
18
|
+
t.push(`${u} ${(f = (a = s.properties) == null ? void 0 : a[u]) == null ? void 0 : f.type}`);
|
|
19
19
|
});
|
|
20
20
|
}), t;
|
|
21
21
|
}
|
|
@@ -25,12 +25,12 @@ function O(e) {
|
|
|
25
25
|
const n = (i = (r = (t = e == null ? void 0 : e.information) == null ? void 0 : t.requestBody) == null ? void 0 : r.content) == null ? void 0 : i["application/json"];
|
|
26
26
|
if (!n)
|
|
27
27
|
throw new Error("Body not found");
|
|
28
|
-
return
|
|
28
|
+
return d(n);
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function y(e) {
|
|
34
34
|
var r, i;
|
|
35
35
|
if (!e)
|
|
36
36
|
return {};
|
|
@@ -42,18 +42,18 @@ function d(e) {
|
|
|
42
42
|
)
|
|
43
43
|
);
|
|
44
44
|
return Object.keys(t ?? {}).forEach((n) => {
|
|
45
|
-
var s;
|
|
46
|
-
((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 && delete t[n];
|
|
45
|
+
var s, c;
|
|
46
|
+
(((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 || ((c = t[n]) == null ? void 0 : c["x-scalar-ignore"]) === !0) && delete t[n];
|
|
47
47
|
}), t;
|
|
48
48
|
}
|
|
49
|
-
const x = (e) => e ? !!Object.keys(
|
|
50
|
-
function
|
|
49
|
+
const x = (e) => e ? !!Object.keys(y(e) ?? {}).length : !1;
|
|
50
|
+
function l(e, t) {
|
|
51
51
|
for (const [r, i] of Object.entries(e))
|
|
52
|
-
i !== null && typeof i == "object" ? (t[r] ??= new i.__proto__.constructor(),
|
|
52
|
+
i !== null && typeof i == "object" ? (t[r] ??= new i.__proto__.constructor(), l(i, t[r])) : typeof i < "u" && (t[r] = i);
|
|
53
53
|
return t;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function g(e) {
|
|
56
|
+
return l(e ?? {}, {
|
|
57
57
|
info: {
|
|
58
58
|
title: "",
|
|
59
59
|
description: "",
|
|
@@ -71,24 +71,24 @@ function b(e) {
|
|
|
71
71
|
tags: []
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function b(e) {
|
|
75
75
|
return e.deprecated !== void 0 ? e.deprecated : !!(e["x-scalar-stability"] && e["x-scalar-stability"] === o.Deprecated);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function m(e) {
|
|
78
78
|
return e.deprecated ? o.Deprecated : e["x-scalar-stability"];
|
|
79
79
|
}
|
|
80
80
|
function E(e) {
|
|
81
|
-
const t =
|
|
81
|
+
const t = m(e);
|
|
82
82
|
return t === o.Deprecated ? "text-red" : t === o.Experimental ? "text-orange" : t === o.Stable ? "text-green" : "";
|
|
83
83
|
}
|
|
84
84
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
g as createEmptySpecification,
|
|
86
|
+
l as deepMerge,
|
|
87
87
|
O as extractRequestBody,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
p as formatProperty,
|
|
89
|
+
y as getModels,
|
|
90
|
+
m as getOperationStability,
|
|
91
91
|
E as getOperationStabilityColor,
|
|
92
92
|
x as hasModels,
|
|
93
|
-
|
|
93
|
+
b as isOperationDeprecated
|
|
94
94
|
};
|