@scalar/api-reference 1.28.33 → 1.29.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.
Files changed (227) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/browser/standalone.js +12818 -13331
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  5. package/dist/components/Anchor/Anchor.vue.js +2 -2
  6. package/dist/components/Anchor/Anchor.vue2.js +24 -22
  7. package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  10. package/dist/components/ApiReferenceLayout.vue2.js +50 -50
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  13. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +5 -5
  14. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +1 -1
  15. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +1 -1
  16. package/dist/components/Content/Content.vue.js +2 -2
  17. package/dist/components/Content/Content.vue2.js +31 -32
  18. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  19. package/dist/components/Content/Introduction/Introduction.vue2.js +21 -21
  20. package/dist/components/Content/Lazy/Loading.vue.js +22 -22
  21. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/Models.vue.js +2 -2
  23. package/dist/components/Content/Models/Models.vue2.js +17 -17
  24. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  26. package/dist/components/Content/Models/ModelsAccordion.vue2.js +14 -14
  27. package/dist/components/Content/Schema/Schema.preview.d.ts +98 -15
  28. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  29. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  31. package/dist/components/Content/Schema/Schema.vue2.js +2 -1
  32. package/dist/components/Content/Schema/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts} +3 -2
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -0
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +187 -0
  35. package/dist/components/Content/Schema/SchemaComposition.vue2.js +4 -0
  36. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  37. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  38. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  39. package/dist/components/Content/Schema/SchemaProperty.vue2.js +31 -30
  40. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +0 -1
  41. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
  43. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +8 -9
  44. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  45. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  46. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +165 -146
  47. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +1 -1
  48. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  49. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +50 -40
  50. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +3 -2
  51. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  52. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +13 -13
  53. package/dist/components/Content/Schema/helpers/schema-composition.d.ts +12 -0
  54. package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -0
  55. package/dist/components/Content/Schema/helpers/schema-composition.js +8 -0
  56. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +4 -0
  57. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -0
  58. package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
  59. package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
  60. package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
  61. package/dist/components/Content/Tag/TagAccordion.vue2.js +10 -10
  62. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  63. package/dist/components/Content/Tag/TagList.vue.js +8 -8
  64. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  65. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  66. package/dist/components/Content/Tag/TagSection.vue2.js +8 -8
  67. package/dist/components/GettingStarted.vue.d.ts +2 -2
  68. package/dist/components/Layouts/Layouts.vue.d.ts +3 -0
  69. package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
  70. package/dist/components/Layouts/Layouts.vue.js +14 -23
  71. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  72. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  73. package/dist/components/Layouts/ModernLayout.vue2.js +51 -45
  74. package/dist/components/MobileHeader.vue.js +3 -3
  75. package/dist/components/Section/CompactSection.vue.js +2 -2
  76. package/dist/components/Section/CompactSection.vue2.js +4 -4
  77. package/dist/components/Section/Section.vue.d.ts.map +1 -1
  78. package/dist/components/Section/Section.vue.js +1 -1
  79. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  80. package/dist/components/ShowMoreButton.vue.js +2 -2
  81. package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -1
  82. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  83. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  84. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  85. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  86. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  87. package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
  88. package/dist/components/SingleApiReference.vue.d.ts +1 -0
  89. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  90. package/dist/components/SingleApiReference.vue.js +25 -22
  91. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +1 -1
  92. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  93. package/dist/features/ApiClientModal/ApiClientModal.vue.js +3 -3
  94. package/dist/features/ApiClientModal/index.d.ts +1 -1
  95. package/dist/features/ApiClientModal/index.d.ts.map +1 -1
  96. package/dist/features/ApiClientModal/useApiClient.d.ts +186 -146
  97. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  98. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  99. package/dist/features/BaseUrl/BaseUrl.vue.js +11 -10
  100. package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
  101. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  102. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  103. package/dist/features/DownloadLink/DownloadLink.vue2.js +17 -17
  104. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  105. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  106. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +12 -12
  107. package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/Webhooks.vue.js +2 -2
  109. package/dist/features/Operation/Webhooks.vue2.js +13 -13
  110. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  111. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  112. package/dist/features/Operation/components/ParameterListItem.vue2.js +18 -18
  113. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  114. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  115. package/dist/features/Operation/components/RequestBody.vue2.js +38 -32
  116. package/dist/features/Operation/hooks/useResponses.d.ts +1 -0
  117. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  118. package/dist/features/Operation/hooks/useResponses.js +13 -12
  119. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  120. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  121. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +1 -1
  122. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  123. package/dist/features/Operation/layouts/ModernLayout.vue2.js +1 -1
  124. package/dist/features/Search/SearchButton.vue.js +2 -2
  125. package/dist/features/Search/SearchButton.vue2.js +1 -1
  126. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  127. package/dist/features/Search/SearchModal.vue.js +2 -2
  128. package/dist/features/Search/SearchModal.vue2.js +1 -1
  129. package/dist/features/Search/useSearchIndex.d.ts +1 -1
  130. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  131. package/dist/features/Search/useSearchIndex.js +20 -21
  132. package/dist/helpers/{isMacOs.d.ts → is-mac-os.d.ts} +1 -1
  133. package/dist/helpers/is-mac-os.d.ts.map +1 -0
  134. package/dist/helpers/parse.d.ts.map +1 -1
  135. package/dist/helpers/parse.js +1 -1
  136. package/dist/helpers/{scrollToId.d.ts → scroll-to-id.d.ts} +1 -1
  137. package/dist/helpers/scroll-to-id.d.ts.map +1 -0
  138. package/dist/helpers/sleep.d.ts +0 -2
  139. package/dist/helpers/sleep.d.ts.map +1 -1
  140. package/dist/hooks/useNavState.d.ts.map +1 -1
  141. package/dist/hooks/useNavState.js +28 -28
  142. package/dist/hooks/useReactiveSpec.js +1 -1
  143. package/dist/hooks/useSidebar.d.ts.map +1 -1
  144. package/dist/hooks/useSidebar.js +45 -49
  145. package/dist/index.d.ts +3 -3
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +44 -43
  148. package/dist/legacy/fixtures/index.d.ts +1 -1
  149. package/dist/legacy/fixtures/index.d.ts.map +1 -1
  150. package/dist/legacy/helpers/index.d.ts +1 -1
  151. package/dist/legacy/helpers/index.d.ts.map +1 -1
  152. package/dist/libs/download.d.ts +9 -0
  153. package/dist/libs/download.d.ts.map +1 -0
  154. package/dist/libs/download.js +19 -0
  155. package/dist/{helpers/getLowestHeadingLevel.d.ts → libs/markdown.d.ts} +5 -1
  156. package/dist/libs/markdown.d.ts.map +1 -0
  157. package/dist/libs/markdown.js +18 -0
  158. package/dist/libs/openapi.d.ts +56 -0
  159. package/dist/libs/openapi.d.ts.map +1 -0
  160. package/dist/libs/openapi.js +102 -0
  161. package/dist/style.css +1 -1
  162. package/dist/types.d.ts +1 -45
  163. package/dist/types.d.ts.map +1 -1
  164. package/package.json +22 -27
  165. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
  166. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -7
  167. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -167
  168. package/dist/esm.js +0 -34
  169. package/dist/helpers/createEmptySpecification.d.ts +0 -8
  170. package/dist/helpers/createEmptySpecification.d.ts.map +0 -1
  171. package/dist/helpers/createEmptySpecification.js +0 -27
  172. package/dist/helpers/deepMerge.d.ts +0 -5
  173. package/dist/helpers/deepMerge.d.ts.map +0 -1
  174. package/dist/helpers/deepMerge.js +0 -8
  175. package/dist/helpers/generateParameters.d.ts +0 -6
  176. package/dist/helpers/generateParameters.d.ts.map +0 -1
  177. package/dist/helpers/get-request.d.ts +0 -59
  178. package/dist/helpers/get-request.d.ts.map +0 -1
  179. package/dist/helpers/getHeadingsFromMarkdown.d.ts +0 -6
  180. package/dist/helpers/getHeadingsFromMarkdown.d.ts.map +0 -1
  181. package/dist/helpers/getHeadingsFromMarkdown.js +0 -13
  182. package/dist/helpers/getLowestHeadingLevel.d.ts.map +0 -1
  183. package/dist/helpers/getLowestHeadingLevel.js +0 -7
  184. package/dist/helpers/getModels.d.ts +0 -7
  185. package/dist/helpers/getModels.d.ts.map +0 -1
  186. package/dist/helpers/getModels.js +0 -22
  187. package/dist/helpers/getVariableNames.d.ts +0 -5
  188. package/dist/helpers/getVariableNames.d.ts.map +0 -1
  189. package/dist/helpers/hasModels.d.ts +0 -3
  190. package/dist/helpers/hasModels.d.ts.map +0 -1
  191. package/dist/helpers/hasModels.js +0 -5
  192. package/dist/helpers/hasSecuritySchemes.d.ts +0 -3
  193. package/dist/helpers/hasSecuritySchemes.d.ts.map +0 -1
  194. package/dist/helpers/hasWebhooks.d.ts +0 -3
  195. package/dist/helpers/hasWebhooks.d.ts.map +0 -1
  196. package/dist/helpers/hasWebhooks.js +0 -4
  197. package/dist/helpers/index.d.ts +0 -17
  198. package/dist/helpers/index.d.ts.map +0 -1
  199. package/dist/helpers/isMacOs.d.ts.map +0 -1
  200. package/dist/helpers/mapFromObject.d.ts +0 -8
  201. package/dist/helpers/mapFromObject.d.ts.map +0 -1
  202. package/dist/helpers/mergeAllObjects.d.ts +0 -5
  203. package/dist/helpers/mergeAllObjects.d.ts.map +0 -1
  204. package/dist/helpers/scrollToId.d.ts.map +0 -1
  205. package/dist/helpers/specDownloads.d.ts +0 -7
  206. package/dist/helpers/specDownloads.d.ts.map +0 -1
  207. package/dist/helpers/specDownloads.js +0 -19
  208. package/dist/helpers/specHelpers.d.ts +0 -16
  209. package/dist/helpers/specHelpers.d.ts.map +0 -1
  210. package/dist/helpers/specHelpers.js +0 -36
  211. package/dist/helpers/waitFor.d.ts +0 -5
  212. package/dist/helpers/waitFor.d.ts.map +0 -1
  213. package/dist/hooks/index.d.ts +0 -5
  214. package/dist/hooks/index.d.ts.map +0 -1
  215. package/dist/legacy/helpers/encodeStringAsBase64.d.ts +0 -5
  216. package/dist/legacy/helpers/encodeStringAsBase64.d.ts.map +0 -1
  217. package/dist/legacy/index.d.ts +0 -5
  218. package/dist/legacy/index.d.ts.map +0 -1
  219. package/dist/legacy/types.d.ts +0 -94
  220. package/dist/legacy/types.d.ts.map +0 -1
  221. package/dist/libs/operation.d.ts +0 -15
  222. package/dist/libs/operation.d.ts.map +0 -1
  223. package/dist/libs/operation.js +0 -16
  224. package/dist/stores/index.d.ts +0 -2
  225. package/dist/stores/index.d.ts.map +0 -1
  226. /package/dist/helpers/{isMacOs.js → is-mac-os.js} +0 -0
  227. /package/dist/helpers/{scrollToId.js → scroll-to-id.js} +0 -0
@@ -1,22 +1,22 @@
1
- import { defineComponent as T, createElementBlock as i, openBlock as l, createCommentVNode as u, createBlock as o, normalizeClass as z, renderSlot as D, Fragment as s, createTextVNode as r, toDisplayString as n, createVNode as p, unref as g, withCtx as a } from "vue";
2
- import { isDefined as H } from "@scalar/oas-utils/helpers";
3
- import { stringify as E } from "flatted";
4
- import { discriminators as J } from "./helpers/optimizeValueForDisplay.js";
1
+ import { defineComponent as z, computed as D, createElementBlock as m, openBlock as l, createCommentVNode as i, createBlock as d, normalizeClass as H, renderSlot as E, Fragment as y, createTextVNode as u, withCtx as a, createVNode as v, toDisplayString as n, unref as g } from "vue";
2
+ import { isDefined as B } from "@scalar/oas-utils/helpers";
3
+ import { stringify as L } from "flatted";
4
+ import { compositions as J } from "./helpers/schema-composition.js";
5
5
  import R from "./SchemaPropertyExamples.vue.js";
6
- import B from "../../ScreenReader.vue.js";
7
- import m from "./SchemaPropertyDetail.vue.js";
8
- import L from "../../Badge/Badge.vue.js";
6
+ import b from "../../ScreenReader.vue.js";
7
+ import o from "./SchemaPropertyDetail.vue.js";
8
+ import O from "../../Badge/Badge.vue.js";
9
9
  const G = { class: "property-heading" }, K = {
10
- key: 1,
10
+ key: 2,
11
11
  class: "property-additional"
12
12
  }, Q = {
13
- key: 2,
13
+ key: 3,
14
14
  class: "property-pattern"
15
15
  }, U = {
16
- key: 3,
16
+ key: 4,
17
17
  class: "property-deprecated"
18
18
  }, W = {
19
- key: 4,
19
+ key: 5,
20
20
  class: "property-const"
21
21
  }, X = {
22
22
  key: 7,
@@ -27,7 +27,7 @@ const G = { class: "property-heading" }, K = {
27
27
  }, Z = {
28
28
  key: 9,
29
29
  class: "property-required"
30
- }, ae = /* @__PURE__ */ T({
30
+ }, ae = /* @__PURE__ */ z({
31
31
  __name: "SchemaPropertyHeading",
32
32
  props: {
33
33
  value: {},
@@ -38,213 +38,232 @@ const G = { class: "property-heading" }, K = {
38
38
  withExamples: { type: Boolean, default: !0 },
39
39
  schemas: {}
40
40
  },
41
- setup(d) {
42
- const O = J.find((e) => !d.value || typeof d.value != "object" ? !1 : e in d.value || d.value.items && typeof d.value.items == "object" && e in d.value.items), $ = (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, F = (e) => {
41
+ setup(r) {
42
+ J.find((e) => !r.value || typeof r.value != "object" ? !1 : e in r.value || r.value.items && typeof r.value.items == "object" && e in r.value.items);
43
+ 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, F = (e) => {
43
44
  if (!e)
44
45
  return null;
46
+ if (e.title)
47
+ return e.title;
45
48
  if (e.name)
46
49
  return e.name;
47
- if (d.schemas && typeof d.schemas == "object") {
48
- for (const [t, k] of Object.entries(d.schemas))
49
- if (E(k) === E(e))
50
+ if (r.schemas && typeof r.schemas == "object") {
51
+ for (const [t, s] of Object.entries(r.schemas))
52
+ if (L(s) === L(e))
50
53
  return t;
51
54
  }
52
55
  return null;
53
- };
56
+ }, N = D(() => {
57
+ var e, t, s, f, p, k;
58
+ if (B((e = r.value) == null ? void 0 : e.const))
59
+ return (t = r.value) == null ? void 0 : t.const;
60
+ if (((f = (s = r.value) == null ? void 0 : s.enum) == null ? void 0 : f.length) === 1)
61
+ return r.value.enum[0];
62
+ if ((p = r.value) != null && p.items) {
63
+ if (B(r.value.items.const))
64
+ return r.value.items.const;
65
+ if (((k = r.value.items.enum) == null ? void 0 : k.length) === 1)
66
+ return r.value.items.enum[0];
67
+ }
68
+ return null;
69
+ }), T = D(() => {
70
+ var e, t, s, f;
71
+ return Array.isArray((e = r.value) == null ? void 0 : e.type) ? r.value.type.join(" | ") : (t = r.value) != null && t.title ? r.value.title : (s = r.value) != null && s.name ? r.value.name : ((f = r.value) == null ? void 0 : f.type) ?? "";
72
+ });
54
73
  return (e, t) => {
55
- var k, b, N, S, q, w, P, j, I, M, V, A, C;
56
- return l(), i("div", G, [
57
- e.$slots.name ? (l(), i("div", {
74
+ var s, f, p, k, S, q, w, P, V, j, I;
75
+ return l(), m("div", G, [
76
+ e.$slots.name ? (l(), m("div", {
58
77
  key: 0,
59
- class: z(["property-name", { deprecated: (k = e.value) == null ? void 0 : k.deprecated }])
78
+ class: H(["property-name", { deprecated: (s = e.value) == null ? void 0 : s.deprecated }])
60
79
  }, [
61
- e.pattern ? (l(), i(s, { key: 1 }, [
62
- t[0] || (t[0] = r("/")),
63
- D(e.$slots, "name", {}, void 0, !0),
64
- t[1] || (t[1] = r("/"))
65
- ], 64)) : D(e.$slots, "name", { key: 0 }, void 0, !0)
66
- ], 2)) : u("", !0),
67
- e.additional ? (l(), i("div", K, [
68
- (b = e.value) != null && b["x-additionalPropertiesName"] ? (l(), i(s, { key: 0 }, [
69
- r(n(e.value["x-additionalPropertiesName"]), 1)
70
- ], 64)) : (l(), i(s, { key: 1 }, [
71
- r("additional properties")
72
- ], 64))
73
- ])) : u("", !0),
74
- e.pattern ? (l(), i("div", Q, [
75
- p(g(L), null, {
76
- default: a(() => t[2] || (t[2] = [
77
- r("pattern")
78
- ])),
79
- _: 1
80
- })
81
- ])) : u("", !0),
82
- (N = e.value) != null && N.deprecated ? (l(), i("div", U, [
83
- p(g(L), null, {
84
- default: a(() => t[3] || (t[3] = [
85
- r("deprecated")
86
- ])),
87
- _: 1
88
- })
89
- ])) : u("", !0),
90
- g(H)((S = e.value) == null ? void 0 : S.const) || (q = e.value) != null && q.enum && e.value.enum.length === 1 ? (l(), i("div", W, [
91
- p(m, { truncate: "" }, {
92
- prefix: a(() => t[4] || (t[4] = [
93
- r("const:")
94
- ])),
95
- default: a(() => {
96
- var y, f, v;
97
- return [
98
- r(" " + n(((y = e.value) == null ? void 0 : y.const) ?? ((v = (f = e.value) == null ? void 0 : f.enum) == null ? void 0 : v[0])), 1)
99
- ];
100
- }),
101
- _: 1
102
- })
103
- ])) : (w = e.value) != null && w.type ? (l(), i(s, { key: 5 }, [
104
- p(m, null, {
80
+ e.pattern ? (l(), m(y, { key: 1 }, [
81
+ t[0] || (t[0] = u("/")),
82
+ E(e.$slots, "name", {}, void 0, !0),
83
+ t[1] || (t[1] = u("/"))
84
+ ], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
85
+ ], 2)) : i("", !0),
86
+ e.value ? (l(), m(y, { key: 1 }, [
87
+ (f = e.value) != null && f.type ? (l(), d(o, { key: 0 }, {
105
88
  default: a(() => {
106
- var y, f, v;
89
+ var M, A, C;
107
90
  return [
108
- p(B, null, {
109
- default: a(() => t[5] || (t[5] = [
110
- r("Type:")
91
+ v(b, null, {
92
+ default: a(() => t[2] || (t[2] = [
93
+ u("Type:")
111
94
  ])),
112
95
  _: 1
113
96
  }),
114
- (f = (y = e.value) == null ? void 0 : y.items) != null && f.type ? (l(), i(s, { key: 0 }, [
115
- r(n(e.value.type) + " " + n(F(e.value.items) || e.value.items.type) + "[] ", 1)
116
- ], 64)) : (l(), i(s, { key: 1 }, [
117
- r(n(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + n((v = e.value) != null && v.nullable ? " | nullable" : ""), 1)
118
- ], 64)),
119
- e.value.minItems || e.value.maxItems ? (l(), i(s, { key: 2 }, [
120
- r(n(e.value.minItems) + "…" + n(e.value.maxItems), 1)
121
- ], 64)) : u("", !0)
97
+ (A = (M = e.value) == null ? void 0 : M.items) != null && A.type ? (l(), m(y, { key: 0 }, [
98
+ u(n(e.value.type) + " " + n(F(e.value.items) || e.value.items.type) + "[] ", 1)
99
+ ], 64)) : (l(), m(y, { key: 1 }, [
100
+ u(n(T.value) + " " + n((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
101
+ ], 64))
122
102
  ];
123
103
  }),
124
104
  _: 1
125
- }),
126
- e.value.minLength ? (l(), o(m, { key: 0 }, {
127
- prefix: a(() => t[6] || (t[6] = [
128
- r("min:")
105
+ })) : i("", !0),
106
+ e.value.minItems || e.value.maxItems ? (l(), d(o, { key: 1 }, {
107
+ default: a(() => [
108
+ u(n(e.value.minItems) + "" + n(e.value.maxItems), 1)
109
+ ]),
110
+ _: 1
111
+ })) : i("", !0),
112
+ e.value.minLength ? (l(), d(o, { key: 2 }, {
113
+ prefix: a(() => t[3] || (t[3] = [
114
+ u("min:")
129
115
  ])),
130
116
  default: a(() => [
131
- r(" " + n(e.value.minLength), 1)
117
+ u(" " + n(e.value.minLength), 1)
132
118
  ]),
133
119
  _: 1
134
- })) : u("", !0),
135
- e.value.maxLength ? (l(), o(m, { key: 1 }, {
136
- prefix: a(() => t[7] || (t[7] = [
137
- r("max:")
120
+ })) : i("", !0),
121
+ e.value.maxLength ? (l(), d(o, { key: 3 }, {
122
+ prefix: a(() => t[4] || (t[4] = [
123
+ u("max:")
138
124
  ])),
139
125
  default: a(() => [
140
- r(" " + n(e.value.maxLength), 1)
126
+ u(" " + n(e.value.maxLength), 1)
141
127
  ]),
142
128
  _: 1
143
- })) : u("", !0),
144
- e.value.uniqueItems ? (l(), o(m, { key: 2 }, {
145
- default: a(() => t[8] || (t[8] = [
146
- r(" unique! ")
129
+ })) : i("", !0),
130
+ e.value.uniqueItems ? (l(), d(o, { key: 4 }, {
131
+ default: a(() => t[5] || (t[5] = [
132
+ u(" unique! ")
147
133
  ])),
148
134
  _: 1
149
- })) : u("", !0),
150
- e.value.format ? (l(), o(m, { key: 3 }, {
135
+ })) : i("", !0),
136
+ e.value.format ? (l(), d(o, { key: 5 }, {
151
137
  default: a(() => [
152
- p(B, null, {
153
- default: a(() => t[9] || (t[9] = [
154
- r("Format:")
138
+ v(b, null, {
139
+ default: a(() => t[6] || (t[6] = [
140
+ u("Format:")
155
141
  ])),
156
142
  _: 1
157
143
  }),
158
- r(" " + n(e.value.format), 1)
144
+ u(" " + n(e.value.format), 1)
159
145
  ]),
160
146
  _: 1
161
- })) : u("", !0),
162
- e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (l(), o(m, { key: 4 }, {
163
- prefix: a(() => t[10] || (t[10] = [
164
- r("greater than:")
147
+ })) : i("", !0),
148
+ e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (l(), d(o, { key: 6 }, {
149
+ prefix: a(() => t[7] || (t[7] = [
150
+ u("greater than:")
165
151
  ])),
166
152
  default: a(() => [
167
- r(" " + n(e.value.minimum), 1)
153
+ u(" " + n(e.value.minimum), 1)
168
154
  ]),
169
155
  _: 1
170
- })) : u("", !0),
171
- e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (l(), o(m, { key: 5 }, {
172
- prefix: a(() => t[11] || (t[11] = [
173
- r("min:")
156
+ })) : i("", !0),
157
+ e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (l(), d(o, { key: 7 }, {
158
+ prefix: a(() => t[8] || (t[8] = [
159
+ u("min:")
174
160
  ])),
175
161
  default: a(() => [
176
- r(" " + n(e.value.minimum), 1)
162
+ u(" " + n(e.value.minimum), 1)
177
163
  ]),
178
164
  _: 1
179
- })) : u("", !0),
180
- e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (l(), o(m, { key: 6 }, {
181
- prefix: a(() => t[12] || (t[12] = [
182
- r("less than:")
165
+ })) : i("", !0),
166
+ e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (l(), d(o, { key: 8 }, {
167
+ prefix: a(() => t[9] || (t[9] = [
168
+ u("less than:")
183
169
  ])),
184
170
  default: a(() => [
185
- r(" " + n(e.value.maximum), 1)
171
+ u(" " + n(e.value.maximum), 1)
186
172
  ]),
187
173
  _: 1
188
- })) : u("", !0),
189
- e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (l(), o(m, { key: 7 }, {
190
- prefix: a(() => t[13] || (t[13] = [
191
- r("max:")
174
+ })) : i("", !0),
175
+ e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (l(), d(o, { key: 9 }, {
176
+ prefix: a(() => t[10] || (t[10] = [
177
+ u("max:")
192
178
  ])),
193
179
  default: a(() => [
194
- r(" " + n(e.value.maximum), 1)
180
+ u(" " + n(e.value.maximum), 1)
195
181
  ]),
196
182
  _: 1
197
- })) : u("", !0),
198
- e.value.pattern ? (l(), o(m, {
199
- key: 8,
183
+ })) : i("", !0),
184
+ e.value.pattern ? (l(), d(o, {
185
+ key: 10,
200
186
  code: "",
201
187
  truncate: ""
202
188
  }, {
203
189
  default: a(() => [
204
- p(B, null, {
205
- default: a(() => t[14] || (t[14] = [
206
- r("Pattern:")
190
+ v(b, null, {
191
+ default: a(() => t[11] || (t[11] = [
192
+ u("Pattern:")
207
193
  ])),
208
194
  _: 1
209
195
  }),
210
- r(" " + n(e.value.pattern), 1)
196
+ u(" " + n(e.value.pattern), 1)
211
197
  ]),
212
198
  _: 1
213
- })) : u("", !0),
214
- e.$props.enum ? (l(), o(m, { key: 9 }, {
215
- default: a(() => t[15] || (t[15] = [
216
- r("enum")
199
+ })) : i("", !0),
200
+ e.$props.enum ? (l(), d(o, { key: 11 }, {
201
+ default: a(() => t[12] || (t[12] = [
202
+ u("enum")
217
203
  ])),
218
204
  _: 1
219
- })) : u("", !0),
220
- e.value.default !== void 0 ? (l(), o(m, {
221
- key: 10,
205
+ })) : i("", !0),
206
+ e.value.default !== void 0 ? (l(), d(o, {
207
+ key: 12,
222
208
  truncate: ""
223
209
  }, {
210
+ prefix: a(() => t[13] || (t[13] = [
211
+ u("default:")
212
+ ])),
213
+ default: a(() => [
214
+ u(" " + n($(e.value)), 1)
215
+ ]),
216
+ _: 1
217
+ })) : i("", !0)
218
+ ], 64)) : i("", !0),
219
+ e.additional ? (l(), m("div", K, [
220
+ (p = e.value) != null && p["x-additionalPropertiesName"] ? (l(), m(y, { key: 0 }, [
221
+ u(n(e.value["x-additionalPropertiesName"]), 1)
222
+ ], 64)) : (l(), m(y, { key: 1 }, [
223
+ u("additional properties")
224
+ ], 64))
225
+ ])) : i("", !0),
226
+ e.pattern ? (l(), m("div", Q, [
227
+ v(g(O), null, {
228
+ default: a(() => t[14] || (t[14] = [
229
+ u("pattern")
230
+ ])),
231
+ _: 1
232
+ })
233
+ ])) : i("", !0),
234
+ (k = e.value) != null && k.deprecated ? (l(), m("div", U, [
235
+ v(g(O), null, {
236
+ default: a(() => t[15] || (t[15] = [
237
+ u("deprecated")
238
+ ])),
239
+ _: 1
240
+ })
241
+ ])) : i("", !0),
242
+ g(B)(N.value) ? (l(), m("div", W, [
243
+ v(o, { truncate: "" }, {
224
244
  prefix: a(() => t[16] || (t[16] = [
225
- r("default:")
245
+ u("const:")
226
246
  ])),
227
247
  default: a(() => [
228
- r(" " + n($(e.value)), 1)
248
+ u(" " + n(N.value), 1)
229
249
  ]),
230
250
  _: 1
231
- })) : u("", !0)
232
- ], 64)) : (l(), i(s, { key: 6 }, [
233
- ((P = e.value) == null ? void 0 : P.nullable) === !0 ? (l(), o(m, { key: 0 }, {
251
+ })
252
+ ])) : (l(), m(y, { key: 6 }, [
253
+ ((S = e.value) == null ? void 0 : S.nullable) === !0 ? (l(), d(o, { key: 0 }, {
234
254
  default: a(() => t[17] || (t[17] = [
235
- r(" nullable ")
255
+ u(" nullable ")
236
256
  ])),
237
257
  _: 1
238
- })) : u("", !0)
258
+ })) : i("", !0)
239
259
  ], 64)),
240
- (j = e.value) != null && j.writeOnly ? (l(), i("div", X, " write-only ")) : (I = e.value) != null && I.readOnly ? (l(), i("div", Y, " read-only ")) : u("", !0),
241
- e.required ? (l(), i("div", Z, " required ")) : u("", !0),
242
- e.withExamples ? (l(), o(R, {
260
+ (q = e.value) != null && q.writeOnly ? (l(), m("div", X, " write-only ")) : (w = e.value) != null && w.readOnly ? (l(), m("div", Y, " read-only ")) : i("", !0),
261
+ e.required ? (l(), m("div", Z, " required ")) : i("", !0),
262
+ e.withExamples ? (l(), d(R, {
243
263
  key: 10,
244
- examples: (M = e.value) == null ? void 0 : M.examples,
245
- example: ((V = e.value) == null ? void 0 : V.example) || ((C = (A = e.value) == null ? void 0 : A.items) == null ? void 0 : C.example),
246
- "discriminator-type": g(O)
247
- }, null, 8, ["examples", "example", "discriminator-type"])) : u("", !0)
264
+ examples: (P = e.value) == null ? void 0 : P.examples,
265
+ example: ((V = e.value) == null ? void 0 : V.example) || ((I = (j = e.value) == null ? void 0 : j.items) == null ? void 0 : I.example)
266
+ }, null, 8, ["examples", "example"])) : i("", !0)
248
267
  ]);
249
268
  };
250
269
  }
@@ -7,6 +7,6 @@ type SchemaObject = OpenAPI.SchemaObject;
7
7
  * @param schemas - Array of OpenAPI schema objects to merge
8
8
  * @returns Merged schema object
9
9
  */
10
- export declare function mergeAllOfSchemas(schemas: SchemaObject[]): SchemaObject;
10
+ export declare function mergeAllOfSchemas(schemas: SchemaObject[], depth?: number): SchemaObject;
11
11
  export {};
12
12
  //# sourceMappingURL=merge-all-of-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-all-of-schemas.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/merge-all-of-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;AAExC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,CAwCvE"}
1
+ {"version":3,"file":"merge-all-of-schemas.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/merge-all-of-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;AAQxC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,SAAI,GAAG,YAAY,CA4ClF"}
@@ -1,75 +1,85 @@
1
- function f(i) {
2
- return !Array.isArray(i) || i.length === 0 ? {} : i.reduce((p, r) => {
1
+ function o(f, t = 0) {
2
+ return t >= 20 || !Array.isArray(f) || f.length === 0 ? {} : f.reduce((p, r) => {
3
3
  if (!r || typeof r != "object")
4
4
  return p;
5
5
  if (r.allOf) {
6
- const t = f(r.allOf);
7
- return f([p, t]);
6
+ const i = o(r.allOf, t + 1);
7
+ return o([p, i], t + 1);
8
8
  }
9
9
  const e = typeof p == "object" ? { ...p } : {};
10
- if (r.properties && (e.properties = s(e.properties || {}, r.properties)), r.items) {
10
+ if (r.properties && (e.properties = n(e.properties || {}, r.properties, t + 1)), r.items) {
11
11
  if (r.type === "array")
12
- e.items = d(e.items || {}, r.items);
12
+ e.items = O(e.items || {}, r.items, t + 1);
13
13
  else if (r.type === "object" && r.items.allOf) {
14
- const t = f(r.items.allOf);
15
- e.properties = s(e.properties || {}, t.properties || {});
14
+ const i = o(r.items.allOf, t + 1);
15
+ e.properties = n(
16
+ e.properties || {},
17
+ i.properties || {},
18
+ t + 1
19
+ );
16
20
  }
17
21
  }
18
- return l(e, r);
22
+ return A(e, r, t + 1);
19
23
  }, {});
20
24
  }
21
- function s(i, p) {
22
- const r = typeof i == "object" ? { ...i } : {};
23
- return Object.entries(p).forEach(([e, t]) => {
24
- var o;
25
- if (!t || typeof t != "object") {
26
- r[e] = t;
25
+ function n(f, t, p = 0) {
26
+ if (p >= 20)
27
+ return f;
28
+ const r = typeof f == "object" ? { ...f } : {};
29
+ return Object.entries(t).forEach(([e, i]) => {
30
+ var s;
31
+ if (!i || typeof i != "object") {
32
+ r[e] = i;
27
33
  return;
28
34
  }
29
35
  if (!r[e]) {
30
- t.type === "array" && ((o = t.items) != null && o.allOf) ? r[e] = {
31
- ...t,
32
- items: f(t.items.allOf)
33
- } : t.allOf ? r[e] = f(t.allOf) : r[e] = t;
36
+ i.type === "array" && ((s = i.items) != null && s.allOf) ? r[e] = {
37
+ ...i,
38
+ items: o(i.items.allOf, p + 1)
39
+ } : i.allOf ? r[e] = o(i.allOf, p + 1) : r[e] = i;
34
40
  return;
35
41
  }
36
- if (t.allOf)
37
- r[e] = f([r[e], ...t.allOf]);
38
- else if (t.type === "array" && t.items)
42
+ if (i.allOf)
43
+ r[e] = o([r[e], ...i.allOf], p + 1);
44
+ else if (i.type === "array" && i.items)
39
45
  r[e] = {
40
46
  ...r[e],
41
47
  type: "array",
42
- items: d(r[e].items || {}, t.items)
48
+ items: O(r[e].items || {}, i.items, p + 1)
43
49
  };
44
50
  else {
45
- const n = r[e].properties || t.properties ? s(r[e].properties || {}, t.properties || {}) : void 0;
51
+ const l = r[e].properties || i.properties ? n(r[e].properties || {}, i.properties || {}, p + 1) : void 0;
46
52
  r[e] = {
47
53
  ...r[e],
48
- ...t
49
- }, n && (r[e].properties = n);
54
+ ...i
55
+ }, l && (r[e].properties = l);
50
56
  }
51
57
  }), r;
52
58
  }
53
- function d(i, p) {
54
- if (i.allOf || p.allOf) {
55
- const e = [...i.allOf || [i], ...p.allOf || [p]];
56
- return f(e);
59
+ function O(f, t, p = 0) {
60
+ if (p >= 20)
61
+ return f;
62
+ if (f.allOf || t.allOf) {
63
+ const e = [...f.allOf || [f], ...t.allOf || [t]];
64
+ return o(e, p + 1);
57
65
  }
58
66
  const r = {
59
- ...i,
60
- ...p
67
+ ...f,
68
+ ...t
61
69
  };
62
- return (r.properties || p.properties) && (r.properties = s(r.properties || {}, p.properties || {})), r;
70
+ return (r.properties || t.properties) && (r.properties = n(r.properties || {}, t.properties || {}, p + 1)), r;
63
71
  }
64
- const l = (i, p) => {
65
- const r = typeof i == "object" ? { ...i } : {};
66
- return p.required && Array.isArray(p.required) && (r.required = [...i.required || [], ...p.required]), p.type && !i.type && (r.type = p.type), p.description && !i.description && (r.description = p.description), ["oneOf", "anyOf"].forEach((e) => {
67
- const t = p[e];
68
- t && t.forEach((o) => {
69
- o.properties && (r.properties = s(r.properties || {}, o.properties));
72
+ const A = (f, t, p = 0) => {
73
+ if (p >= 20)
74
+ return f;
75
+ const r = typeof f == "object" ? { ...f } : {};
76
+ return t.required && Array.isArray(t.required) && (r.required = [...f.required || [], ...t.required]), t.type && !f.type && (r.type = t.type), t.description && !f.description && (r.description = t.description), ["oneOf", "anyOf"].forEach((e) => {
77
+ const i = t[e];
78
+ i && i.forEach((s) => {
79
+ s.properties && (r.properties = n(r.properties || {}, s.properties, p + 1));
70
80
  });
71
81
  }), r;
72
82
  };
73
83
  export {
74
- f as mergeAllOfSchemas
84
+ o as mergeAllOfSchemas
75
85
  };
@@ -1,7 +1,8 @@
1
1
  import type { UnknownObject } from '@scalar/types/utils';
2
- export declare const discriminators: string[];
2
+ import type { CompositionKeyword } from './schema-composition.js';
3
+ export declare const compositions: CompositionKeyword[];
3
4
  /**
4
- * Optimize the value by removing nulls from discriminators.
5
+ * Optimize the value by removing nulls from compositions.
5
6
  */
6
7
  export declare function optimizeValueForDisplay(value: UnknownObject | undefined): Record<string, any> | undefined;
7
8
  //# sourceMappingURL=optimizeValueForDisplay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,eAAO,MAAM,cAAc,UAAqC,CAAA;AAEhE;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAqDzG"}
1
+ {"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAqDzG"}
@@ -1,20 +1,20 @@
1
1
  const c = ["oneOf", "anyOf", "allOf", "not"];
2
- function y(o) {
2
+ function y(i) {
3
3
  var s;
4
- if (!o || typeof o != "object")
5
- return o;
6
- let r = { ...o };
7
- const t = c.find((i) => r == null ? void 0 : r[i]);
8
- if (!t || t === "not")
9
- return r;
10
- const f = r == null ? void 0 : r[t];
4
+ if (!i || typeof i != "object")
5
+ return i;
6
+ let t = { ...i };
7
+ const r = c.find((o) => t == null ? void 0 : t[o]);
8
+ if (!r || r === "not")
9
+ return t;
10
+ const f = t == null ? void 0 : t[r];
11
11
  if (!Array.isArray(f))
12
- return r;
13
- f.some((i) => i.type === "null") && (r.nullable = !0);
14
- const n = f.filter((i) => i.type !== "null");
15
- return n.length === 1 && (r != null && r[t]) ? (r = { ...r, ...n[0] }, r == null || delete r[t], r) : (Array.isArray(r == null ? void 0 : r[t]) && ((s = r == null ? void 0 : r[t]) == null ? void 0 : s.length) > 1 && (r[t] = n), r);
12
+ return t;
13
+ f.some((o) => o.type === "null") && (t.nullable = !0);
14
+ const n = f.filter((o) => o.type !== "null");
15
+ return n.length === 1 && (t != null && t[r]) ? (t = { ...t, ...n[0] }, t == null || delete t[r], t) : (Array.isArray(t == null ? void 0 : t[r]) && ((s = t == null ? void 0 : t[r]) == null ? void 0 : s.length) > 1 && (t[r] = n), t);
16
16
  }
17
17
  export {
18
- c as discriminators,
18
+ c as compositions,
19
19
  y as optimizeValueForDisplay
20
20
  };
@@ -0,0 +1,12 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export type CompositionMapping = {
3
+ [key: string]: string;
4
+ };
5
+ /** Composition */
6
+ export type CompositionKeyword = 'oneOf' | 'anyOf' | 'allOf' | 'not';
7
+ export declare const compositions: CompositionKeyword[];
8
+ /** Get composition mapping from schema - used in testing */
9
+ export declare function getCompositionSchemaMapping(schema: OpenAPIV3_1.SchemaObject, composition: CompositionKeyword): CompositionMapping | undefined;
10
+ /** Check if schema has a composition keyword */
11
+ export declare function hasComposition(schema: OpenAPIV3_1.SchemaObject): boolean;
12
+ //# sourceMappingURL=schema-composition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-composition.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,CAAA;AAED,kBAAkB;AAClB,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAA;AAEpE,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF,4DAA4D;AAC5D,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,WAAW,CAAC,YAAY,EAChC,WAAW,EAAE,kBAAkB,GAC9B,kBAAkB,GAAG,SAAS,CAuBhC;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,OAAO,CAExE"}
@@ -0,0 +1,8 @@
1
+ const t = ["oneOf", "anyOf", "allOf", "not"];
2
+ function i(o) {
3
+ return t.some((n) => o[n] !== void 0);
4
+ }
5
+ export {
6
+ t as compositions,
7
+ i as hasComposition
8
+ };
@@ -0,0 +1,4 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ /** Get discriminator property name from schema */
3
+ export declare function getDiscriminatorPropertyName(schema: OpenAPIV3_1.SchemaObject): string | undefined;
4
+ //# sourceMappingURL=schema-discriminator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-discriminator.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-discriminator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,kDAAkD;AAClD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,MAAM,GAAG,SAAS,CAEjG"}