@scalar/api-reference 1.31.8 → 1.31.9
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 +45 -0
- package/dist/browser/standalone.js +18613 -18470
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +10 -30
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +240 -222
- package/dist/components/Content/Content.vue.d.ts +2 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +84 -74
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +84 -86
- package/dist/components/Content/Models/Models.vue.js +1 -1
- package/dist/components/Content/Models/Models.vue2.js +4 -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 +53 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- 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 +117 -112
- 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 +161 -191
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +45 -47
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +40 -41
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
- package/dist/components/MobileHeader.vue.d.ts +1 -8
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +1 -1
- package/dist/components/MobileHeader.vue2.js +19 -19
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/Section.vue2.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
- package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
- package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
- package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
- package/dist/features/Operation/Operation.vue.d.ts +0 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +31 -34
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
- 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 +31 -38
- package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +12 -13
- package/dist/features/Operation/index.d.ts +0 -1
- package/dist/features/Operation/index.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
- 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 +85 -72
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
- 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 +114 -98
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +1 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +61 -64
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
- package/dist/features/sidebar/hooks/useSidebar.js +18 -0
- package/dist/features/sidebar/index.d.ts +2 -1
- package/dist/features/sidebar/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
- package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
- package/dist/features/traverse-schema/index.d.ts +3 -3
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +8 -5
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts +2 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +72 -88
- package/dist/hooks/useMultipleDocuments.d.ts +6 -6
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +14 -9
- package/dist/hooks/useOperation.d.ts +7 -7
- package/dist/hooks/useOperation.d.ts.map +1 -1
- package/dist/hooks/useOperation.js +13 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -25
- package/dist/legacy/fixtures/index.d.ts +1 -1
- package/dist/libs/openapi.d.ts +3 -4
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +8 -9
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
- package/package.json +16 -16
- package/dist/components/Content/Webhooks/index.d.ts +0 -2
- package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
- package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.js +0 -7
- package/dist/features/Operation/Webhooks.vue2.js +0 -121
- package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
- package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/Webhook.vue.js +0 -7
- package/dist/features/Operation/components/Webhook.vue2.js +0 -29
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
- package/dist/hooks/useSidebar.d.ts +0 -53
- package/dist/hooks/useSidebar.d.ts.map +0 -1
- package/dist/hooks/useSidebar.js +0 -248
- package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isDefined as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { getDiscriminatorSchemaName as
|
|
1
|
+
import { defineComponent as F, computed as B, createElementBlock as n, openBlock as u, createCommentVNode as r, createBlock as d, normalizeClass as j, renderSlot as E, Fragment as p, createTextVNode as l, withCtx as a, createVNode as k, toDisplayString as m, unref as y } from "vue";
|
|
2
|
+
import { isDefined as v } from "@scalar/helpers/array/is-defined";
|
|
3
|
+
import z from "./SchemaPropertyExamples.vue.js";
|
|
4
|
+
import S from "../../ScreenReader.vue.js";
|
|
5
|
+
import { getDiscriminatorSchemaName as H } from "../../../hooks/useDiscriminator.js";
|
|
6
|
+
import { getModelName as J } from "./helpers/schema-name.js";
|
|
6
7
|
import o from "./SchemaPropertyDetail.vue.js";
|
|
7
8
|
import L from "../../Badge/Badge.vue.js";
|
|
8
|
-
const
|
|
9
|
+
const R = { class: "property-heading" }, G = {
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "property-discriminator"
|
|
11
12
|
}, K = {
|
|
@@ -17,19 +18,19 @@ const W = { class: "property-heading" }, G = {
|
|
|
17
18
|
}, U = {
|
|
18
19
|
key: 5,
|
|
19
20
|
class: "property-deprecated"
|
|
20
|
-
},
|
|
21
|
+
}, W = {
|
|
21
22
|
key: 6,
|
|
22
23
|
class: "property-const"
|
|
23
|
-
},
|
|
24
|
+
}, X = {
|
|
24
25
|
key: 8,
|
|
25
26
|
class: "property-write-only"
|
|
26
|
-
},
|
|
27
|
+
}, Y = {
|
|
27
28
|
key: 9,
|
|
28
29
|
class: "property-read-only"
|
|
29
|
-
},
|
|
30
|
+
}, Z = {
|
|
30
31
|
key: 10,
|
|
31
32
|
class: "property-required"
|
|
32
|
-
}, ae = /* @__PURE__ */
|
|
33
|
+
}, ae = /* @__PURE__ */ F({
|
|
33
34
|
__name: "SchemaPropertyHeading",
|
|
34
35
|
props: {
|
|
35
36
|
value: {},
|
|
@@ -41,264 +42,233 @@ const W = { class: "property-heading" }, G = {
|
|
|
41
42
|
hideModelNames: { type: Boolean, default: !1 },
|
|
42
43
|
schemas: {}
|
|
43
44
|
},
|
|
44
|
-
setup(
|
|
45
|
-
const
|
|
46
|
-
var t, f;
|
|
47
|
-
if (
|
|
48
|
-
return null;
|
|
49
|
-
if (
|
|
50
|
-
return
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return y;
|
|
57
|
-
}
|
|
58
|
-
return null;
|
|
59
|
-
}, $ = B(() => {
|
|
60
|
-
var e, t, f, y, s, k;
|
|
61
|
-
if (p((e = l.value) == null ? void 0 : e.const))
|
|
62
|
-
return (t = l.value) == null ? void 0 : t.const;
|
|
63
|
-
if (((y = (f = l.value) == null ? void 0 : f.enum) == null ? void 0 : y.length) === 1)
|
|
64
|
-
return l.value.enum[0];
|
|
65
|
-
if ((s = l.value) != null && s.items) {
|
|
66
|
-
if (p(l.value.items.const))
|
|
67
|
-
return l.value.items.const;
|
|
68
|
-
if (((k = l.value.items.enum) == null ? void 0 : k.length) === 1)
|
|
69
|
-
return l.value.items.enum[0];
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
}), F = B(() => {
|
|
73
|
-
var e, t, f, y;
|
|
74
|
-
return Array.isArray((e = l.value) == null ? void 0 : e.type) ? l.value.type.join(" | ") : (t = l.value) != null && t.title ? l.value.title : (f = l.value) != null && f.name ? l.value.name : ((y = l.value) == null ? void 0 : y.type) ?? "";
|
|
75
|
-
}), b = (e, t) => e === "array" ? `${e} ${t}[]` : `${e} ${t}`, D = B(() => {
|
|
76
|
-
var t, f, y;
|
|
77
|
-
if (!((t = l.value) != null && t.type))
|
|
78
|
-
return null;
|
|
79
|
-
if (l.hideModelNames)
|
|
80
|
-
return l.value.type === "array" && ((f = l.value.items) != null && f.type) ? `array ${l.value.items.type}[]` : null;
|
|
81
|
-
const e = S(l.value);
|
|
82
|
-
if (e)
|
|
83
|
-
return l.value.type === "array" ? `array ${e}[]` : e;
|
|
84
|
-
if (l.value.type === "array" && ((y = l.value.items) != null && y.type)) {
|
|
85
|
-
const s = R(l.value.items, l.schemas);
|
|
86
|
-
if (s)
|
|
87
|
-
return b(l.value.type, s);
|
|
88
|
-
if (l.value.items.title || l.value.items.name)
|
|
89
|
-
return b(
|
|
90
|
-
l.value.type,
|
|
91
|
-
l.value.items.title || l.value.items.name
|
|
92
|
-
);
|
|
93
|
-
const k = S(l.value.items) || l.value.items.type || "object";
|
|
94
|
-
return b(l.value.type, k);
|
|
45
|
+
setup(i) {
|
|
46
|
+
const $ = (e) => (e == null ? void 0 : e.default) === null ? "null" : Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : typeof (e == null ? void 0 : e.default) == "string" ? JSON.stringify(e.default) : e == null ? void 0 : e.default, D = B(() => {
|
|
47
|
+
var e, t, s, f, g, N;
|
|
48
|
+
if (v((e = i.value) == null ? void 0 : e.const))
|
|
49
|
+
return (t = i.value) == null ? void 0 : t.const;
|
|
50
|
+
if (((f = (s = i.value) == null ? void 0 : s.enum) == null ? void 0 : f.length) === 1)
|
|
51
|
+
return i.value.enum[0];
|
|
52
|
+
if ((g = i.value) != null && g.items) {
|
|
53
|
+
if (v(i.value.items.const))
|
|
54
|
+
return i.value.items.const;
|
|
55
|
+
if (((N = i.value.items.enum) == null ? void 0 : N.length) === 1)
|
|
56
|
+
return i.value.items.enum[0];
|
|
95
57
|
}
|
|
96
58
|
return null;
|
|
97
|
-
})
|
|
59
|
+
}), T = B(() => {
|
|
60
|
+
var e, t, s, f;
|
|
61
|
+
return Array.isArray((e = i.value) == null ? void 0 : e.type) ? i.value.type.join(" | ") : (t = i.value) != null && t.title ? i.value.title : (s = i.value) != null && s.name ? i.value.name : ((f = i.value) == null ? void 0 : f.type) ?? "";
|
|
62
|
+
}), M = B(() => i.value ? J(
|
|
63
|
+
i.value,
|
|
64
|
+
i.schemas,
|
|
65
|
+
i.hideModelNames,
|
|
66
|
+
H
|
|
67
|
+
) : null);
|
|
98
68
|
return (e, t) => {
|
|
99
|
-
var f,
|
|
100
|
-
return
|
|
101
|
-
e.$slots.name ? (
|
|
69
|
+
var s, f, g, N, q, w, P, I, O, V, b, A;
|
|
70
|
+
return u(), n("div", R, [
|
|
71
|
+
e.$slots.name ? (u(), n("div", {
|
|
102
72
|
key: 0,
|
|
103
|
-
class:
|
|
73
|
+
class: j(["property-name", { deprecated: (s = e.value) == null ? void 0 : s.deprecated }])
|
|
104
74
|
}, [
|
|
105
|
-
e.pattern ? (
|
|
106
|
-
t[0] || (t[0] =
|
|
75
|
+
e.pattern ? (u(), n(p, { key: 1 }, [
|
|
76
|
+
t[0] || (t[0] = l("/")),
|
|
107
77
|
E(e.$slots, "name", {}, void 0, !0),
|
|
108
|
-
t[1] || (t[1] =
|
|
78
|
+
t[1] || (t[1] = l("/"))
|
|
109
79
|
], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
|
|
110
|
-
], 2)) :
|
|
111
|
-
(
|
|
112
|
-
e.value ? (
|
|
113
|
-
(
|
|
114
|
-
default:
|
|
80
|
+
], 2)) : r("", !0),
|
|
81
|
+
(f = e.value) != null && f.isDiscriminator ? (u(), n("div", G, " Discriminator ")) : r("", !0),
|
|
82
|
+
e.value ? (u(), n(p, { key: 2 }, [
|
|
83
|
+
(g = e.value) != null && g.type ? (u(), d(o, { key: 0 }, {
|
|
84
|
+
default: a(() => {
|
|
115
85
|
var C;
|
|
116
86
|
return [
|
|
117
|
-
|
|
118
|
-
default:
|
|
119
|
-
|
|
87
|
+
k(S, null, {
|
|
88
|
+
default: a(() => t[2] || (t[2] = [
|
|
89
|
+
l("Type:")
|
|
120
90
|
])),
|
|
121
91
|
_: 1
|
|
122
92
|
}),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
], 64)) : (
|
|
126
|
-
|
|
93
|
+
M.value ? (u(), n(p, { key: 0 }, [
|
|
94
|
+
l(m(M.value), 1)
|
|
95
|
+
], 64)) : (u(), n(p, { key: 1 }, [
|
|
96
|
+
l(m(T.value) + " " + m((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
|
|
127
97
|
], 64))
|
|
128
98
|
];
|
|
129
99
|
}),
|
|
130
100
|
_: 1
|
|
131
|
-
})) :
|
|
132
|
-
e.value.minItems || e.value.maxItems ? (
|
|
133
|
-
default:
|
|
134
|
-
|
|
101
|
+
})) : r("", !0),
|
|
102
|
+
e.value.minItems || e.value.maxItems ? (u(), d(o, { key: 1 }, {
|
|
103
|
+
default: a(() => [
|
|
104
|
+
l(m(e.value.minItems) + "…" + m(e.value.maxItems), 1)
|
|
135
105
|
]),
|
|
136
106
|
_: 1
|
|
137
|
-
})) :
|
|
138
|
-
e.value.minLength ? (
|
|
139
|
-
prefix:
|
|
140
|
-
|
|
107
|
+
})) : r("", !0),
|
|
108
|
+
e.value.minLength ? (u(), d(o, { key: 2 }, {
|
|
109
|
+
prefix: a(() => t[3] || (t[3] = [
|
|
110
|
+
l("min:")
|
|
141
111
|
])),
|
|
142
|
-
default:
|
|
143
|
-
|
|
112
|
+
default: a(() => [
|
|
113
|
+
l(" " + m(e.value.minLength), 1)
|
|
144
114
|
]),
|
|
145
115
|
_: 1
|
|
146
|
-
})) :
|
|
147
|
-
e.value.maxLength ? (
|
|
148
|
-
prefix:
|
|
149
|
-
|
|
116
|
+
})) : r("", !0),
|
|
117
|
+
e.value.maxLength ? (u(), d(o, { key: 3 }, {
|
|
118
|
+
prefix: a(() => t[4] || (t[4] = [
|
|
119
|
+
l("max:")
|
|
150
120
|
])),
|
|
151
|
-
default:
|
|
152
|
-
|
|
121
|
+
default: a(() => [
|
|
122
|
+
l(" " + m(e.value.maxLength), 1)
|
|
153
123
|
]),
|
|
154
124
|
_: 1
|
|
155
|
-
})) :
|
|
156
|
-
e.value.uniqueItems ? (
|
|
157
|
-
default:
|
|
158
|
-
|
|
125
|
+
})) : r("", !0),
|
|
126
|
+
e.value.uniqueItems ? (u(), d(o, { key: 4 }, {
|
|
127
|
+
default: a(() => t[5] || (t[5] = [
|
|
128
|
+
l(" unique! ")
|
|
159
129
|
])),
|
|
160
130
|
_: 1
|
|
161
|
-
})) :
|
|
162
|
-
e.value.format ? (
|
|
163
|
-
default:
|
|
164
|
-
|
|
165
|
-
default:
|
|
166
|
-
|
|
131
|
+
})) : r("", !0),
|
|
132
|
+
e.value.format ? (u(), d(o, { key: 5 }, {
|
|
133
|
+
default: a(() => [
|
|
134
|
+
k(S, null, {
|
|
135
|
+
default: a(() => t[6] || (t[6] = [
|
|
136
|
+
l("Format:")
|
|
167
137
|
])),
|
|
168
138
|
_: 1
|
|
169
139
|
}),
|
|
170
|
-
|
|
140
|
+
l(" " + m(e.value.format), 1)
|
|
171
141
|
]),
|
|
172
142
|
_: 1
|
|
173
|
-
})) :
|
|
174
|
-
v
|
|
175
|
-
prefix:
|
|
176
|
-
|
|
143
|
+
})) : r("", !0),
|
|
144
|
+
y(v)(e.value.minimum) && e.value.exclusiveMinimum ? (u(), d(o, { key: 6 }, {
|
|
145
|
+
prefix: a(() => t[7] || (t[7] = [
|
|
146
|
+
l("greater than:")
|
|
177
147
|
])),
|
|
178
|
-
default:
|
|
179
|
-
|
|
148
|
+
default: a(() => [
|
|
149
|
+
l(" " + m(e.value.minimum), 1)
|
|
180
150
|
]),
|
|
181
151
|
_: 1
|
|
182
|
-
})) :
|
|
183
|
-
v
|
|
184
|
-
prefix:
|
|
185
|
-
|
|
152
|
+
})) : r("", !0),
|
|
153
|
+
y(v)(e.value.minimum) && !e.value.exclusiveMinimum ? (u(), d(o, { key: 7 }, {
|
|
154
|
+
prefix: a(() => t[8] || (t[8] = [
|
|
155
|
+
l("min:")
|
|
186
156
|
])),
|
|
187
|
-
default:
|
|
188
|
-
|
|
157
|
+
default: a(() => [
|
|
158
|
+
l(" " + m(e.value.minimum), 1)
|
|
189
159
|
]),
|
|
190
160
|
_: 1
|
|
191
|
-
})) :
|
|
192
|
-
v
|
|
193
|
-
prefix:
|
|
194
|
-
|
|
161
|
+
})) : r("", !0),
|
|
162
|
+
y(v)(e.value.maximum) && e.value.exclusiveMaximum ? (u(), d(o, { key: 8 }, {
|
|
163
|
+
prefix: a(() => t[9] || (t[9] = [
|
|
164
|
+
l("less than:")
|
|
195
165
|
])),
|
|
196
|
-
default:
|
|
197
|
-
|
|
166
|
+
default: a(() => [
|
|
167
|
+
l(" " + m(e.value.maximum), 1)
|
|
198
168
|
]),
|
|
199
169
|
_: 1
|
|
200
|
-
})) :
|
|
201
|
-
v
|
|
202
|
-
prefix:
|
|
203
|
-
|
|
170
|
+
})) : r("", !0),
|
|
171
|
+
y(v)(e.value.maximum) && !e.value.exclusiveMaximum ? (u(), d(o, { key: 9 }, {
|
|
172
|
+
prefix: a(() => t[10] || (t[10] = [
|
|
173
|
+
l("max:")
|
|
204
174
|
])),
|
|
205
|
-
default:
|
|
206
|
-
|
|
175
|
+
default: a(() => [
|
|
176
|
+
l(" " + m(e.value.maximum), 1)
|
|
207
177
|
]),
|
|
208
178
|
_: 1
|
|
209
|
-
})) :
|
|
210
|
-
v
|
|
211
|
-
prefix:
|
|
212
|
-
|
|
179
|
+
})) : r("", !0),
|
|
180
|
+
y(v)(e.value.multipleOf) ? (u(), d(o, { key: 10 }, {
|
|
181
|
+
prefix: a(() => t[11] || (t[11] = [
|
|
182
|
+
l("multiple of:")
|
|
213
183
|
])),
|
|
214
|
-
default:
|
|
215
|
-
|
|
184
|
+
default: a(() => [
|
|
185
|
+
l(" " + m(e.value.multipleOf), 1)
|
|
216
186
|
]),
|
|
217
187
|
_: 1
|
|
218
|
-
})) :
|
|
219
|
-
e.value.pattern ? (
|
|
188
|
+
})) : r("", !0),
|
|
189
|
+
e.value.pattern ? (u(), d(o, {
|
|
220
190
|
key: 11,
|
|
221
191
|
code: "",
|
|
222
192
|
truncate: ""
|
|
223
193
|
}, {
|
|
224
|
-
default:
|
|
225
|
-
|
|
226
|
-
default:
|
|
227
|
-
|
|
194
|
+
default: a(() => [
|
|
195
|
+
k(S, null, {
|
|
196
|
+
default: a(() => t[12] || (t[12] = [
|
|
197
|
+
l("Pattern:")
|
|
228
198
|
])),
|
|
229
199
|
_: 1
|
|
230
200
|
}),
|
|
231
|
-
|
|
201
|
+
l(" " + m(e.value.pattern), 1)
|
|
232
202
|
]),
|
|
233
203
|
_: 1
|
|
234
|
-
})) :
|
|
235
|
-
e.$props.enum ? (
|
|
236
|
-
default:
|
|
237
|
-
|
|
204
|
+
})) : r("", !0),
|
|
205
|
+
e.$props.enum ? (u(), d(o, { key: 12 }, {
|
|
206
|
+
default: a(() => t[13] || (t[13] = [
|
|
207
|
+
l("enum")
|
|
238
208
|
])),
|
|
239
209
|
_: 1
|
|
240
|
-
})) :
|
|
241
|
-
e.value.default !== void 0 ? (
|
|
210
|
+
})) : r("", !0),
|
|
211
|
+
e.value.default !== void 0 ? (u(), d(o, {
|
|
242
212
|
key: 13,
|
|
243
213
|
truncate: ""
|
|
244
214
|
}, {
|
|
245
|
-
prefix:
|
|
246
|
-
|
|
215
|
+
prefix: a(() => t[14] || (t[14] = [
|
|
216
|
+
l("default:")
|
|
247
217
|
])),
|
|
248
|
-
default:
|
|
249
|
-
|
|
218
|
+
default: a(() => [
|
|
219
|
+
l(" " + m($(e.value)), 1)
|
|
250
220
|
]),
|
|
251
221
|
_: 1
|
|
252
|
-
})) :
|
|
253
|
-
], 64)) :
|
|
254
|
-
e.additional ? (
|
|
255
|
-
(
|
|
256
|
-
|
|
257
|
-
], 64)) : (
|
|
258
|
-
|
|
222
|
+
})) : r("", !0)
|
|
223
|
+
], 64)) : r("", !0),
|
|
224
|
+
e.additional ? (u(), n("div", K, [
|
|
225
|
+
(N = e.value) != null && N["x-additionalPropertiesName"] ? (u(), n(p, { key: 0 }, [
|
|
226
|
+
l(m(e.value["x-additionalPropertiesName"]), 1)
|
|
227
|
+
], 64)) : (u(), n(p, { key: 1 }, [
|
|
228
|
+
l("additional properties")
|
|
259
229
|
], 64))
|
|
260
|
-
])) :
|
|
261
|
-
e.pattern ? (
|
|
262
|
-
|
|
263
|
-
default:
|
|
264
|
-
|
|
230
|
+
])) : r("", !0),
|
|
231
|
+
e.pattern ? (u(), n("div", Q, [
|
|
232
|
+
k(y(L), null, {
|
|
233
|
+
default: a(() => t[15] || (t[15] = [
|
|
234
|
+
l("pattern")
|
|
265
235
|
])),
|
|
266
236
|
_: 1
|
|
267
237
|
})
|
|
268
|
-
])) :
|
|
269
|
-
(
|
|
270
|
-
|
|
271
|
-
default:
|
|
272
|
-
|
|
238
|
+
])) : r("", !0),
|
|
239
|
+
(q = e.value) != null && q.deprecated ? (u(), n("div", U, [
|
|
240
|
+
k(y(L), null, {
|
|
241
|
+
default: a(() => t[16] || (t[16] = [
|
|
242
|
+
l("deprecated")
|
|
273
243
|
])),
|
|
274
244
|
_: 1
|
|
275
245
|
})
|
|
276
|
-
])) :
|
|
277
|
-
v
|
|
278
|
-
|
|
279
|
-
prefix:
|
|
280
|
-
|
|
246
|
+
])) : r("", !0),
|
|
247
|
+
y(v)(D.value) ? (u(), n("div", W, [
|
|
248
|
+
k(o, { truncate: "" }, {
|
|
249
|
+
prefix: a(() => t[17] || (t[17] = [
|
|
250
|
+
l("const:")
|
|
281
251
|
])),
|
|
282
|
-
default:
|
|
283
|
-
|
|
252
|
+
default: a(() => [
|
|
253
|
+
l(" " + m(D.value), 1)
|
|
284
254
|
]),
|
|
285
255
|
_: 1
|
|
286
256
|
})
|
|
287
|
-
])) : (
|
|
288
|
-
((
|
|
289
|
-
default:
|
|
290
|
-
|
|
257
|
+
])) : (u(), n(p, { key: 7 }, [
|
|
258
|
+
((w = e.value) == null ? void 0 : w.nullable) === !0 ? (u(), d(o, { key: 0 }, {
|
|
259
|
+
default: a(() => t[18] || (t[18] = [
|
|
260
|
+
l(" nullable ")
|
|
291
261
|
])),
|
|
292
262
|
_: 1
|
|
293
|
-
})) :
|
|
263
|
+
})) : r("", !0)
|
|
294
264
|
], 64)),
|
|
295
|
-
(
|
|
296
|
-
e.required ? (
|
|
297
|
-
e.withExamples ? (
|
|
265
|
+
(P = e.value) != null && P.writeOnly ? (u(), n("div", X, " write-only ")) : (I = e.value) != null && I.readOnly ? (u(), n("div", Y, " read-only ")) : r("", !0),
|
|
266
|
+
e.required ? (u(), n("div", Z, " required ")) : r("", !0),
|
|
267
|
+
e.withExamples ? (u(), d(z, {
|
|
298
268
|
key: 11,
|
|
299
|
-
examples: (
|
|
300
|
-
example: ((V = e.value) == null ? void 0 : V.example) || ((A = (
|
|
301
|
-
}, null, 8, ["examples", "example"])) :
|
|
269
|
+
examples: (O = e.value) == null ? void 0 : O.examples,
|
|
270
|
+
example: ((V = e.value) == null ? void 0 : V.example) || ((A = (b = e.value) == null ? void 0 : b.items) == null ? void 0 : A.example)
|
|
271
|
+
}, null, 8, ["examples", "example"])) : r("", !0)
|
|
302
272
|
]);
|
|
303
273
|
};
|
|
304
274
|
}
|
|
@@ -5,6 +5,19 @@ import type { Schemas } from '../../../../features/Operation/types/schemas';
|
|
|
5
5
|
* Handles $ref, title, name, type, and schema dictionary lookup
|
|
6
6
|
*/
|
|
7
7
|
export declare function getModelNameFromSchema(schema: OpenAPIV3_1.SchemaObject, schemas?: Schemas): string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Find schema name by matching against component schemas
|
|
10
|
+
*/
|
|
11
|
+
export declare function getSchemaNameFromSchemas(schema: OpenAPIV3_1.SchemaObject, schemas?: Schemas): string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Format the type and model name for display
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatTypeWithModel(type: string, modelName: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Get the model name for a schema property
|
|
18
|
+
* e.g. User | Admin | array of User | array of Admin
|
|
19
|
+
*/
|
|
20
|
+
export declare function getModelName(value: Record<string, any>, schemas?: Schemas, hideModelNames?: boolean, getDiscriminatorSchemaName?: (schema: any, schemas?: Schemas) => string | null): string | null;
|
|
8
21
|
/**
|
|
9
22
|
* Check if a schema has a name (title, name, or custom identifier)
|
|
10
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAEjE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAuDzG;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAgBpD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,CAAC,YAAY,EAAE,EACvC,kBAAkB,EAAE,WAAW,CAAC,YAAY,EAAE,EAC9C,OAAO,CAAC,EAAE,OAAO,GAChB,WAAW,CAAC,YAAY,EAAE,CA0B5B"}
|
|
1
|
+
{"version":3,"file":"schema-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAEjE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAuDzG;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkC3G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,cAAc,UAAQ,EACtB,0BAA0B,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,GAC7E,MAAM,GAAG,IAAI,CA2Df;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAgBpD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,CAAC,YAAY,EAAE,EACvC,kBAAkB,EAAE,WAAW,CAAC,YAAY,EAAE,EAC9C,OAAO,CAAC,EAAE,OAAO,GAChB,WAAW,CAAC,YAAY,EAAE,CA0B5B"}
|
|
@@ -1,32 +1,78 @@
|
|
|
1
|
-
import { stringify as
|
|
2
|
-
function
|
|
1
|
+
import { stringify as p } from "flatted";
|
|
2
|
+
function d(t, r) {
|
|
3
3
|
if (!t)
|
|
4
4
|
return null;
|
|
5
5
|
if ("title" in t && t.title)
|
|
6
6
|
return t.title;
|
|
7
7
|
if ("name" in t && t.name)
|
|
8
8
|
return t.name;
|
|
9
|
-
if (
|
|
10
|
-
for (const [
|
|
11
|
-
if (
|
|
12
|
-
return
|
|
9
|
+
if (r && typeof r == "object") {
|
|
10
|
+
for (const [i, n] of Object.entries(r))
|
|
11
|
+
if (p(n) === p(t))
|
|
12
|
+
return i;
|
|
13
13
|
}
|
|
14
14
|
if ("$ref" in t) {
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
15
|
+
const n = t.$ref.match(/\/([^\/]+)$/);
|
|
16
|
+
if (n)
|
|
17
|
+
return n[1];
|
|
18
18
|
}
|
|
19
19
|
if ("type" in t && t.type === "array" && "items" in t && t.items)
|
|
20
20
|
return `Array of ${"type" in t.items && t.items.type || "any"}`;
|
|
21
21
|
if ("type" in t && t.type)
|
|
22
22
|
return Array.isArray(t.type) ? t.type.join(" | ") : t.type;
|
|
23
23
|
if (typeof t == "object") {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
24
|
+
const i = Object.keys(t);
|
|
25
|
+
if (i.length > 0)
|
|
26
|
+
return i[0];
|
|
27
27
|
}
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
|
+
function m(t, r) {
|
|
31
|
+
var i, n;
|
|
32
|
+
if (!t || !r || typeof r != "object")
|
|
33
|
+
return null;
|
|
34
|
+
for (const [e, y] of Object.entries(r))
|
|
35
|
+
if (y.type === t.type && (t.type === "array" && ((i = y.items) == null ? void 0 : i.type) === ((n = t.items) == null ? void 0 : n.type) || t.type === "object" && y.properties && t.properties && p(y.properties) === p(t.properties) || t.type !== "array" && t.type !== "object" && (Object.keys(y).some(
|
|
36
|
+
(o) => o !== "type" && !["title", "description"].includes(o)
|
|
37
|
+
) || $(e))))
|
|
38
|
+
return e;
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
function f(t, r) {
|
|
42
|
+
return t === "array" ? `${t} ${r}[]` : `${t} ${r}`;
|
|
43
|
+
}
|
|
44
|
+
function j(t, r, i = !1, n) {
|
|
45
|
+
var s;
|
|
46
|
+
if (!(t != null && t.type))
|
|
47
|
+
return null;
|
|
48
|
+
if (i)
|
|
49
|
+
return t.type === "array" && ((s = t.items) != null && s.type) ? `array ${t.items.type}[]` : null;
|
|
50
|
+
const e = d(t, r);
|
|
51
|
+
if (e && (t.title || t.name))
|
|
52
|
+
return t.type === "array" ? `array ${e}[]` : e;
|
|
53
|
+
const y = m(t, r);
|
|
54
|
+
if (y)
|
|
55
|
+
return t.type === "array" ? `array ${y}[]` : y;
|
|
56
|
+
if (t.type === "array" && t.items) {
|
|
57
|
+
if (n) {
|
|
58
|
+
const u = n(t.items, r);
|
|
59
|
+
if (u)
|
|
60
|
+
return f(t.type, u);
|
|
61
|
+
}
|
|
62
|
+
if (t.items.title || t.items.name)
|
|
63
|
+
return f(t.type, t.items.title || t.items.name);
|
|
64
|
+
const o = d(t.items, r);
|
|
65
|
+
return o && o !== t.items.type ? f(t.type, o) : t.items.type ? f(t.type, t.items.type) : f(t.type, "object");
|
|
66
|
+
}
|
|
67
|
+
return e && e !== t.type ? e.startsWith("Array of ") ? `array ${e.replace("Array of ", "")}[]` : e : null;
|
|
68
|
+
}
|
|
69
|
+
function $(t) {
|
|
70
|
+
return !t || ["anyOf", "oneOf", "allOf"].includes(t) ? !1 : /[A-Z]/.test(t) || /\s/.test(t) || /\(\d+\)/.test(t);
|
|
71
|
+
}
|
|
30
72
|
export {
|
|
31
|
-
|
|
73
|
+
f as formatTypeWithModel,
|
|
74
|
+
j as getModelName,
|
|
75
|
+
d as getModelNameFromSchema,
|
|
76
|
+
m as getSchemaNameFromSchemas,
|
|
77
|
+
$ as hasName
|
|
32
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsList.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAU/C,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA8GF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./OperationsList.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b3881ce4"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|