@scalar/api-reference 1.35.4 → 1.35.5
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as W, computed as B, createElementBlock as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import { isTypeObject as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as W, computed as B, createElementBlock as s, openBlock as d, Fragment as h, createCommentVNode as c, createBlock as u, unref as o, renderList as N } from "vue";
|
|
2
|
+
import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { isTypeObject as l } from "./helpers/is-type-object.js";
|
|
4
|
+
import y from "./SchemaProperty.vue.js";
|
|
5
5
|
const k = /* @__PURE__ */ W({
|
|
6
6
|
__name: "SchemaObjectProperties",
|
|
7
7
|
props: {
|
|
@@ -19,15 +19,15 @@ const k = /* @__PURE__ */ W({
|
|
|
19
19
|
},
|
|
20
20
|
setup(r) {
|
|
21
21
|
const g = B(() => {
|
|
22
|
-
if (!
|
|
22
|
+
if (!l(r.schema) || !r.schema.properties)
|
|
23
23
|
return [];
|
|
24
|
-
const e = Object.keys(r.schema.properties),
|
|
25
|
-
return e.sort((i,
|
|
24
|
+
const e = Object.keys(r.schema.properties), t = new Set(r.schema.required || []);
|
|
25
|
+
return e.sort((i, a) => {
|
|
26
26
|
var f, v;
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
27
|
+
const n = i === ((f = r.discriminator) == null ? void 0 : f.propertyName), p = a === ((v = r.discriminator) == null ? void 0 : v.propertyName), b = t.has(i), O = t.has(a);
|
|
28
|
+
if (n && !p)
|
|
29
29
|
return -1;
|
|
30
|
-
if (!
|
|
30
|
+
if (!n && p)
|
|
31
31
|
return 1;
|
|
32
32
|
if (r.orderRequiredPropertiesFirst) {
|
|
33
33
|
if (b && !O)
|
|
@@ -35,20 +35,23 @@ const k = /* @__PURE__ */ W({
|
|
|
35
35
|
if (!b && O)
|
|
36
36
|
return 1;
|
|
37
37
|
}
|
|
38
|
-
return r.orderSchemaPropertiesBy === "alpha" ? i.localeCompare(
|
|
39
|
-
}).filter((i) =>
|
|
38
|
+
return r.orderSchemaPropertiesBy === "alpha" ? i.localeCompare(a) : 0;
|
|
39
|
+
}).filter((i) => {
|
|
40
|
+
var a, n;
|
|
41
|
+
return r.hideReadOnly ? !(r.schema.properties && ((a = m(r.schema.properties[i])) == null ? void 0 : a.readOnly) === !0) : r.hideWriteOnly ? !(r.schema.properties && ((n = m(r.schema.properties[i])) == null ? void 0 : n.writeOnly) === !0) : !0;
|
|
42
|
+
});
|
|
40
43
|
}), R = (e) => {
|
|
41
|
-
const
|
|
42
|
-
return typeof
|
|
44
|
+
const t = m(e);
|
|
45
|
+
return typeof t == "object" && typeof t["x-additionalPropertiesName"] == "string" && t["x-additionalPropertiesName"].trim().length > 0 ? `${t["x-additionalPropertiesName"].trim()}*` : "propertyName*";
|
|
43
46
|
}, P = (e) => e === !0 || typeof e == "object" && Object.keys(e).length === 0 || typeof e != "object" || !("type" in e) ? {
|
|
44
47
|
// @ts-expect-error - ask hans
|
|
45
48
|
type: "anything",
|
|
46
49
|
...typeof e == "object" ? e : {}
|
|
47
50
|
} : e;
|
|
48
|
-
return (e,
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
return d(),
|
|
51
|
+
return (e, t) => (d(), s(h, null, [
|
|
52
|
+
o(l)(e.schema) && e.schema.properties ? (d(!0), s(h, { key: 0 }, N(g.value, (i) => {
|
|
53
|
+
var a;
|
|
54
|
+
return d(), u(y, {
|
|
52
55
|
key: i,
|
|
53
56
|
breadcrumb: e.breadcrumb,
|
|
54
57
|
compact: e.compact,
|
|
@@ -59,11 +62,11 @@ const k = /* @__PURE__ */ W({
|
|
|
59
62
|
hideWriteOnly: e.hideWriteOnly,
|
|
60
63
|
level: e.level,
|
|
61
64
|
name: i,
|
|
62
|
-
required: (
|
|
63
|
-
value:
|
|
65
|
+
required: (a = e.schema.required) == null ? void 0 : a.includes(i),
|
|
66
|
+
value: o(m)(e.schema.properties[i])
|
|
64
67
|
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "required", "value"]);
|
|
65
|
-
}), 128)) :
|
|
66
|
-
|
|
68
|
+
}), 128)) : c("", !0),
|
|
69
|
+
o(l)(e.schema) && e.schema.patternProperties ? (d(!0), s(h, { key: 1 }, N(Object.entries(e.schema.patternProperties), ([i, a]) => (d(), u(y, {
|
|
67
70
|
key: i,
|
|
68
71
|
breadcrumb: e.breadcrumb,
|
|
69
72
|
compact: e.compact,
|
|
@@ -74,9 +77,9 @@ const k = /* @__PURE__ */ W({
|
|
|
74
77
|
hideWriteOnly: e.hideWriteOnly,
|
|
75
78
|
level: e.level,
|
|
76
79
|
name: i,
|
|
77
|
-
value:
|
|
78
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"]))), 128)) :
|
|
79
|
-
|
|
80
|
+
value: o(m)(a)
|
|
81
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"]))), 128)) : c("", !0),
|
|
82
|
+
o(l)(e.schema) && e.schema.additionalProperties ? (d(), u(y, {
|
|
80
83
|
key: 2,
|
|
81
84
|
breadcrumb: e.breadcrumb,
|
|
82
85
|
compact: e.compact,
|
|
@@ -90,7 +93,7 @@ const k = /* @__PURE__ */ W({
|
|
|
90
93
|
noncollapsible: "",
|
|
91
94
|
value: P(e.schema.additionalProperties),
|
|
92
95
|
variant: "additionalProperties"
|
|
93
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"])) :
|
|
96
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"])) : c("", !0)
|
|
94
97
|
], 64));
|
|
95
98
|
}
|
|
96
99
|
});
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.35.
|
|
23
|
+
"version": "1.35.5",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"type-fest": "^4.41.0",
|
|
57
57
|
"vue": "^3.5.17",
|
|
58
58
|
"zod": "3.24.1",
|
|
59
|
-
"@scalar/api-client": "2.5.
|
|
59
|
+
"@scalar/api-client": "2.5.32",
|
|
60
60
|
"@scalar/code-highlight": "0.1.9",
|
|
61
|
-
"@scalar/components": "0.14.
|
|
62
|
-
"@scalar/icons": "0.4.7",
|
|
61
|
+
"@scalar/components": "0.14.33",
|
|
63
62
|
"@scalar/helpers": "0.0.10",
|
|
64
|
-
"@scalar/
|
|
63
|
+
"@scalar/icons": "0.4.7",
|
|
64
|
+
"@scalar/oas-utils": "0.4.28",
|
|
65
65
|
"@scalar/object-utils": "1.2.6",
|
|
66
|
-
"@scalar/json-magic": "0.4.
|
|
66
|
+
"@scalar/json-magic": "0.4.2",
|
|
67
|
+
"@scalar/openapi-parser": "0.20.5",
|
|
67
68
|
"@scalar/openapi-types": "0.3.7",
|
|
68
|
-
"@scalar/
|
|
69
|
+
"@scalar/themes": "0.13.16",
|
|
69
70
|
"@scalar/snippetz": "0.4.9",
|
|
70
71
|
"@scalar/types": "0.2.15",
|
|
71
|
-
"@scalar/themes": "0.13.16",
|
|
72
72
|
"@scalar/use-hooks": "0.2.4",
|
|
73
|
-
"@scalar/
|
|
74
|
-
"@scalar/
|
|
73
|
+
"@scalar/workspace-store": "0.15.5",
|
|
74
|
+
"@scalar/use-toasts": "0.8.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@hono/node-server": "^1.11.0",
|
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
93
93
|
"vitest": "^3.2.4",
|
|
94
94
|
"@scalar/build-tooling": "0.2.7",
|
|
95
|
+
"@scalar/core": "0.3.16",
|
|
95
96
|
"@scalar/galaxy": "0.5.8",
|
|
96
|
-
"@scalar/react-renderer": "0.2.1"
|
|
97
|
-
"@scalar/core": "0.3.16"
|
|
97
|
+
"@scalar/react-renderer": "0.2.1"
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|
|
100
100
|
"build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
|