@scalar/api-reference 1.36.0 → 1.36.1
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 +16 -0
- package/dist/browser/standalone.js +14762 -14744
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -0
- 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 +52 -41
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +9 -8
- 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 +46 -42
- package/dist/components/Content/Schema/Schema.vue.d.ts +3 -4
- 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 +72 -75
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +29 -40
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -5
- 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 +72 -76
- package/dist/components/Content/Schema/types.d.ts +17 -0
- package/dist/components/Content/Schema/types.d.ts.map +1 -0
- package/dist/features/Operation/components/Header.vue.d.ts +2 -0
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js +15 -10
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue2.js +23 -21
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +74 -61
- package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/helpers/convert-security-scheme.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
- package/package.json +10 -10
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
1
2
|
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
3
|
type __VLS_Props = {
|
|
4
|
+
config: ApiReferenceConfiguration;
|
|
3
5
|
schemas: {
|
|
4
6
|
id: string;
|
|
5
7
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ClassicLayout.vue"],"names":[],"mappings":"AA6FA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAYhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAyLF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClassicLayout.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-42f5a051"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as h, createBlock as a, createCommentVNode as g, openBlock as r, unref as e, withCtx as o, createElementBlock as s, Fragment as p, renderList as u, createVNode as n, createTextVNode as S } from "vue";
|
|
2
|
+
import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import P from "../../Section/SectionContainerAccordion.vue.js";
|
|
4
|
+
import k from "../../Section/SectionAccordion.vue.js";
|
|
5
|
+
import f from "../Schema/SchemaProperty.vue.js";
|
|
6
|
+
import q from "../../Anchor/Anchor.vue.js";
|
|
7
|
+
import v from "../../Section/SectionHeaderTag.vue.js";
|
|
8
|
+
import B from "../Schema/SchemaHeading.vue.js";
|
|
9
|
+
import R from "../../Section/SectionHeader.vue.js";
|
|
10
|
+
const C = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "properties"
|
|
13
|
-
},
|
|
13
|
+
}, F = { key: 1 }, M = /* @__PURE__ */ h({
|
|
14
14
|
__name: "ClassicLayout",
|
|
15
15
|
props: {
|
|
16
|
+
config: {},
|
|
16
17
|
schemas: {}
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
return (
|
|
19
|
+
setup(b) {
|
|
20
|
+
return (t, m) => t.schemas.length ? (r(), a(e(P), {
|
|
20
21
|
key: 0,
|
|
21
22
|
class: "reference-models"
|
|
22
23
|
}, {
|
|
23
|
-
title:
|
|
24
|
-
|
|
25
|
-
default:
|
|
24
|
+
title: o(() => [
|
|
25
|
+
n(e(R), { level: 2 }, {
|
|
26
|
+
default: o(() => m[0] || (m[0] = [
|
|
26
27
|
S("Models")
|
|
27
28
|
])),
|
|
28
29
|
_: 1,
|
|
29
30
|
__: [0]
|
|
30
31
|
})
|
|
31
32
|
]),
|
|
32
|
-
default:
|
|
33
|
-
(r(!0),
|
|
34
|
-
id:
|
|
35
|
-
key:
|
|
36
|
-
label:
|
|
33
|
+
default: o(() => [
|
|
34
|
+
(r(!0), s(p, null, u(t.schemas, ({ id: c, name: l, schema: i }) => (r(), a(e(k), {
|
|
35
|
+
id: c,
|
|
36
|
+
key: l,
|
|
37
|
+
label: l
|
|
37
38
|
}, {
|
|
38
|
-
title:
|
|
39
|
-
|
|
40
|
-
id:
|
|
39
|
+
title: o(() => [
|
|
40
|
+
n(e(q), {
|
|
41
|
+
id: c,
|
|
41
42
|
class: "reference-models-anchor"
|
|
42
43
|
}, {
|
|
43
|
-
default:
|
|
44
|
-
|
|
45
|
-
default:
|
|
46
|
-
|
|
44
|
+
default: o(() => [
|
|
45
|
+
n(e(v), { level: 3 }, {
|
|
46
|
+
default: o(() => [
|
|
47
|
+
n(e(B), {
|
|
47
48
|
class: "reference-models-label",
|
|
48
|
-
name:
|
|
49
|
-
value:
|
|
49
|
+
name: i.title ?? l,
|
|
50
|
+
value: i
|
|
50
51
|
}, null, 8, ["name", "value"])
|
|
51
52
|
]),
|
|
52
53
|
_: 2
|
|
@@ -55,23 +56,33 @@ const H = {
|
|
|
55
56
|
_: 2
|
|
56
57
|
}, 1032, ["id"])
|
|
57
58
|
]),
|
|
58
|
-
default:
|
|
59
|
-
"properties" in
|
|
60
|
-
(r(!0),
|
|
61
|
-
key:
|
|
62
|
-
name:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
default: o(() => [
|
|
60
|
+
"properties" in i ? (r(), s("div", C, [
|
|
61
|
+
(r(!0), s(p, null, u(Object.entries(i.properties ?? {}), ([d, _]) => (r(), a(e(f), {
|
|
62
|
+
key: d,
|
|
63
|
+
name: d,
|
|
64
|
+
options: {
|
|
65
|
+
orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
|
|
66
|
+
orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
|
|
67
|
+
},
|
|
68
|
+
required: i.required?.includes(d),
|
|
69
|
+
schema: e(y)(_)
|
|
70
|
+
}, null, 8, ["name", "options", "required", "schema"]))), 128))
|
|
71
|
+
])) : (r(), s("div", F, [
|
|
72
|
+
n(e(f), {
|
|
73
|
+
options: {
|
|
74
|
+
orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
|
|
75
|
+
orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
|
|
76
|
+
},
|
|
77
|
+
schema: i
|
|
78
|
+
}, null, 8, ["options", "schema"])
|
|
68
79
|
]))
|
|
69
80
|
]),
|
|
70
81
|
_: 2
|
|
71
82
|
}, 1032, ["id", "label"]))), 128))
|
|
72
83
|
]),
|
|
73
84
|
_: 1
|
|
74
|
-
})) :
|
|
85
|
+
})) : g("", !0);
|
|
75
86
|
}
|
|
76
87
|
});
|
|
77
88
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAA;IACpC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AAkGF,wBAMG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f, computed as r, createBlock as
|
|
1
|
+
import { defineComponent as f, computed as r, createBlock as s, createCommentVNode as u, openBlock as t, unref as a, withCtx as d } from "vue";
|
|
2
2
|
import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { useNavState as p } from "../../../hooks/useNavState.js";
|
|
4
4
|
import y from "./ClassicLayout.vue.js";
|
|
@@ -14,21 +14,22 @@ const z = /* @__PURE__ */ f({
|
|
|
14
14
|
setup(c) {
|
|
15
15
|
const { hash: m } = p(), { items: i } = k(), l = r(() => i.value.entries.find(
|
|
16
16
|
(e) => e.type === "text" && e.id === "models"
|
|
17
|
-
)), n = r(() => (l.value?.children ?? []).filter((
|
|
18
|
-
id:
|
|
19
|
-
name:
|
|
20
|
-
schema: h(c.schemas[
|
|
17
|
+
)), n = r(() => (l.value?.children ?? []).filter((o) => o.type === "model").map((o) => ({
|
|
18
|
+
id: o.id,
|
|
19
|
+
name: o.name,
|
|
20
|
+
schema: h(c.schemas[o.name])
|
|
21
21
|
})));
|
|
22
|
-
return (e,
|
|
22
|
+
return (e, o) => e.schemas && Object.keys(e.schemas).length > 0 ? (t(), s(a(v), {
|
|
23
23
|
key: 0,
|
|
24
24
|
id: "models",
|
|
25
25
|
isLazy: !!a(m) && !a(m).startsWith("model")
|
|
26
26
|
}, {
|
|
27
27
|
default: d(() => [
|
|
28
|
-
e.config?.layout === "classic" ? (t(),
|
|
28
|
+
e.config?.layout === "classic" ? (t(), s(y, {
|
|
29
29
|
key: 0,
|
|
30
|
+
config: e.config,
|
|
30
31
|
schemas: n.value
|
|
31
|
-
}, null, 8, ["schemas"])) : (t(),
|
|
32
|
+
}, null, 8, ["config", "schemas"])) : (t(), s(g, {
|
|
32
33
|
key: 1,
|
|
33
34
|
config: e.config,
|
|
34
35
|
schemas: n.value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ModernLayout.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AA6NF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModernLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c4d2ae99"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as b, useId as y, computed as u, createBlock as s, createCommentVNode as f, openBlock as a, unref as e, withCtx as o, createVNode as l, createElementVNode as M, createTextVNode as B, normalizeClass as N, createElementBlock as k, Fragment as C, renderList as I } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as _ } from "@scalar/components";
|
|
3
|
+
import A from "../../ShowMoreButton.vue.js";
|
|
4
4
|
import { useSidebar as H } from "../../../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
|
|
5
5
|
import L from "../../Section/SectionContainer.vue.js";
|
|
6
6
|
import w from "../../Section/Section.vue.js";
|
|
7
|
-
import
|
|
7
|
+
import E from "../../Section/SectionHeader.vue.js";
|
|
8
8
|
import p from "../../Section/SectionHeaderTag.vue.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import O from "../../Section/CompactSection.vue.js";
|
|
10
|
+
import P from "../Schema/Schema.vue.js";
|
|
11
11
|
import V from "../Schema/SchemaHeading.vue.js";
|
|
12
|
-
const S = 10,
|
|
12
|
+
const S = 10, G = /* @__PURE__ */ b({
|
|
13
13
|
__name: "ModernLayout",
|
|
14
14
|
props: {
|
|
15
15
|
config: {},
|
|
16
16
|
schemas: { default: () => [] }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
() =>
|
|
21
|
-
),
|
|
22
|
-
return (
|
|
18
|
+
setup(r) {
|
|
19
|
+
const m = y(), { collapsedSidebarItems: h } = H(), d = u(
|
|
20
|
+
() => r.config.expandAllModelSections || r.schemas.length <= S || h.models
|
|
21
|
+
), g = u(() => d.value ? r.schemas : r.schemas.slice(0, S));
|
|
22
|
+
return (t, c) => t.schemas ? (a(), s(e(L), {
|
|
23
23
|
key: 0,
|
|
24
24
|
id: "models"
|
|
25
25
|
}, {
|
|
26
|
-
default:
|
|
27
|
-
|
|
28
|
-
default:
|
|
29
|
-
|
|
30
|
-
default:
|
|
31
|
-
|
|
32
|
-
id: e(
|
|
26
|
+
default: o(() => [
|
|
27
|
+
l(e(w), { "aria-labelledby": e(m) }, {
|
|
28
|
+
default: o(() => [
|
|
29
|
+
l(e(E), null, {
|
|
30
|
+
default: o(() => [
|
|
31
|
+
l(e(p), {
|
|
32
|
+
id: e(m),
|
|
33
33
|
level: 2
|
|
34
34
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
|
|
35
|
+
default: o(() => c[0] || (c[0] = [
|
|
36
|
+
B(" Models ")
|
|
37
37
|
])),
|
|
38
38
|
_: 1,
|
|
39
39
|
__: [0]
|
|
@@ -41,37 +41,41 @@ const S = 10, K = /* @__PURE__ */ g({
|
|
|
41
41
|
]),
|
|
42
42
|
_: 1
|
|
43
43
|
}),
|
|
44
|
-
|
|
45
|
-
class: N(["models-list", { "models-list-truncated": !
|
|
44
|
+
M("div", {
|
|
45
|
+
class: N(["models-list", { "models-list-truncated": !d.value }])
|
|
46
46
|
}, [
|
|
47
|
-
(a(!0), k(C, null, I(
|
|
48
|
-
id:
|
|
49
|
-
key:
|
|
47
|
+
(a(!0), k(C, null, I(g.value, ({ id: v, name: i, schema: n }) => (a(), s(e(O), {
|
|
48
|
+
id: v,
|
|
49
|
+
key: i,
|
|
50
50
|
class: "models-list-item",
|
|
51
|
-
defaultOpen:
|
|
52
|
-
label:
|
|
51
|
+
defaultOpen: t.config.expandAllModelSections,
|
|
52
|
+
label: i
|
|
53
53
|
}, {
|
|
54
|
-
heading:
|
|
55
|
-
|
|
56
|
-
default:
|
|
57
|
-
|
|
58
|
-
name: n.title ??
|
|
54
|
+
heading: o(() => [
|
|
55
|
+
l(e(p), { level: 3 }, {
|
|
56
|
+
default: o(() => [
|
|
57
|
+
l(e(V), {
|
|
58
|
+
name: n.title ?? i,
|
|
59
59
|
value: n
|
|
60
60
|
}, null, 8, ["name", "value"])
|
|
61
61
|
]),
|
|
62
62
|
_: 2
|
|
63
63
|
}, 1024)
|
|
64
64
|
]),
|
|
65
|
-
default:
|
|
66
|
-
|
|
67
|
-
default:
|
|
68
|
-
|
|
69
|
-
hideHeading:
|
|
70
|
-
hideModelNames:
|
|
65
|
+
default: o(() => [
|
|
66
|
+
l(e(_), null, {
|
|
67
|
+
default: o(() => [
|
|
68
|
+
l(e(P), {
|
|
69
|
+
hideHeading: "",
|
|
70
|
+
hideModelNames: "",
|
|
71
71
|
level: 1,
|
|
72
72
|
noncollapsible: "",
|
|
73
|
+
options: {
|
|
74
|
+
orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
|
|
75
|
+
orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
|
|
76
|
+
},
|
|
73
77
|
schema: n
|
|
74
|
-
}, null, 8, ["schema"])
|
|
78
|
+
}, null, 8, ["options", "schema"])
|
|
75
79
|
]),
|
|
76
80
|
_: 2
|
|
77
81
|
}, 1024)
|
|
@@ -79,7 +83,7 @@ const S = 10, K = /* @__PURE__ */ g({
|
|
|
79
83
|
_: 2
|
|
80
84
|
}, 1032, ["id", "defaultOpen", "label"]))), 128))
|
|
81
85
|
], 2),
|
|
82
|
-
|
|
86
|
+
d.value ? f("", !0) : (a(), s(A, {
|
|
83
87
|
key: 0,
|
|
84
88
|
id: "models",
|
|
85
89
|
class: "show-more-models"
|
|
@@ -93,5 +97,5 @@ const S = 10, K = /* @__PURE__ */ g({
|
|
|
93
97
|
}
|
|
94
98
|
});
|
|
95
99
|
export {
|
|
96
|
-
|
|
100
|
+
G as default
|
|
97
101
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
import type { SchemaOptions } from '../../../components/Content/Schema/types';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
schema?: SchemaObject;
|
|
4
5
|
/** Track how deep we've gone */
|
|
@@ -10,10 +11,6 @@ type __VLS_Props = {
|
|
|
10
11
|
noncollapsible?: boolean;
|
|
11
12
|
/** Hide the heading */
|
|
12
13
|
hideHeading?: boolean;
|
|
13
|
-
/** Hide read-only properties */
|
|
14
|
-
hideReadOnly?: boolean;
|
|
15
|
-
/** Hide write-only properties */
|
|
16
|
-
hideWriteOnly?: boolean;
|
|
17
14
|
/** Show a special one way toggle for additional properties, also has a top border when open */
|
|
18
15
|
additionalProperties?: boolean;
|
|
19
16
|
/** Hide model names in type display */
|
|
@@ -22,6 +19,8 @@ type __VLS_Props = {
|
|
|
22
19
|
discriminator?: DiscriminatorObject;
|
|
23
20
|
/** Breadcrumb for the schema */
|
|
24
21
|
breadcrumb?: string[];
|
|
22
|
+
/** Move the options into a single prop so they are easy to pass around */
|
|
23
|
+
options: SchemaOptions;
|
|
25
24
|
};
|
|
26
25
|
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>;
|
|
27
26
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAQtE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;AAyaF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Schema.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-09c7c1bd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as P, DisclosureButton as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import { isTypeObject as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as H, computed as k, createBlock as o, createCommentVNode as t, openBlock as i, unref as l, withCtx as r, createElementVNode as g, normalizeClass as m, createElementBlock as c, createVNode as n, withDirectives as S, createTextVNode as d, toDisplayString as u, vShow as C, normalizeStyle as O, Fragment as h } from "vue";
|
|
2
|
+
import { Disclosure as P, DisclosureButton as N, DisclosurePanel as M } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as w, ScalarIcon as p } from "@scalar/components";
|
|
4
|
+
import B from "../../ScreenReader.vue.js";
|
|
5
|
+
import { isTypeObject as D } from "./helpers/is-type-object.js";
|
|
6
|
+
import z from "./SchemaHeading.vue.js";
|
|
7
|
+
import A from "./SchemaObjectProperties.vue.js";
|
|
8
|
+
import V from "./SchemaProperty.vue.js";
|
|
9
|
+
const j = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "schema-card-description"
|
|
12
|
-
},
|
|
12
|
+
}, T = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "schema-properties"
|
|
15
|
-
},
|
|
15
|
+
}, K = /* @__PURE__ */ H({
|
|
16
16
|
__name: "Schema",
|
|
17
17
|
props: {
|
|
18
18
|
schema: {},
|
|
@@ -21,94 +21,93 @@ const A = {
|
|
|
21
21
|
compact: { type: Boolean },
|
|
22
22
|
noncollapsible: { type: Boolean, default: !1 },
|
|
23
23
|
hideHeading: { type: Boolean },
|
|
24
|
-
hideReadOnly: { type: Boolean },
|
|
25
|
-
hideWriteOnly: { type: Boolean },
|
|
26
24
|
additionalProperties: { type: Boolean },
|
|
27
25
|
hideModelNames: { type: Boolean, default: !1 },
|
|
28
26
|
discriminator: {},
|
|
29
|
-
breadcrumb: {}
|
|
27
|
+
breadcrumb: {},
|
|
28
|
+
options: {}
|
|
30
29
|
},
|
|
31
30
|
setup(a) {
|
|
32
|
-
const
|
|
33
|
-
return (e,
|
|
31
|
+
const f = k(() => !a.noncollapsible && a.level > 0), y = k(() => a.schema?.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !a.schema?.description || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description), b = (e) => a.noncollapsible && e.stopPropagation();
|
|
32
|
+
return (e, v) => typeof e.schema == "object" && Object.keys(e.schema).length ? (i(), o(l(P), {
|
|
34
33
|
key: 0,
|
|
35
34
|
defaultOpen: e.noncollapsible
|
|
36
35
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
|
|
39
|
-
class:
|
|
36
|
+
default: r(({ open: s }) => [
|
|
37
|
+
g("div", {
|
|
38
|
+
class: m(["schema-card", [
|
|
40
39
|
`schema-card--level-${e.level}`,
|
|
41
|
-
{ "schema-card--compact": e.compact, "schema-card--open":
|
|
42
|
-
{ "border-t": e.additionalProperties &&
|
|
40
|
+
{ "schema-card--compact": e.compact, "schema-card--open": s },
|
|
41
|
+
{ "border-t": e.additionalProperties && s }
|
|
43
42
|
]])
|
|
44
43
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
])) :
|
|
48
|
-
|
|
49
|
-
class:
|
|
50
|
-
"schema-properties-open":
|
|
44
|
+
y.value ? (i(), c("div", j, [
|
|
45
|
+
n(l(w), { value: y.value }, null, 8, ["value"])
|
|
46
|
+
])) : t("", !0),
|
|
47
|
+
g("div", {
|
|
48
|
+
class: m(["schema-properties", {
|
|
49
|
+
"schema-properties-open": s
|
|
51
50
|
}])
|
|
52
51
|
}, [
|
|
53
|
-
e.additionalProperties ?
|
|
54
|
-
|
|
52
|
+
e.additionalProperties ? S((i(), c("div", T, [
|
|
53
|
+
n(l(N), {
|
|
55
54
|
as: "button",
|
|
56
55
|
class: "schema-card-title schema-card-title--compact",
|
|
57
|
-
onClickCapture:
|
|
56
|
+
onClickCapture: b
|
|
58
57
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
58
|
+
default: r(() => [
|
|
59
|
+
n(l(p), {
|
|
61
60
|
class: "schema-card-title-icon",
|
|
62
61
|
icon: "Add",
|
|
63
62
|
size: "sm"
|
|
64
63
|
}),
|
|
65
|
-
|
|
66
|
-
e.name ? (
|
|
67
|
-
default:
|
|
68
|
-
|
|
64
|
+
v[0] || (v[0] = d(" Show additional properties ")),
|
|
65
|
+
e.name ? (i(), o(B, { key: 0 }, {
|
|
66
|
+
default: r(() => [
|
|
67
|
+
d("for " + u(e.name), 1)
|
|
69
68
|
]),
|
|
70
69
|
_: 1
|
|
71
|
-
})) :
|
|
70
|
+
})) : t("", !0)
|
|
72
71
|
]),
|
|
73
72
|
_: 1,
|
|
74
73
|
__: [0]
|
|
75
74
|
})
|
|
76
75
|
], 512)), [
|
|
77
|
-
[
|
|
78
|
-
]) :
|
|
76
|
+
[C, !s]
|
|
77
|
+
]) : f.value ? S((i(), o(l(N), {
|
|
79
78
|
key: 1,
|
|
80
79
|
as: e.noncollapsible ? "div" : "button",
|
|
81
|
-
class:
|
|
82
|
-
style:
|
|
80
|
+
class: m(["schema-card-title", { "schema-card-title--compact": e.compact }]),
|
|
81
|
+
style: O({
|
|
83
82
|
top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
|
|
84
83
|
}),
|
|
85
|
-
onClickCapture:
|
|
84
|
+
onClickCapture: b
|
|
86
85
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
e.compact ? (
|
|
89
|
-
|
|
90
|
-
class:
|
|
86
|
+
default: r(() => [
|
|
87
|
+
e.compact ? (i(), c(h, { key: 0 }, [
|
|
88
|
+
n(l(p), {
|
|
89
|
+
class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
|
|
91
90
|
icon: "Add",
|
|
92
91
|
size: "sm"
|
|
93
92
|
}, null, 8, ["class"]),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
], 64)) : (
|
|
97
|
-
|
|
93
|
+
s ? (i(), c(h, { key: 0 }, [
|
|
94
|
+
d(" Hide " + u(e.schema?.title ?? "Child Attributes"), 1)
|
|
95
|
+
], 64)) : (i(), c(h, { key: 1 }, [
|
|
96
|
+
d(" Show " + u(e.schema?.title ?? "Child Attributes"), 1)
|
|
98
97
|
], 64)),
|
|
99
|
-
e.name ? (
|
|
100
|
-
default:
|
|
101
|
-
|
|
98
|
+
e.name ? (i(), o(B, { key: 2 }, {
|
|
99
|
+
default: r(() => [
|
|
100
|
+
d("for " + u(e.name), 1)
|
|
102
101
|
]),
|
|
103
102
|
_: 1
|
|
104
|
-
})) :
|
|
105
|
-
], 64)) : (
|
|
106
|
-
|
|
107
|
-
class:
|
|
103
|
+
})) : t("", !0)
|
|
104
|
+
], 64)) : (i(), c(h, { key: 1 }, [
|
|
105
|
+
n(l(p), {
|
|
106
|
+
class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
|
|
108
107
|
icon: "Add",
|
|
109
108
|
size: "sm"
|
|
110
109
|
}, null, 8, ["class"]),
|
|
111
|
-
|
|
110
|
+
n(z, {
|
|
112
111
|
name: e.schema?.title ?? e.name,
|
|
113
112
|
value: e.schema
|
|
114
113
|
}, null, 8, ["name", "value"])
|
|
@@ -116,48 +115,46 @@ const A = {
|
|
|
116
115
|
]),
|
|
117
116
|
_: 2
|
|
118
117
|
}, 1032, ["as", "class", "style"])), [
|
|
119
|
-
[
|
|
120
|
-
]) :
|
|
121
|
-
!e.additionalProperties ||
|
|
118
|
+
[C, !e.hideHeading && !(e.noncollapsible && e.compact)]
|
|
119
|
+
]) : t("", !0),
|
|
120
|
+
!e.additionalProperties || s ? (i(), o(l(M), {
|
|
122
121
|
key: 2,
|
|
123
122
|
as: "ul",
|
|
124
|
-
static: !
|
|
123
|
+
static: !f.value
|
|
125
124
|
}, {
|
|
126
|
-
default:
|
|
127
|
-
|
|
125
|
+
default: r(() => [
|
|
126
|
+
l(D)(e.schema) ? (i(), o(A, {
|
|
128
127
|
key: 0,
|
|
129
128
|
breadcrumb: e.breadcrumb,
|
|
130
129
|
compact: e.compact,
|
|
131
130
|
discriminator: e.discriminator,
|
|
132
131
|
hideHeading: e.hideHeading,
|
|
133
132
|
hideModelNames: e.hideModelNames,
|
|
134
|
-
hideReadOnly: e.hideReadOnly,
|
|
135
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
136
133
|
level: e.level + 1,
|
|
134
|
+
options: e.options,
|
|
137
135
|
schema: e.schema
|
|
138
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "
|
|
139
|
-
e.schema ? (
|
|
136
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "level", "options", "schema"])) : (i(), c(h, { key: 1 }, [
|
|
137
|
+
e.schema ? (i(), o(V, {
|
|
140
138
|
key: 0,
|
|
141
139
|
breadcrumb: e.breadcrumb,
|
|
142
140
|
compact: e.compact,
|
|
143
141
|
hideHeading: e.hideHeading,
|
|
144
142
|
hideModelNames: e.hideModelNames,
|
|
145
|
-
hideReadOnly: e.hideReadOnly,
|
|
146
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
147
143
|
level: e.level,
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
options: e.options,
|
|
145
|
+
schema: e.schema
|
|
146
|
+
}, null, 8, ["breadcrumb", "compact", "hideHeading", "hideModelNames", "level", "options", "schema"])) : t("", !0)
|
|
150
147
|
], 64))
|
|
151
148
|
]),
|
|
152
149
|
_: 1
|
|
153
|
-
}, 8, ["static"])) :
|
|
150
|
+
}, 8, ["static"])) : t("", !0)
|
|
154
151
|
], 2)
|
|
155
152
|
], 2)
|
|
156
153
|
]),
|
|
157
154
|
_: 1
|
|
158
|
-
}, 8, ["defaultOpen"])) :
|
|
155
|
+
}, 8, ["defaultOpen"])) : t("", !0);
|
|
159
156
|
}
|
|
160
157
|
});
|
|
161
158
|
export {
|
|
162
|
-
|
|
159
|
+
K as default
|
|
163
160
|
};
|