@scalar/api-reference 1.35.2 → 1.35.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 +31 -0
- package/dist/browser/standalone.js +9636 -9786
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts +2 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +14 -11
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +70 -72
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +3 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +0 -2
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +80 -80
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +5 -2
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +43 -45
- package/dist/components/Content/Models/ClassicLayout.vue3.js +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +27 -20
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +5 -2
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +48 -52
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -2
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +33 -32
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +2 -2
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +10 -22
- 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 +93 -141
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +19 -4
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +83 -138
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts +2 -13
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +66 -92
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +19 -17
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +9 -14
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +62 -75
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +8 -13
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +120 -140
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +9 -4
- 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 +173 -204
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +11 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.js +11 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +13 -3
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.js +34 -13
- package/dist/components/Content/Schema/helpers/is-type-object.d.ts +4 -2
- package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -4
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +130 -84
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +5 -5
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +40 -31
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts +0 -8
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-composition.js +2 -6
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +8 -17
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +24 -33
- package/dist/features/Operation/Operation.vue.d.ts +3 -4
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +54 -73
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +10 -11
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +35 -43
- package/dist/features/Operation/components/{ParameterHeaders.vue.d.ts → Header.vue.d.ts} +4 -5
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/Header.vue.js +23 -0
- package/dist/features/Operation/components/Header.vue2.js +4 -0
- package/dist/features/Operation/components/Headers.vue.d.ts +8 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/Headers.vue.js +7 -0
- package/dist/features/Operation/components/Headers.vue2.js +61 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -10
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +23 -33
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -6
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +22 -19
- package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -10
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +35 -5
- package/dist/features/Operation/components/ParameterList.vue2.js +2 -38
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -10
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +78 -74
- package/dist/features/Operation/components/RequestBody.vue.d.ts +3 -8
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +78 -82
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +0 -4
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +35 -36
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +0 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +13 -15
- package/dist/features/Operation/helpers/combine-params.d.ts +1 -1
- package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -1
- package/dist/features/Operation/helpers/combine-params.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -9
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +75 -82
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -10
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +96 -103
- package/dist/features/api-client-modal/useApiClient.d.ts +90 -90
- package/dist/index.js +1 -1
- package/dist/libs/openapi.d.ts +1 -13
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +39 -56
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +10 -4
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +22 -18
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/package.json +13 -13
- package/dist/components/Content/Schema/Schema.preview.d.ts +0 -1078
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +0 -12
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -49
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +0 -13
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +0 -7
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +0 -64
- package/dist/features/Operation/components/ParameterList.vue3.js +0 -4
- package/dist/features/Operation/hooks/useResponses.d.ts +0 -17
- package/dist/features/Operation/hooks/useResponses.d.ts.map +0 -1
- package/dist/features/Operation/hooks/useResponses.js +0 -19
- package/dist/hooks/useDiscriminator.d.ts +0 -53
- package/dist/hooks/useDiscriminator.d.ts.map +0 -1
- package/dist/hooks/useDiscriminator.js +0 -149
- package/dist/hooks/useOperationDiscriminator.d.ts +0 -8
- package/dist/hooks/useOperationDiscriminator.d.ts.map +0 -1
- package/dist/hooks/useOperationDiscriminator.js +0 -57
- /package/dist/features/Operation/components/{ParameterHeaders.vue3.js → Headers.vue3.js} +0 -0
|
@@ -1,103 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { ScalarIconPlus as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as C, computed as s, ref as L, createElementBlock as m, createCommentVNode as d, openBlock as n, createElementVNode as V, Fragment as h, renderList as y, createBlock as S, createVNode as E, unref as N, withCtx as D, createTextVNode as B, normalizeClass as T, toDisplayString as H } from "vue";
|
|
2
|
+
import { ScalarButton as P } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as _ } from "@scalar/icons";
|
|
4
|
+
import { getResolvedRef as $ } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
|
+
import { isArraySchema as w } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
6
|
+
import b from "./SchemaEnumPropertyItem.vue.js";
|
|
7
|
+
const R = {
|
|
6
8
|
key: 0,
|
|
7
9
|
class: "property-enum"
|
|
8
|
-
},
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "property-enum-values"
|
|
11
|
-
}, Y = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "property-enum-values"
|
|
14
|
-
}, N = 9, q = 5, S = " ", X = /* @__PURE__ */ O({
|
|
10
|
+
}, U = { class: "property-enum-values" }, O = { key: 1 }, j = 9, z = 5, k = " ", J = /* @__PURE__ */ C({
|
|
15
11
|
__name: "SchemaEnumValues",
|
|
16
12
|
props: {
|
|
17
|
-
value: {}
|
|
18
|
-
isDiscriminator: { type: Boolean }
|
|
13
|
+
value: {}
|
|
19
14
|
},
|
|
20
15
|
setup(l) {
|
|
21
|
-
const
|
|
22
|
-
var
|
|
23
|
-
return
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
() => h.value ? q : N
|
|
48
|
-
), V = u(
|
|
49
|
-
() => i.value.slice(0, m.value)
|
|
50
|
-
), B = u(
|
|
51
|
-
() => i.value.slice(m.value)
|
|
52
|
-
), D = u(() => {
|
|
53
|
-
var n, e;
|
|
54
|
-
const t = ((n = l.value) == null ? void 0 : n["x-enumDescriptions"]) ?? ((e = l.value) == null ? void 0 : e["x-enum-descriptions"]);
|
|
55
|
-
return t && typeof t == "object" && !Array.isArray(t);
|
|
56
|
-
}), T = u(() => L.value && !l.isDiscriminator), c = P(!1), H = () => {
|
|
57
|
-
c.value = !c.value;
|
|
16
|
+
const r = s(() => {
|
|
17
|
+
var a;
|
|
18
|
+
return l.value ? l.value.enum || w(l.value) && ((a = $(l.value.items)) == null ? void 0 : a.enum) || [] : [];
|
|
19
|
+
}), v = s(
|
|
20
|
+
() => r.value.length > j
|
|
21
|
+
), i = s(
|
|
22
|
+
() => v.value ? z : r.value.length
|
|
23
|
+
), x = s(
|
|
24
|
+
() => r.value.slice(0, i.value)
|
|
25
|
+
), I = s(
|
|
26
|
+
() => r.value.slice(i.value)
|
|
27
|
+
), f = (a, c) => {
|
|
28
|
+
var t, u;
|
|
29
|
+
const e = ((t = l.value) == null ? void 0 : t["x-enumDescriptions"]) ?? ((u = l.value) == null ? void 0 : u["x-enum-descriptions"]);
|
|
30
|
+
if (e) {
|
|
31
|
+
if (Array.isArray(e))
|
|
32
|
+
return e[c];
|
|
33
|
+
if (typeof e == "object" && e !== null)
|
|
34
|
+
return e[String(a)];
|
|
35
|
+
}
|
|
36
|
+
}, p = (a, c) => {
|
|
37
|
+
var u, g;
|
|
38
|
+
const e = ((u = l.value) == null ? void 0 : u["x-enum-varnames"]) ?? ((g = l.value) == null ? void 0 : g["x-enumNames"]), t = Array.isArray(e) ? e[c] : void 0;
|
|
39
|
+
return t ? `${a}${k}=${k}${t}` : String(a);
|
|
40
|
+
}, o = L(!1), A = () => {
|
|
41
|
+
o.value = !o.value;
|
|
58
42
|
};
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
(
|
|
62
|
-
key: e,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, null, 8, ["
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
label:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
})
|
|
90
|
-
}, null, 8, ["class"]),
|
|
91
|
-
w(" " + U(c.value ? "Hide values" : "Show all values"), 1)
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
})
|
|
95
|
-
])
|
|
96
|
-
], 64)) : p("", !0)
|
|
97
|
-
]))
|
|
98
|
-
])) : p("", !0);
|
|
43
|
+
return (a, c) => r.value.length > 0 ? (n(), m("div", R, [
|
|
44
|
+
V("ul", U, [
|
|
45
|
+
(n(!0), m(h, null, y(x.value, (e, t) => (n(), S(b, {
|
|
46
|
+
key: String(e),
|
|
47
|
+
description: f(e, t),
|
|
48
|
+
label: p(e, t)
|
|
49
|
+
}, null, 8, ["description", "label"]))), 128)),
|
|
50
|
+
v.value && o.value ? (n(!0), m(h, { key: 0 }, y(I.value, (e, t) => (n(), S(b, {
|
|
51
|
+
key: String(e),
|
|
52
|
+
description: f(e, i.value + t),
|
|
53
|
+
label: p(e, i.value + t)
|
|
54
|
+
}, null, 8, ["description", "label"]))), 128)) : d("", !0),
|
|
55
|
+
v.value ? (n(), m("li", O, [
|
|
56
|
+
E(N(P), {
|
|
57
|
+
class: "enum-toggle-button my-2 flex h-fit gap-1 rounded-full border py-1.5 pr-2.5 pl-2 leading-none",
|
|
58
|
+
variant: "ghost",
|
|
59
|
+
onClick: A
|
|
60
|
+
}, {
|
|
61
|
+
default: D(() => [
|
|
62
|
+
E(N(_), {
|
|
63
|
+
class: T({ "rotate-45": o.value }),
|
|
64
|
+
weight: "bold"
|
|
65
|
+
}, null, 8, ["class"]),
|
|
66
|
+
B(" " + H(o.value ? "Hide values" : "Show all values"), 1)
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})
|
|
70
|
+
])) : d("", !0)
|
|
71
|
+
])
|
|
72
|
+
])) : d("", !0);
|
|
99
73
|
}
|
|
100
74
|
});
|
|
101
75
|
export {
|
|
102
|
-
|
|
76
|
+
J as default
|
|
103
77
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
value:
|
|
3
|
+
value: SchemaObject;
|
|
4
4
|
name?: string;
|
|
5
5
|
};
|
|
6
6
|
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>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAMhG,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;;AAwFF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaHeading.vue2.js";
|
|
2
2
|
import "./SchemaHeading.vue3.js";
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0759195c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as v, computed as p, createElementBlock as t, createCommentVNode as l, openBlock as n, createElementVNode as f, unref as i, Fragment as u, createTextVNode as r, toDisplayString as o } from "vue";
|
|
2
|
+
import { isArraySchema as m } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
3
|
+
import { isTypeObject as y } from "./helpers/is-type-object.js";
|
|
4
|
+
const c = {
|
|
3
5
|
key: 0,
|
|
4
6
|
class: "schema-type"
|
|
5
|
-
},
|
|
7
|
+
}, d = ["title"], b = /* @__PURE__ */ v({
|
|
6
8
|
__name: "SchemaHeading",
|
|
7
9
|
props: {
|
|
8
|
-
value: {
|
|
10
|
+
value: {},
|
|
9
11
|
name: {}
|
|
10
12
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
return (e,
|
|
14
|
-
|
|
13
|
+
setup(a) {
|
|
14
|
+
const s = p(() => "type" in a.value ? a.value.type : a.value.enum ? "enum" : m(a.value) && a.value.items ? "array" : y(a.value) && (a.value.properties || a.value.additionalProperties) ? "object" : "unknown");
|
|
15
|
+
return (e, k) => typeof e.value == "object" ? (n(), t("span", c, [
|
|
16
|
+
f("span", {
|
|
15
17
|
class: "schema-type-icon",
|
|
16
|
-
title: typeof e.value.type == "string" ? e.value.type : Array.isArray(e.value.type) ? e.value.type.join(" | ") : "
|
|
18
|
+
title: "type" in e.value && typeof e.value.type == "string" ? e.value.type : "type" in e.value && Array.isArray(e.value.type) ? e.value.type.join(" | ") : "unknown type"
|
|
17
19
|
}, [
|
|
18
|
-
e.value
|
|
20
|
+
i(y)(e.value) ? (n(), t(u, { key: 0 }, [
|
|
19
21
|
r(" {} ")
|
|
20
22
|
], 64)) : l("", !0),
|
|
21
|
-
e.value
|
|
23
|
+
i(m)(e.value) ? (n(), t(u, { key: 1 }, [
|
|
22
24
|
r(" [] ")
|
|
23
25
|
], 64)) : l("", !0),
|
|
24
|
-
e.value.enum ? (n(),
|
|
26
|
+
e.value.enum ? (n(), t(u, { key: 2 }, [
|
|
25
27
|
r(" enum ")
|
|
26
28
|
], 64)) : l("", !0)
|
|
27
|
-
], 8,
|
|
28
|
-
e.name ? (n(),
|
|
29
|
+
], 8, d),
|
|
30
|
+
e.name ? (n(), t(u, { key: 0 }, [
|
|
29
31
|
r(o(e.name), 1)
|
|
30
|
-
], 64)) : (n(),
|
|
31
|
-
r(o(
|
|
32
|
+
], 64)) : (n(), t(u, { key: 1 }, [
|
|
33
|
+
r(o(s.value), 1)
|
|
32
34
|
], 64))
|
|
33
35
|
])) : l("", !0);
|
|
34
36
|
}
|
|
35
37
|
});
|
|
36
38
|
export {
|
|
37
|
-
|
|
39
|
+
b as default
|
|
38
40
|
};
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
1
|
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
3
|
-
import type {
|
|
2
|
+
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
3
|
type __VLS_Props = {
|
|
5
|
-
schema:
|
|
4
|
+
schema: SchemaObject;
|
|
5
|
+
discriminator?: DiscriminatorObject;
|
|
6
6
|
compact?: boolean;
|
|
7
7
|
hideHeading?: boolean;
|
|
8
8
|
level?: number;
|
|
9
9
|
hideModelNames?: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/** Hide readonly properties */
|
|
11
|
+
hideReadOnly?: boolean;
|
|
12
|
+
/** Hide write-only properties */
|
|
13
|
+
hideWriteOnly?: boolean;
|
|
14
|
+
breadcrumb?: string[];
|
|
14
15
|
orderSchemaPropertiesBy?: ApiReferenceConfiguration['orderSchemaPropertiesBy'];
|
|
15
16
|
orderRequiredPropertiesFirst?: ApiReferenceConfiguration['orderRequiredPropertiesFirst'];
|
|
16
|
-
hasDiscriminator?: boolean;
|
|
17
|
-
breadcrumb?: string[];
|
|
18
17
|
};
|
|
19
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
20
|
-
"update:modelValue": (value: string) => any;
|
|
21
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
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>;
|
|
24
19
|
export default _default;
|
|
25
20
|
//# sourceMappingURL=SchemaObjectProperties.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaObjectProperties.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaObjectProperties.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"names":[],"mappings":"AAiNA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAOrE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,uBAAuB,CAAC,EAAE,yBAAyB,CAAC,yBAAyB,CAAC,CAAA;IAC9E,4BAA4B,CAAC,EAAE,yBAAyB,CAAC,8BAA8B,CAAC,CAAA;CACzF,CAAC;;AAiQF,wBAMG"}
|
|
@@ -1,112 +1,99 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as W, computed as B, createElementBlock as l, openBlock as d, Fragment as s, createCommentVNode as h, createBlock as c, unref as n, renderList as N } from "vue";
|
|
2
|
+
import { getResolvedRef as o } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { isTypeObject as m } from "./helpers/is-type-object.js";
|
|
4
|
+
import u from "./SchemaProperty.vue.js";
|
|
5
|
+
const k = /* @__PURE__ */ W({
|
|
4
6
|
__name: "SchemaObjectProperties",
|
|
5
7
|
props: {
|
|
6
|
-
schema: {
|
|
8
|
+
schema: {},
|
|
9
|
+
discriminator: {},
|
|
7
10
|
compact: { type: Boolean },
|
|
8
11
|
hideHeading: { type: Boolean },
|
|
9
12
|
level: {},
|
|
10
13
|
hideModelNames: { type: Boolean },
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
discriminatorPropertyName: {},
|
|
14
|
+
hideReadOnly: { type: Boolean },
|
|
15
|
+
hideWriteOnly: { type: Boolean },
|
|
16
|
+
breadcrumb: {},
|
|
15
17
|
orderSchemaPropertiesBy: { default: "alpha" },
|
|
16
|
-
orderRequiredPropertiesFirst: { default: !0 }
|
|
17
|
-
hasDiscriminator: { type: Boolean },
|
|
18
|
-
breadcrumb: {}
|
|
18
|
+
orderRequiredPropertiesFirst: { default: !0 }
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (!i.schema.properties)
|
|
20
|
+
setup(r) {
|
|
21
|
+
const g = B(() => {
|
|
22
|
+
if (!m(r.schema) || !r.schema.properties)
|
|
24
23
|
return [];
|
|
25
|
-
const e = Object.keys(
|
|
26
|
-
return e.sort((
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
const e = Object.keys(r.schema.properties), a = new Set(r.schema.required || []);
|
|
25
|
+
return e.sort((i, t) => {
|
|
26
|
+
var f, v;
|
|
27
|
+
const y = i === ((f = r.discriminator) == null ? void 0 : f.propertyName), p = t === ((v = r.discriminator) == null ? void 0 : v.propertyName), b = a.has(i), O = a.has(t);
|
|
28
|
+
if (y && !p)
|
|
29
|
+
return -1;
|
|
30
|
+
if (!y && p)
|
|
31
|
+
return 1;
|
|
32
|
+
if (r.orderRequiredPropertiesFirst) {
|
|
33
|
+
if (b && !O)
|
|
30
34
|
return -1;
|
|
31
|
-
if (!
|
|
35
|
+
if (!b && O)
|
|
32
36
|
return 1;
|
|
33
37
|
}
|
|
34
|
-
return
|
|
35
|
-
});
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
return r.orderSchemaPropertiesBy === "alpha" ? i.localeCompare(t) : 0;
|
|
39
|
+
}).filter((i) => r.hideReadOnly ? !(r.schema.properties && o(r.schema.properties[i]).readOnly === !0) : r.hideWriteOnly ? !(r.schema.properties && o(r.schema.properties[i]).writeOnly === !0) : !0);
|
|
40
|
+
}), R = (e) => {
|
|
41
|
+
const a = o(e);
|
|
42
|
+
return typeof a == "object" && typeof a["x-additionalPropertiesName"] == "string" && a["x-additionalPropertiesName"].trim().length > 0 ? `${a["x-additionalPropertiesName"].trim()}*` : "propertyName*";
|
|
43
|
+
}, P = (e) => e === !0 || typeof e == "object" && Object.keys(e).length === 0 || typeof e != "object" || !("type" in e) ? {
|
|
44
|
+
// @ts-expect-error - ask hans
|
|
39
45
|
type: "anything",
|
|
40
46
|
...typeof e == "object" ? e : {}
|
|
41
47
|
} : e;
|
|
42
|
-
return (e,
|
|
43
|
-
e.schema.properties ? (
|
|
44
|
-
var
|
|
45
|
-
return
|
|
46
|
-
key:
|
|
48
|
+
return (e, a) => (d(), l(s, null, [
|
|
49
|
+
n(m)(e.schema) && e.schema.properties ? (d(!0), l(s, { key: 0 }, N(g.value, (i) => {
|
|
50
|
+
var t;
|
|
51
|
+
return d(), c(u, {
|
|
52
|
+
key: i,
|
|
47
53
|
breadcrumb: e.breadcrumb,
|
|
48
54
|
compact: e.compact,
|
|
49
|
-
|
|
50
|
-
discriminatorPropertyName: ((o = e.schema.discriminator) == null ? void 0 : o.propertyName) || e.discriminatorPropertyName,
|
|
55
|
+
discriminator: e.discriminator,
|
|
51
56
|
hideHeading: e.hideHeading,
|
|
52
57
|
hideModelNames: e.hideModelNames,
|
|
53
|
-
|
|
58
|
+
hideReadOnly: e.hideReadOnly,
|
|
59
|
+
hideWriteOnly: e.hideWriteOnly,
|
|
54
60
|
level: e.level,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
parent: e.schema,
|
|
63
|
-
isDiscriminator: r === e.discriminatorPropertyName || ((y = e.schema.discriminator) == null ? void 0 : y.propertyName) === r
|
|
64
|
-
},
|
|
65
|
-
"onUpdate:modelValue": n
|
|
66
|
-
}, null, 8, ["breadcrumb", "compact", "discriminatorMapping", "discriminatorPropertyName", "hideHeading", "hideModelNames", "isDiscriminator", "level", "modelValue", "name", "required", "resolvedSchema", "schemas", "value"]);
|
|
67
|
-
}), 128)) : c("", !0),
|
|
68
|
-
e.schema.patternProperties ? (a(!0), d(l, { key: 1 }, g(Object.keys(e.schema.patternProperties), (r) => (a(), p(h, {
|
|
69
|
-
key: r,
|
|
61
|
+
name: i,
|
|
62
|
+
required: (t = e.schema.required) == null ? void 0 : t.includes(i),
|
|
63
|
+
value: n(o)(e.schema.properties[i])
|
|
64
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "required", "value"]);
|
|
65
|
+
}), 128)) : h("", !0),
|
|
66
|
+
n(m)(e.schema) && e.schema.patternProperties ? (d(!0), l(s, { key: 1 }, N(Object.entries(e.schema.patternProperties), ([i, t]) => (d(), c(u, {
|
|
67
|
+
key: i,
|
|
70
68
|
breadcrumb: e.breadcrumb,
|
|
71
69
|
compact: e.compact,
|
|
72
|
-
|
|
73
|
-
discriminatorPropertyName: e.discriminatorPropertyName,
|
|
70
|
+
discriminator: e.discriminator,
|
|
74
71
|
hideHeading: e.hideHeading,
|
|
75
72
|
hideModelNames: e.hideModelNames,
|
|
76
|
-
|
|
73
|
+
hideReadOnly: e.hideReadOnly,
|
|
74
|
+
hideWriteOnly: e.hideWriteOnly,
|
|
77
75
|
level: e.level,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
value: {
|
|
83
|
-
...e.schema.patternProperties[r]
|
|
84
|
-
},
|
|
85
|
-
variant: "patternProperties",
|
|
86
|
-
"onUpdate:modelValue": n
|
|
87
|
-
}, null, 8, ["breadcrumb", "compact", "discriminatorMapping", "discriminatorPropertyName", "hideHeading", "hideModelNames", "level", "modelValue", "name", "resolvedSchema", "schemas", "value"]))), 128)) : c("", !0),
|
|
88
|
-
e.schema.additionalProperties ? (a(), p(h, {
|
|
76
|
+
name: i,
|
|
77
|
+
value: n(o)(t)
|
|
78
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"]))), 128)) : h("", !0),
|
|
79
|
+
n(m)(e.schema) && e.schema.additionalProperties ? (d(), c(u, {
|
|
89
80
|
key: 2,
|
|
90
81
|
breadcrumb: e.breadcrumb,
|
|
91
82
|
compact: e.compact,
|
|
92
|
-
|
|
93
|
-
discriminatorPropertyName: e.discriminatorPropertyName,
|
|
83
|
+
discriminator: e.discriminator,
|
|
94
84
|
hideHeading: e.hideHeading,
|
|
95
85
|
hideModelNames: e.hideModelNames,
|
|
96
|
-
|
|
86
|
+
hideReadOnly: e.hideReadOnly,
|
|
87
|
+
hideWriteOnly: e.hideWriteOnly,
|
|
97
88
|
level: e.level,
|
|
98
|
-
|
|
99
|
-
name: M(e.schema.additionalProperties),
|
|
89
|
+
name: R(e.schema.additionalProperties),
|
|
100
90
|
noncollapsible: "",
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
variant: "additionalProperties",
|
|
105
|
-
"onUpdate:modelValue": n
|
|
106
|
-
}, null, 8, ["breadcrumb", "compact", "discriminatorMapping", "discriminatorPropertyName", "hideHeading", "hideModelNames", "level", "modelValue", "name", "resolvedSchema", "schemas", "value"])) : c("", !0)
|
|
91
|
+
value: P(e.schema.additionalProperties),
|
|
92
|
+
variant: "additionalProperties"
|
|
93
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"])) : h("", !0)
|
|
107
94
|
], 64));
|
|
108
95
|
}
|
|
109
96
|
});
|
|
110
97
|
export {
|
|
111
|
-
|
|
98
|
+
k as default
|
|
112
99
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
1
2
|
import { type Component } from 'vue';
|
|
2
|
-
import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
3
3
|
/**
|
|
4
4
|
* Note: We're taking in a prop called `value` which should be a JSON Schema.
|
|
5
5
|
*
|
|
@@ -8,33 +8,28 @@ import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
|
8
8
|
*/
|
|
9
9
|
type __VLS_Props = {
|
|
10
10
|
is?: string | Component;
|
|
11
|
-
value
|
|
11
|
+
value: SchemaObject | undefined;
|
|
12
12
|
noncollapsible?: boolean;
|
|
13
13
|
level?: number;
|
|
14
14
|
name?: string;
|
|
15
15
|
required?: boolean;
|
|
16
16
|
compact?: boolean;
|
|
17
|
+
discriminator?: DiscriminatorObject;
|
|
17
18
|
description?: string;
|
|
18
|
-
withExamples?: boolean;
|
|
19
19
|
hideModelNames?: boolean;
|
|
20
|
-
schemas?: Schemas;
|
|
21
20
|
hideHeading?: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
/** Hide read-only properties */
|
|
22
|
+
hideReadOnly?: boolean;
|
|
23
|
+
/** Hide write-only properties */
|
|
24
|
+
hideWriteOnly?: boolean;
|
|
25
25
|
variant?: 'additionalProperties' | 'patternProperties';
|
|
26
26
|
breadcrumb?: string[];
|
|
27
27
|
};
|
|
28
|
-
declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
|
-
"update:modelValue": (value: string) => any;
|
|
30
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
32
|
-
}>, {
|
|
28
|
+
declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
33
29
|
required: boolean;
|
|
34
30
|
level: number;
|
|
35
31
|
compact: boolean;
|
|
36
32
|
hideModelNames: boolean;
|
|
37
|
-
withExamples: boolean;
|
|
38
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
34
|
export default _default_1;
|
|
40
35
|
//# sourceMappingURL=SchemaProperty.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAijBA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAa9C;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;oBAGA,OAAO;;AA+jB5B,0BAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaProperty.vue2.js";
|
|
2
2
|
import "./SchemaProperty.vue3.js";
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7569fa08"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|