@scalar/api-reference 1.31.4 → 1.31.6
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 +19 -0
- package/dist/browser/standalone.js +15616 -15521
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.js +6 -6
- package/dist/components/ApiReferenceLayout.vue.d.ts +6 -3
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +4 -2
- package/dist/components/ApiReferenceLayout.vue2.js +230 -151
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +3 -3
- package/dist/components/GettingStarted.vue2.js +23 -23
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -44
- package/dist/libs/openapi.js +32 -32
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +40 -0
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -0
- package/dist/v2/ApiReferenceWorkspace.vue.js +65 -0
- package/dist/v2/ApiReferenceWorkspace.vue3.js +5 -0
- package/dist/v2/events/definitions.d.ts +35 -0
- package/dist/v2/events/definitions.d.ts.map +1 -0
- package/dist/v2/events/index.d.ts +3 -0
- package/dist/v2/events/index.d.ts.map +1 -0
- package/dist/v2/events/listeners.d.ts +8 -0
- package/dist/v2/events/listeners.d.ts.map +1 -0
- package/dist/v2/events/listeners.js +15 -0
- package/dist/v2/styles.d.ts +2 -0
- package/dist/v2/styles.d.ts.map +1 -0
- package/package.json +10 -9
- package/dist/components/Layouts/ClassicLayout.vue.d.ts +0 -23
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +0 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +0 -67
- package/dist/components/Layouts/ClassicLayout.vue2.js +0 -4
- package/dist/components/Layouts/Layouts.vue.d.ts +0 -26
- package/dist/components/Layouts/Layouts.vue.d.ts.map +0 -1
- package/dist/components/Layouts/Layouts.vue.js +0 -35
- package/dist/components/Layouts/Layouts.vue2.js +0 -4
- package/dist/components/Layouts/ModernLayout.vue.d.ts +0 -23
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +0 -1
- package/dist/components/Layouts/ModernLayout.vue.js +0 -8
- package/dist/components/Layouts/ModernLayout.vue2.js +0 -102
- package/dist/components/Layouts/index.d.ts +0 -2
- package/dist/components/Layouts/index.d.ts.map +0 -1
- package/dist/components/SingleApiReference.vue.d.ts +0 -29
- package/dist/components/SingleApiReference.vue.d.ts.map +0 -1
- package/dist/components/SingleApiReference.vue.js +0 -57
- package/dist/components/SingleApiReference.vue3.js +0 -5
package/dist/libs/openapi.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { XScalarStability as o } from "@scalar/types/legacy";
|
|
2
|
-
function l(e,
|
|
2
|
+
function l(e, t) {
|
|
3
3
|
var n;
|
|
4
|
-
let
|
|
5
|
-
const i = (n =
|
|
6
|
-
return
|
|
4
|
+
let r = e;
|
|
5
|
+
const i = (n = t.required) == null ? void 0 : n.includes(e);
|
|
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
8
|
function p(e) {
|
|
9
9
|
var i;
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const t = ["Body"], r = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
|
|
11
|
+
return r && Object.keys(r).forEach((n) => {
|
|
12
12
|
if (!e.schema)
|
|
13
13
|
return;
|
|
14
|
-
|
|
15
|
-
const s =
|
|
14
|
+
t.push(l(n, e.schema));
|
|
15
|
+
const s = r[n];
|
|
16
16
|
s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((c) => {
|
|
17
17
|
var u, f;
|
|
18
|
-
|
|
18
|
+
t.push(`${c} ${(f = (u = s.properties) == null ? void 0 : u[c]) == null ? void 0 : f.type}`);
|
|
19
19
|
});
|
|
20
|
-
}),
|
|
20
|
+
}), t;
|
|
21
21
|
}
|
|
22
22
|
function O(e) {
|
|
23
|
-
var
|
|
23
|
+
var t, r, i;
|
|
24
24
|
try {
|
|
25
|
-
const n = (i = (
|
|
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
28
|
return p(n);
|
|
@@ -31,28 +31,28 @@ function O(e) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
function d(e) {
|
|
34
|
-
var
|
|
34
|
+
var r, i;
|
|
35
35
|
if (!e)
|
|
36
36
|
return {};
|
|
37
|
-
const
|
|
37
|
+
const t = (
|
|
38
38
|
// OpenAPI 3.x
|
|
39
|
-
Object.keys(((
|
|
39
|
+
Object.keys(((r = e == null ? void 0 : e.components) == null ? void 0 : r.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
|
|
40
40
|
// Fallback
|
|
41
41
|
{}
|
|
42
42
|
)
|
|
43
43
|
);
|
|
44
|
-
return Object.keys(
|
|
44
|
+
return Object.keys(t ?? {}).forEach((n) => {
|
|
45
45
|
var s;
|
|
46
|
-
((s =
|
|
47
|
-
}),
|
|
46
|
+
((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 && delete t[n];
|
|
47
|
+
}), t;
|
|
48
48
|
}
|
|
49
49
|
const b = (e) => e ? !!Object.keys(d(e) ?? {}).length : !1, x = (e) => e ? !!Object.keys((e == null ? void 0 : e.webhooks) ?? {}).length : !1;
|
|
50
|
-
function a(e,
|
|
51
|
-
for (const [
|
|
52
|
-
i !== null && typeof i == "object" ? (
|
|
53
|
-
return
|
|
50
|
+
function a(e, t) {
|
|
51
|
+
for (const [r, i] of Object.entries(e))
|
|
52
|
+
i !== null && typeof i == "object" ? (t[r] ??= new i.__proto__.constructor(), a(i, t[r])) : typeof i < "u" && (t[r] = i);
|
|
53
|
+
return t;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function g(e) {
|
|
56
56
|
return a(e ?? {}, {
|
|
57
57
|
info: {
|
|
58
58
|
title: "",
|
|
@@ -71,25 +71,25 @@ function E(e) {
|
|
|
71
71
|
tags: []
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function E(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 y(e) {
|
|
78
78
|
return e.deprecated ? o.Deprecated : e["x-scalar-stability"];
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
const
|
|
82
|
-
return
|
|
80
|
+
function S(e) {
|
|
81
|
+
const t = y(e);
|
|
82
|
+
return t === o.Deprecated ? "text-red" : t === o.Experimental ? "text-orange" : t === o.Stable ? "text-green" : "";
|
|
83
83
|
}
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
g as createEmptySpecification,
|
|
86
86
|
a as deepMerge,
|
|
87
87
|
O as extractRequestBody,
|
|
88
88
|
l as formatProperty,
|
|
89
89
|
d as getModels,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
y as getOperationStability,
|
|
91
|
+
S as getOperationStabilityColor,
|
|
92
92
|
b as hasModels,
|
|
93
93
|
x as hasWebhooks,
|
|
94
|
-
|
|
94
|
+
E as isOperationDeprecated
|
|
95
95
|
};
|