@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.
Files changed (183) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/browser/standalone.js +18613 -18470
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +10 -30
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +240 -222
  9. package/dist/components/Content/Content.vue.d.ts +2 -0
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +2 -2
  12. package/dist/components/Content/Content.vue2.js +84 -74
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +84 -86
  19. package/dist/components/Content/Models/Models.vue.js +1 -1
  20. package/dist/components/Content/Models/Models.vue2.js +4 -4
  21. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  23. package/dist/components/Content/Schema/Schema.vue2.js +53 -53
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
  29. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
  32. package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
  33. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
  35. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  37. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
  38. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
  39. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  41. package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
  42. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/Tag.vue.js +45 -47
  44. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tag/TagList.vue.js +40 -41
  47. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  49. package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
  50. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
  51. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  52. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
  53. package/dist/components/MobileHeader.vue.d.ts +1 -8
  54. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  55. package/dist/components/MobileHeader.vue.js +1 -1
  56. package/dist/components/MobileHeader.vue2.js +19 -19
  57. package/dist/components/Section/Section.vue.js +2 -2
  58. package/dist/components/Section/Section.vue2.js +1 -1
  59. package/dist/components/ShowMoreButton.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue2.js +1 -1
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
  65. package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
  66. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  68. package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
  69. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
  70. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
  71. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
  72. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
  78. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  79. package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
  80. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  81. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
  82. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  83. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  84. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
  85. package/dist/features/Operation/Operation.vue.d.ts +0 -1
  86. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/Operation.vue.js +31 -34
  88. package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
  89. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
  91. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
  92. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
  94. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  96. package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
  97. package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
  98. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  99. package/dist/features/Operation/hooks/useResponses.js +12 -13
  100. package/dist/features/Operation/index.d.ts +0 -1
  101. package/dist/features/Operation/index.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +85 -72
  106. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  109. package/dist/features/Operation/layouts/ModernLayout.vue2.js +114 -98
  110. package/dist/features/Search/SearchModal.vue.js +2 -2
  111. package/dist/features/Search/SearchModal.vue2.js +1 -1
  112. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  113. package/dist/features/Search/useSearchIndex.js +61 -64
  114. package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
  115. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  116. package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
  117. package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
  118. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
  119. package/dist/features/sidebar/hooks/useSidebar.js +18 -0
  120. package/dist/features/sidebar/index.d.ts +2 -1
  121. package/dist/features/sidebar/index.d.ts.map +1 -1
  122. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
  123. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
  124. package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
  125. package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
  126. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
  127. package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
  128. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
  129. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  130. package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
  131. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
  132. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  133. package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
  134. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
  135. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  136. package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
  137. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
  138. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  139. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
  140. package/dist/features/traverse-schema/index.d.ts +3 -3
  141. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  142. package/dist/features/traverse-schema/types.d.ts +8 -5
  143. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  144. package/dist/helpers/parse.d.ts +2 -1
  145. package/dist/helpers/parse.d.ts.map +1 -1
  146. package/dist/helpers/parse.js +72 -88
  147. package/dist/hooks/useMultipleDocuments.d.ts +6 -6
  148. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  149. package/dist/hooks/useNavState.d.ts +1 -1
  150. package/dist/hooks/useNavState.d.ts.map +1 -1
  151. package/dist/hooks/useNavState.js +14 -9
  152. package/dist/hooks/useOperation.d.ts +7 -7
  153. package/dist/hooks/useOperation.d.ts.map +1 -1
  154. package/dist/hooks/useOperation.js +13 -12
  155. package/dist/index.d.ts +0 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +23 -25
  158. package/dist/legacy/fixtures/index.d.ts +1 -1
  159. package/dist/libs/openapi.d.ts +3 -4
  160. package/dist/libs/openapi.d.ts.map +1 -1
  161. package/dist/libs/openapi.js +8 -9
  162. package/dist/style.css +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
  164. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  165. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
  166. package/package.json +16 -16
  167. package/dist/components/Content/Webhooks/index.d.ts +0 -2
  168. package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
  169. package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
  170. package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
  171. package/dist/features/Operation/Webhooks.vue.js +0 -7
  172. package/dist/features/Operation/Webhooks.vue2.js +0 -121
  173. package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
  174. package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
  175. package/dist/features/Operation/components/Webhook.vue.js +0 -7
  176. package/dist/features/Operation/components/Webhook.vue2.js +0 -29
  177. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
  178. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
  179. package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
  180. package/dist/hooks/useSidebar.d.ts +0 -53
  181. package/dist/hooks/useSidebar.d.ts.map +0 -1
  182. package/dist/hooks/useSidebar.js +0 -248
  183. package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
@@ -1,11 +1,12 @@
1
- import { defineComponent as z, computed as B, createElementBlock as n, openBlock as a, createCommentVNode as i, createBlock as d, normalizeClass as H, renderSlot as E, Fragment as g, createTextVNode as u, withCtx as r, createVNode as N, toDisplayString as m, unref as v } from "vue";
2
- import { isDefined as p } from "@scalar/helpers/array/is-defined";
3
- import J from "./SchemaPropertyExamples.vue.js";
4
- import M from "../../ScreenReader.vue.js";
5
- import { getDiscriminatorSchemaName as R } from "../../../hooks/useDiscriminator.js";
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 W = { class: "property-heading" }, G = {
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
- }, X = {
21
+ }, W = {
21
22
  key: 6,
22
23
  class: "property-const"
23
- }, Y = {
24
+ }, X = {
24
25
  key: 8,
25
26
  class: "property-write-only"
26
- }, Z = {
27
+ }, Y = {
27
28
  key: 9,
28
29
  class: "property-read-only"
29
- }, h = {
30
+ }, Z = {
30
31
  key: 10,
31
32
  class: "property-required"
32
- }, ae = /* @__PURE__ */ z({
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(l) {
45
- const T = (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, S = (e) => {
46
- var t, f;
47
- if (!e)
48
- return null;
49
- if (e.title)
50
- return e.title;
51
- if (e.name)
52
- return e.name;
53
- if (l.schemas && typeof l.schemas == "object") {
54
- for (const [y, s] of Object.entries(l.schemas))
55
- if (s.type === e.type && (e.type === "array" && ((t = s.items) == null ? void 0 : t.type) === ((f = e.items) == null ? void 0 : f.type) || e.type === "object" && s.properties && e.properties || e.type !== "array" && e.type !== "object"))
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, y, s, k, j, q, w, O, P, V, I, A;
100
- return a(), n("div", W, [
101
- e.$slots.name ? (a(), n("div", {
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: H(["property-name", { deprecated: (f = e.value) == null ? void 0 : f.deprecated }])
73
+ class: j(["property-name", { deprecated: (s = e.value) == null ? void 0 : s.deprecated }])
104
74
  }, [
105
- e.pattern ? (a(), n(g, { key: 1 }, [
106
- t[0] || (t[0] = u("/")),
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] = u("/"))
78
+ t[1] || (t[1] = l("/"))
109
79
  ], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
110
- ], 2)) : i("", !0),
111
- (y = e.value) != null && y.isDiscriminator ? (a(), n("div", G, " Discriminator ")) : i("", !0),
112
- e.value ? (a(), n(g, { key: 2 }, [
113
- (s = e.value) != null && s.type ? (a(), d(o, { key: 0 }, {
114
- default: r(() => {
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
- N(M, null, {
118
- default: r(() => t[2] || (t[2] = [
119
- u("Type:")
87
+ k(S, null, {
88
+ default: a(() => t[2] || (t[2] = [
89
+ l("Type:")
120
90
  ])),
121
91
  _: 1
122
92
  }),
123
- D.value ? (a(), n(g, { key: 0 }, [
124
- u(m(D.value), 1)
125
- ], 64)) : (a(), n(g, { key: 1 }, [
126
- u(m(F.value) + " " + m((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
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
- })) : i("", !0),
132
- e.value.minItems || e.value.maxItems ? (a(), d(o, { key: 1 }, {
133
- default: r(() => [
134
- u(m(e.value.minItems) + "…" + m(e.value.maxItems), 1)
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
- })) : i("", !0),
138
- e.value.minLength ? (a(), d(o, { key: 2 }, {
139
- prefix: r(() => t[3] || (t[3] = [
140
- u("min:")
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: r(() => [
143
- u(" " + m(e.value.minLength), 1)
112
+ default: a(() => [
113
+ l(" " + m(e.value.minLength), 1)
144
114
  ]),
145
115
  _: 1
146
- })) : i("", !0),
147
- e.value.maxLength ? (a(), d(o, { key: 3 }, {
148
- prefix: r(() => t[4] || (t[4] = [
149
- u("max:")
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: r(() => [
152
- u(" " + m(e.value.maxLength), 1)
121
+ default: a(() => [
122
+ l(" " + m(e.value.maxLength), 1)
153
123
  ]),
154
124
  _: 1
155
- })) : i("", !0),
156
- e.value.uniqueItems ? (a(), d(o, { key: 4 }, {
157
- default: r(() => t[5] || (t[5] = [
158
- u(" unique! ")
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
- })) : i("", !0),
162
- e.value.format ? (a(), d(o, { key: 5 }, {
163
- default: r(() => [
164
- N(M, null, {
165
- default: r(() => t[6] || (t[6] = [
166
- u("Format:")
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
- u(" " + m(e.value.format), 1)
140
+ l(" " + m(e.value.format), 1)
171
141
  ]),
172
142
  _: 1
173
- })) : i("", !0),
174
- v(p)(e.value.minimum) && e.value.exclusiveMinimum ? (a(), d(o, { key: 6 }, {
175
- prefix: r(() => t[7] || (t[7] = [
176
- u("greater than:")
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: r(() => [
179
- u(" " + m(e.value.minimum), 1)
148
+ default: a(() => [
149
+ l(" " + m(e.value.minimum), 1)
180
150
  ]),
181
151
  _: 1
182
- })) : i("", !0),
183
- v(p)(e.value.minimum) && !e.value.exclusiveMinimum ? (a(), d(o, { key: 7 }, {
184
- prefix: r(() => t[8] || (t[8] = [
185
- u("min:")
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: r(() => [
188
- u(" " + m(e.value.minimum), 1)
157
+ default: a(() => [
158
+ l(" " + m(e.value.minimum), 1)
189
159
  ]),
190
160
  _: 1
191
- })) : i("", !0),
192
- v(p)(e.value.maximum) && e.value.exclusiveMaximum ? (a(), d(o, { key: 8 }, {
193
- prefix: r(() => t[9] || (t[9] = [
194
- u("less than:")
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: r(() => [
197
- u(" " + m(e.value.maximum), 1)
166
+ default: a(() => [
167
+ l(" " + m(e.value.maximum), 1)
198
168
  ]),
199
169
  _: 1
200
- })) : i("", !0),
201
- v(p)(e.value.maximum) && !e.value.exclusiveMaximum ? (a(), d(o, { key: 9 }, {
202
- prefix: r(() => t[10] || (t[10] = [
203
- u("max:")
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: r(() => [
206
- u(" " + m(e.value.maximum), 1)
175
+ default: a(() => [
176
+ l(" " + m(e.value.maximum), 1)
207
177
  ]),
208
178
  _: 1
209
- })) : i("", !0),
210
- v(p)(e.value.multipleOf) ? (a(), d(o, { key: 10 }, {
211
- prefix: r(() => t[11] || (t[11] = [
212
- u("multiple of:")
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: r(() => [
215
- u(" " + m(e.value.multipleOf), 1)
184
+ default: a(() => [
185
+ l(" " + m(e.value.multipleOf), 1)
216
186
  ]),
217
187
  _: 1
218
- })) : i("", !0),
219
- e.value.pattern ? (a(), d(o, {
188
+ })) : r("", !0),
189
+ e.value.pattern ? (u(), d(o, {
220
190
  key: 11,
221
191
  code: "",
222
192
  truncate: ""
223
193
  }, {
224
- default: r(() => [
225
- N(M, null, {
226
- default: r(() => t[12] || (t[12] = [
227
- u("Pattern:")
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
- u(" " + m(e.value.pattern), 1)
201
+ l(" " + m(e.value.pattern), 1)
232
202
  ]),
233
203
  _: 1
234
- })) : i("", !0),
235
- e.$props.enum ? (a(), d(o, { key: 12 }, {
236
- default: r(() => t[13] || (t[13] = [
237
- u("enum")
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
- })) : i("", !0),
241
- e.value.default !== void 0 ? (a(), d(o, {
210
+ })) : r("", !0),
211
+ e.value.default !== void 0 ? (u(), d(o, {
242
212
  key: 13,
243
213
  truncate: ""
244
214
  }, {
245
- prefix: r(() => t[14] || (t[14] = [
246
- u("default:")
215
+ prefix: a(() => t[14] || (t[14] = [
216
+ l("default:")
247
217
  ])),
248
- default: r(() => [
249
- u(" " + m(T(e.value)), 1)
218
+ default: a(() => [
219
+ l(" " + m($(e.value)), 1)
250
220
  ]),
251
221
  _: 1
252
- })) : i("", !0)
253
- ], 64)) : i("", !0),
254
- e.additional ? (a(), n("div", K, [
255
- (k = e.value) != null && k["x-additionalPropertiesName"] ? (a(), n(g, { key: 0 }, [
256
- u(m(e.value["x-additionalPropertiesName"]), 1)
257
- ], 64)) : (a(), n(g, { key: 1 }, [
258
- u("additional properties")
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
- ])) : i("", !0),
261
- e.pattern ? (a(), n("div", Q, [
262
- N(v(L), null, {
263
- default: r(() => t[15] || (t[15] = [
264
- u("pattern")
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
- ])) : i("", !0),
269
- (j = e.value) != null && j.deprecated ? (a(), n("div", U, [
270
- N(v(L), null, {
271
- default: r(() => t[16] || (t[16] = [
272
- u("deprecated")
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
- ])) : i("", !0),
277
- v(p)($.value) ? (a(), n("div", X, [
278
- N(o, { truncate: "" }, {
279
- prefix: r(() => t[17] || (t[17] = [
280
- u("const:")
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: r(() => [
283
- u(" " + m($.value), 1)
252
+ default: a(() => [
253
+ l(" " + m(D.value), 1)
284
254
  ]),
285
255
  _: 1
286
256
  })
287
- ])) : (a(), n(g, { key: 7 }, [
288
- ((q = e.value) == null ? void 0 : q.nullable) === !0 ? (a(), d(o, { key: 0 }, {
289
- default: r(() => t[18] || (t[18] = [
290
- u(" nullable ")
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
- })) : i("", !0)
263
+ })) : r("", !0)
294
264
  ], 64)),
295
- (w = e.value) != null && w.writeOnly ? (a(), n("div", Y, " write-only ")) : (O = e.value) != null && O.readOnly ? (a(), n("div", Z, " read-only ")) : i("", !0),
296
- e.required ? (a(), n("div", h, " required ")) : i("", !0),
297
- e.withExamples ? (a(), d(J, {
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: (P = e.value) == null ? void 0 : P.examples,
300
- example: ((V = e.value) == null ? void 0 : V.example) || ((A = (I = e.value) == null ? void 0 : I.items) == null ? void 0 : A.example)
301
- }, null, 8, ["examples", "example"])) : i("", !0)
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 e } from "flatted";
2
- function y(t, n) {
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 (n && typeof n == "object") {
10
- for (const [r, i] of Object.entries(n))
11
- if (e(i) === e(t))
12
- return r;
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 i = t.$ref.match(/\/([^\/]+)$/);
16
- if (i)
17
- return i[1];
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 r = Object.keys(t);
25
- if (r.length > 0)
26
- return r[0];
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
- y as getModelNameFromSchema
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":"AA0DA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAY/C,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAkHF,wBAMG"}
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-775f2c95"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b3881ce4"]]);
5
5
  export {
6
6
  a as default
7
7
  };