@scalar/api-reference 1.31.3 → 1.31.4

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 (127) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/browser/standalone.js +9287 -9267
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  6. package/dist/components/ApiReferenceLayout.vue2.js +69 -71
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +1 -1
  9. package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Introduction/Description.vue.js +2 -2
  11. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Lazy/Loading.vue.js +1 -1
  13. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Schema/SchemaComposition.vue.js +81 -101
  15. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  17. package/dist/components/Content/Schema/SchemaProperty.vue2.js +114 -105
  18. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +35 -35
  19. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  20. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +17 -15
  21. package/dist/components/Content/Schema/helpers/schema-name.js +13 -21
  22. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  23. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  24. package/dist/components/Content/Tag/OperationsList.vue2.js +10 -9
  25. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
  27. package/dist/components/Content/Tag/OperationsListItem.vue2.js +29 -28
  28. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Tag/TagList.vue.js +35 -34
  30. package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -1
  31. package/dist/components/DocumentSelector/DocumentSelector.vue.js +21 -28
  32. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -20
  33. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  34. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -13
  35. package/dist/components/Section/CompactSection.vue.js +2 -2
  36. package/dist/components/Section/CompactSection.vue2.js +6 -6
  37. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  38. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  39. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  40. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  41. package/dist/components/Sidebar/SidebarElement.vue2.js +5 -5
  42. package/dist/esm.d.ts.map +1 -1
  43. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +1 -1
  44. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +1 -1
  45. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  46. package/dist/features/DocumentSource/hooks/useDocumentSource.js +11 -11
  47. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  48. package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
  49. package/dist/features/DownloadLink/DownloadLink.vue2.js +21 -21
  50. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  51. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  52. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +1 -1
  53. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  54. package/dist/features/Search/SearchButton.vue.js +2 -2
  55. package/dist/features/Search/SearchButton.vue2.js +16 -16
  56. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  57. package/dist/features/Search/SearchModal.vue.js +2 -2
  58. package/dist/features/Search/SearchModal.vue2.js +1 -1
  59. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  60. package/dist/features/Search/useSearchIndex.js +29 -28
  61. package/dist/features/sidebar/helpers/create-sidebar.d.ts +26 -0
  62. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -0
  63. package/dist/features/sidebar/hooks/useSidebar.d.ts +23 -0
  64. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -0
  65. package/dist/features/sidebar/index.d.ts +2 -0
  66. package/dist/features/sidebar/index.d.ts.map +1 -0
  67. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -0
  68. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -0
  69. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +8 -0
  70. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +1 -0
  71. package/dist/features/traverse-schema/helpers/operation-id-params.js +8 -0
  72. package/dist/features/traverse-schema/helpers/traverse-description.d.ts +9 -0
  73. package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +1 -0
  74. package/dist/features/traverse-schema/helpers/traverse-document.d.ts +16 -0
  75. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -0
  76. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +11 -0
  77. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -0
  78. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +6 -0
  79. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -0
  80. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +9 -0
  81. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -0
  82. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +6 -0
  83. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -0
  84. package/dist/features/traverse-schema/index.d.ts +4 -0
  85. package/dist/features/traverse-schema/index.d.ts.map +1 -0
  86. package/dist/features/traverse-schema/types.d.ts +51 -0
  87. package/dist/features/traverse-schema/types.d.ts.map +1 -0
  88. package/dist/helpers/parse.d.ts.map +1 -1
  89. package/dist/helpers/parse.js +16 -16
  90. package/dist/hooks/useNavState.d.ts +9 -4
  91. package/dist/hooks/useNavState.d.ts.map +1 -1
  92. package/dist/hooks/useNavState.js +31 -29
  93. package/dist/hooks/useSidebar.d.ts.map +1 -1
  94. package/dist/hooks/useSidebar.js +69 -68
  95. package/dist/index.js +1 -1
  96. package/dist/legacy/fixtures/httpRequestMethods.js +2 -6
  97. package/dist/stores/useHttpClientStore.js +9 -8
  98. package/dist/style.css +1 -1
  99. package/dist/types.d.ts +0 -1
  100. package/dist/types.d.ts.map +1 -1
  101. package/package.json +12 -11
  102. package/dist/components/HttpMethod/constants.d.ts +0 -9
  103. package/dist/components/HttpMethod/constants.d.ts.map +0 -1
  104. package/dist/components/HttpMethod/constants.js +0 -36
  105. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts +0 -4
  106. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts.map +0 -1
  107. package/dist/components/HttpMethod/utils/isRequestMethod.js +0 -7
  108. package/dist/helpers/freeze-element.d.ts +0 -11
  109. package/dist/helpers/freeze-element.d.ts.map +0 -1
  110. package/dist/helpers/freeze-element.js +0 -20
  111. package/dist/helpers/is-mac-os.d.ts +0 -5
  112. package/dist/helpers/is-mac-os.d.ts.map +0 -1
  113. package/dist/helpers/is-mac-os.js +0 -4
  114. package/dist/helpers/measure.d.ts +0 -21
  115. package/dist/helpers/measure.d.ts.map +0 -1
  116. package/dist/helpers/measure.js +0 -7
  117. package/dist/helpers/scroll-to-id.d.ts +0 -7
  118. package/dist/helpers/scroll-to-id.d.ts.map +0 -1
  119. package/dist/helpers/scroll-to-id.js +0 -21
  120. package/dist/helpers/sleep.d.ts +0 -6
  121. package/dist/helpers/sleep.d.ts.map +0 -1
  122. package/dist/helpers/sleep.js +0 -4
  123. package/dist/legacy/helpers/index.d.ts +0 -2
  124. package/dist/legacy/helpers/index.d.ts.map +0 -1
  125. package/dist/legacy/helpers/normalizeRequestMethod.d.ts +0 -6
  126. package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +0 -1
  127. package/dist/legacy/helpers/normalizeRequestMethod.js +0 -10
@@ -1,35 +1,35 @@
1
- import { defineComponent as W, computed as d, inject as Y, createBlock as u, openBlock as n, resolveDynamicComponent as _, normalizeClass as z, withCtx as y, createCommentVNode as r, createElementBlock as o, createVNode as s, createSlots as x, createTextVNode as B, toDisplayString as h, unref as m, Fragment as f, renderList as M, createElementVNode as g } from "vue";
2
- import { Disclosure as ee, DisclosurePanel as ie, DisclosureButton as ne } from "@headlessui/vue";
3
- import { ScalarMarkdown as E, ScalarIcon as ae } from "@scalar/components";
4
- import { optimizeValueForDisplay as te, compositions as oe } from "./helpers/optimizeValueForDisplay.js";
1
+ import { defineComponent as _, computed as s, inject as x, createBlock as u, openBlock as t, resolveDynamicComponent as ee, normalizeClass as U, withCtx as y, createCommentVNode as l, createElementBlock as o, createVNode as m, createSlots as ne, createTextVNode as B, toDisplayString as h, unref as p, Fragment as f, renderList as M, createElementVNode as v } from "vue";
2
+ import { Disclosure as ie, DisclosurePanel as te, DisclosureButton as ae } from "@headlessui/vue";
3
+ import { ScalarMarkdown as j, ScalarIcon as oe } from "@scalar/components";
4
+ import { optimizeValueForDisplay as re, compositions as se } from "./helpers/optimizeValueForDisplay.js";
5
5
  import { DISCRIMINATOR_CONTEXT as le } from "../../../hooks/useDiscriminator.js";
6
- import A from "./Schema.vue.js";
7
- import R from "./SchemaComposition.vue.js";
8
- import re from "./SchemaDiscriminator.vue.js";
9
- import se from "./SchemaPropertyHeading.vue.js";
10
- import me from "../../SpecificationExtension/SpecificationExtension.vue.js";
11
- const pe = {
6
+ import $ from "./Schema.vue.js";
7
+ import z from "./SchemaComposition.vue.js";
8
+ import me from "./SchemaDiscriminator.vue.js";
9
+ import pe from "./SchemaPropertyHeading.vue.js";
10
+ import de from "../../SpecificationExtension/SpecificationExtension.vue.js";
11
+ const ce = {
12
12
  key: 1,
13
13
  class: "property-description"
14
- }, de = {
14
+ }, ue = {
15
15
  key: 2,
16
16
  class: "property-description"
17
- }, ce = {
17
+ }, ye = {
18
18
  key: 3,
19
19
  class: "property-enum"
20
- }, ue = {
20
+ }, he = {
21
21
  key: 0,
22
22
  class: "property-list"
23
- }, ye = { class: "property-heading" }, he = { class: "property-name" }, fe = { class: "property-description" }, ve = {
23
+ }, fe = { class: "property-heading" }, ge = { class: "property-name" }, ve = { class: "property-description" }, be = {
24
24
  key: 1,
25
25
  class: "property-enum-values"
26
- }, ge = { class: "property-enum-value-label" }, be = { class: "property-enum-value-label" }, ke = {
26
+ }, ke = { class: "property-enum-value-label" }, Ne = { class: "property-enum-value-label" }, Me = {
27
27
  key: 4,
28
28
  class: "children"
29
- }, Ne = {
29
+ }, Se = {
30
30
  key: 0,
31
31
  class: "children"
32
- }, Ce = /* @__PURE__ */ W({
32
+ }, we = /* @__PURE__ */ _({
33
33
  __name: "SchemaProperty",
34
34
  props: {
35
35
  is: {},
@@ -52,7 +52,7 @@ const pe = {
52
52
  },
53
53
  emits: ["update:modelValue"],
54
54
  setup(L, { emit: Z }) {
55
- const S = L, X = Z, H = {
55
+ const S = L, X = Z, O = {
56
56
  integer: {
57
57
  _default: "Integer numbers.",
58
58
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -65,55 +65,64 @@ const pe = {
65
65
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
66
66
  binary: "binary data, used to describe files"
67
67
  }
68
- }, D = (e, a) => a != null && a.properties || a != null && a.additionalProperties || a != null && a.patternProperties || a != null && a.allOf ? null : e || (a == null ? void 0 : a.description) || null, V = (e) => !e || !H[e.type] ? null : H[e.type][e.format || "_default"], c = (e) => {
69
- var a;
70
- return (e == null ? void 0 : e.enum) || ((a = e == null ? void 0 : e.items) == null ? void 0 : a.enum) || [];
71
- }, O = d(
72
- () => c(i.value).length > 9
73
- ), j = d(() => O.value ? 5 : 9), G = d(
74
- () => c(i.value).slice(0, j.value)
75
- ), J = d(
76
- () => c(i.value).slice(j.value)
77
- ), i = d(() => te(S.value)), p = Y(le, null), l = d(() => {
68
+ }, D = (e, i) => i != null && i.properties || i != null && i.additionalProperties || i != null && i.patternProperties || i != null && i.allOf ? null : e || (i == null ? void 0 : i.description) || null, C = (e) => !e || !O[e.type] ? null : O[e.type][e.format || "_default"], c = (e) => {
69
+ var i;
70
+ return (e == null ? void 0 : e.enum) || ((i = e == null ? void 0 : e.items) == null ? void 0 : i.enum) || [];
71
+ }, E = s(
72
+ () => c(n.value).length > 9
73
+ ), H = s(() => E.value ? 5 : 9), G = s(
74
+ () => c(n.value).slice(0, H.value)
75
+ ), J = s(
76
+ () => c(n.value).slice(H.value)
77
+ ), n = s(() => re(S.value)), d = x(le, null), r = s(() => {
78
78
  var e;
79
- return (e = p == null ? void 0 : p.value) != null && e.mergedSchema ? p.value.mergedSchema : i.value;
80
- }), K = d(() => {
79
+ return (e = d == null ? void 0 : d.value) != null && e.mergedSchema ? d.value.mergedSchema : n.value;
80
+ }), K = s(() => {
81
81
  var e;
82
- return ((e = p == null ? void 0 : p.value) == null ? void 0 : e.selectedType) || (S.discriminatorMapping ? Object.keys(S.discriminatorMapping)[0] : "");
83
- }), Q = (e, a, b, k, N) => a || b || k || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || N, P = (e) => {
82
+ return ((e = d == null ? void 0 : d.value) == null ? void 0 : e.selectedType) || (S.discriminatorMapping ? Object.keys(S.discriminatorMapping)[0] : "");
83
+ }), Q = (e, i, b, k, N) => i || b || k || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || N, P = (e) => {
84
84
  X("update:modelValue", e);
85
- };
86
- return (e, a) => {
85
+ }, V = s(() => {
86
+ const e = n.value;
87
+ if (!(e != null && e.items) || typeof e.items != "object")
88
+ return !1;
89
+ const i = e.items;
90
+ return "type" in i && ["object"].includes(i.type) || "$ref" in i || "discriminator" in i || "allOf" in i || "oneOf" in i || "anyOf" in i;
91
+ }), W = (e) => {
92
+ const i = n.value;
93
+ return !(i != null && i.items) || typeof i.items != "object" || !(e in i.items) ? !1 : !V.value;
94
+ }, Y = s(() => V.value);
95
+ return (e, i) => {
87
96
  var b;
88
- return n(), u(_(e.is ?? "li"), {
89
- class: z(["property", [
90
- (D(e.description, i.value), ""),
97
+ return t(), u(ee(e.is ?? "li"), {
98
+ class: U(["property", [
99
+ (D(e.description, n.value), ""),
91
100
  `property--level-${e.level}`,
92
101
  {
93
102
  "property--compact": e.compact,
94
- "property--deprecated": (b = i.value) == null ? void 0 : b.deprecated
103
+ "property--deprecated": (b = n.value) == null ? void 0 : b.deprecated
95
104
  }
96
105
  ]])
97
106
  }, {
98
107
  default: y(() => {
99
- var k, N, C, w, I, T, q, F, U;
108
+ var k, N, I, w, A, R, T;
100
109
  return [
101
110
  Q(
102
- i.value,
111
+ n.value,
103
112
  e.name,
104
113
  e.additional,
105
114
  e.pattern,
106
115
  e.required
107
- ) ? (n(), u(se, {
116
+ ) ? (t(), u(pe, {
108
117
  key: 0,
109
118
  additional: e.additional,
110
- enum: c(i.value).length > 0,
119
+ enum: c(n.value).length > 0,
111
120
  pattern: e.pattern,
112
121
  required: e.required,
113
- value: i.value,
122
+ value: n.value,
114
123
  schemas: e.schemas,
115
124
  hideModelNames: e.hideModelNames
116
- }, x({ _: 2 }, [
125
+ }, ne({ _: 2 }, [
117
126
  e.name ? {
118
127
  name: "name",
119
128
  fn: y(() => [
@@ -121,137 +130,137 @@ const pe = {
121
130
  ]),
122
131
  key: "0"
123
132
  } : void 0,
124
- (k = i.value) != null && k.example ? {
133
+ (k = n.value) != null && k.example ? {
125
134
  name: "example",
126
135
  fn: y(() => [
127
- B(" Example: " + h(i.value.example), 1)
136
+ B(" Example: " + h(n.value.example), 1)
128
137
  ]),
129
138
  key: "1"
130
139
  } : void 0
131
- ]), 1032, ["additional", "enum", "pattern", "required", "value", "schemas", "hideModelNames"])) : r("", !0),
132
- D(e.description, i.value) ? (n(), o("div", pe, [
133
- s(m(E), {
134
- value: D(e.description, i.value)
140
+ ]), 1032, ["additional", "enum", "pattern", "required", "value", "schemas", "hideModelNames"])) : l("", !0),
141
+ D(e.description, n.value) ? (t(), o("div", ce, [
142
+ m(p(j), {
143
+ value: D(e.description, n.value)
135
144
  }, null, 8, ["value"])
136
- ])) : V(i.value) ? (n(), o("div", de, [
137
- s(m(E), {
138
- value: V(i.value) || ""
145
+ ])) : C(n.value) ? (t(), o("div", ue, [
146
+ m(p(j), {
147
+ value: C(n.value) || ""
139
148
  }, null, 8, ["value"])
140
- ])) : r("", !0),
141
- ((N = c(i.value)) == null ? void 0 : N.length) > 0 ? (n(), o("div", ce, [
142
- Array.isArray((C = i.value) == null ? void 0 : C["x-enumDescriptions"]) ? (n(), o("div", ue, [
143
- (n(!0), o(f, null, M(c(i.value), (t) => (n(), o("div", {
144
- key: t,
149
+ ])) : l("", !0),
150
+ ((N = c(n.value)) == null ? void 0 : N.length) > 0 ? (t(), o("div", ye, [
151
+ Array.isArray((I = n.value) == null ? void 0 : I["x-enumDescriptions"]) ? (t(), o("div", he, [
152
+ (t(!0), o(f, null, M(c(n.value), (a) => (t(), o("div", {
153
+ key: a,
145
154
  class: "property"
146
155
  }, [
147
- g("div", ye, [
148
- g("div", he, h(t), 1)
156
+ v("div", fe, [
157
+ v("div", ge, h(a), 1)
149
158
  ]),
150
- g("div", fe, [
151
- s(m(E), {
152
- value: i.value["x-enumDescriptions"][t]
159
+ v("div", ve, [
160
+ m(p(j), {
161
+ value: n.value["x-enumDescriptions"][a]
153
162
  }, null, 8, ["value"])
154
163
  ])
155
164
  ]))), 128))
156
- ])) : (n(), o("ul", ve, [
157
- (n(!0), o(f, null, M(G.value, (t) => (n(), o("li", {
158
- key: t,
165
+ ])) : (t(), o("ul", be, [
166
+ (t(!0), o(f, null, M(G.value, (a) => (t(), o("li", {
167
+ key: a,
159
168
  class: "property-enum-value"
160
169
  }, [
161
- g("span", ge, h(t), 1)
170
+ v("span", ke, h(a), 1)
162
171
  ]))), 128)),
163
- O.value ? (n(), u(m(ee), { key: 0 }, {
164
- default: y(({ open: t }) => [
165
- s(m(ie), null, {
172
+ E.value ? (t(), u(p(ie), { key: 0 }, {
173
+ default: y(({ open: a }) => [
174
+ m(p(te), null, {
166
175
  default: y(() => [
167
- (n(!0), o(f, null, M(J.value, (v) => (n(), o("li", {
168
- key: v,
176
+ (t(!0), o(f, null, M(J.value, (g) => (t(), o("li", {
177
+ key: g,
169
178
  class: "property-enum-value"
170
179
  }, [
171
- g("span", be, h(v), 1)
180
+ v("span", Ne, h(g), 1)
172
181
  ]))), 128))
173
182
  ]),
174
183
  _: 1
175
184
  }),
176
- s(m(ne), { class: "enum-toggle-button" }, {
185
+ m(p(ae), { class: "enum-toggle-button" }, {
177
186
  default: y(() => [
178
- s(m(ae), {
179
- class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": t }]),
187
+ m(p(oe), {
188
+ class: U(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": a }]),
180
189
  icon: "Add",
181
190
  size: "sm"
182
191
  }, null, 8, ["class"]),
183
- B(" " + h(t ? "Hide values" : "Show all values"), 1)
192
+ B(" " + h(a ? "Hide values" : "Show all values"), 1)
184
193
  ]),
185
194
  _: 2
186
195
  }, 1024)
187
196
  ]),
188
197
  _: 1
189
- })) : r("", !0)
198
+ })) : l("", !0)
190
199
  ]))
191
- ])) : r("", !0),
192
- ((w = i.value) == null ? void 0 : w.type) === "object" && ((I = i.value) != null && I.properties || (T = i.value) != null && T.additionalProperties) ? (n(), o("div", ke, [
193
- s(A, {
200
+ ])) : l("", !0),
201
+ ((w = n.value) == null ? void 0 : w.type) === "object" && ((A = n.value) != null && A.properties || (R = n.value) != null && R.additionalProperties) ? (t(), o("div", Me, [
202
+ m($, {
194
203
  compact: e.compact,
195
204
  level: e.level + 1,
196
205
  name: e.name,
197
206
  noncollapsible: e.noncollapsible,
198
- value: l.value,
199
- resolvedSchema: l.value,
207
+ value: r.value,
208
+ resolvedSchema: r.value,
200
209
  discriminatorMapping: e.discriminatorMapping,
201
210
  discriminatorPropertyName: e.discriminatorPropertyName,
202
211
  schemas: e.schemas,
203
212
  "onUpdate:modelValue": P
204
213
  }, null, 8, ["compact", "level", "name", "noncollapsible", "value", "resolvedSchema", "discriminatorMapping", "discriminatorPropertyName", "schemas"])
205
- ])) : r("", !0),
206
- (q = i.value) != null && q.items && typeof i.value.items == "object" ? (n(), o(f, { key: 5 }, [
207
- "type" in i.value.items && ["object"].includes((U = (F = i.value) == null ? void 0 : F.items) == null ? void 0 : U.type) || "$ref" in i.value.items || "discriminator" in i.value.items || "allOf" in i.value.items || "oneOf" in i.value.items || "anyOf" in i.value.items ? (n(), o("div", Ne, [
208
- s(A, {
214
+ ])) : l("", !0),
215
+ (T = n.value) != null && T.items && typeof n.value.items == "object" ? (t(), o(f, { key: 5 }, [
216
+ Y.value ? (t(), o("div", Se, [
217
+ m($, {
209
218
  compact: e.compact,
210
219
  level: e.level + 1,
211
220
  name: e.name,
212
221
  noncollapsible: e.noncollapsible,
213
- value: l.value && typeof l.value == "object" && "items" in l.value ? l.value.items : i.value.items,
214
- resolvedSchema: l.value && typeof l.value == "object" && "items" in l.value ? l.value.items : i.value.items,
222
+ value: r.value && typeof r.value == "object" && "items" in r.value ? r.value.items : n.value.items,
223
+ resolvedSchema: r.value && typeof r.value == "object" && "items" in r.value ? r.value.items : n.value.items,
215
224
  discriminatorMapping: e.discriminatorMapping,
216
225
  discriminatorPropertyName: e.discriminatorPropertyName,
217
226
  schemas: e.schemas,
218
227
  "onUpdate:modelValue": P
219
228
  }, null, 8, ["compact", "level", "name", "noncollapsible", "value", "resolvedSchema", "discriminatorMapping", "discriminatorPropertyName", "schemas"])
220
- ])) : r("", !0)
221
- ], 64)) : r("", !0),
222
- (n(!0), o(f, null, M(m(oe), (t) => {
223
- var v, $;
224
- return n(), o(f, { key: t }, [
225
- (v = i.value) != null && v[t] ? (n(), u(R, {
229
+ ])) : l("", !0)
230
+ ], 64)) : l("", !0),
231
+ (t(!0), o(f, null, M(p(se), (a) => {
232
+ var g, q, F;
233
+ return t(), o(f, { key: a }, [
234
+ (g = n.value) != null && g[a] && !((q = n.value) != null && q.items && typeof a == "string" && typeof n.value.items == "object" && a in n.value.items) ? (t(), u(z, {
226
235
  key: 0,
227
236
  compact: e.compact,
228
- composition: t,
237
+ composition: a,
229
238
  hideHeading: e.hideHeading,
230
239
  level: e.level,
231
240
  name: e.name,
232
241
  noncollapsible: e.noncollapsible,
233
242
  schemas: e.schemas,
234
- value: i.value
235
- }, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : ($ = i.value) != null && $.items && typeof t == "string" && typeof i.value.items == "object" && !("type" in i.value.items) && t in i.value.items ? (n(), u(R, {
243
+ value: n.value
244
+ }, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : W(a) ? (t(), u(z, {
236
245
  key: 1,
237
246
  compact: e.compact,
238
- composition: t,
247
+ composition: a,
239
248
  hideHeading: e.hideHeading,
240
249
  level: e.level,
241
250
  name: e.name,
242
251
  noncollapsible: e.noncollapsible,
243
252
  schemas: e.schemas,
244
- value: i.value.items
245
- }, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : r("", !0)
253
+ value: (F = n.value) == null ? void 0 : F.items
254
+ }, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : l("", !0)
246
255
  ], 64);
247
256
  }), 128)),
248
- e.isDiscriminator && e.discriminatorMapping && e.compact ? (n(), u(re, {
257
+ e.isDiscriminator && e.discriminatorMapping && e.compact ? (t(), u(me, {
249
258
  key: 6,
250
259
  "discriminator-mapping": e.discriminatorMapping,
251
260
  discriminator: K.value,
252
261
  "onUpdate:modelValue": P
253
- }, null, 8, ["discriminator-mapping", "discriminator"])) : r("", !0),
254
- s(m(me), { value: i.value }, null, 8, ["value"])
262
+ }, null, 8, ["discriminator-mapping", "discriminator"])) : l("", !0),
263
+ m(p(de), { value: n.value }, null, 8, ["value"])
255
264
  ];
256
265
  }),
257
266
  _: 1
@@ -260,5 +269,5 @@ const pe = {
260
269
  }
261
270
  });
262
271
  export {
263
- Ce as default
272
+ we as default
264
273
  };
@@ -1,80 +1,80 @@
1
- function o(f, t = 0) {
2
- return t >= 20 || !Array.isArray(f) || f.length === 0 ? {} : f.reduce((p, r) => {
1
+ function o(f, e = 0) {
2
+ return e >= 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 i = o(r.allOf, t + 1);
7
- return o([p, i], t + 1);
6
+ const i = o(r.allOf, e + 1);
7
+ return o([p, i], e + 1);
8
8
  }
9
- const e = typeof p == "object" ? { ...p } : {};
10
- if (r.properties && (e.properties = n(e.properties || {}, r.properties, t + 1)), r.items) {
9
+ const t = typeof p == "object" ? { ...p } : {};
10
+ if (r.properties && (t.properties = n(t.properties || {}, r.properties, e + 1)), r.items) {
11
11
  if (r.type === "array")
12
- e.items = O(e.items || {}, r.items, t + 1);
12
+ t.items = O(t.items || {}, r.items, e + 1);
13
13
  else if (r.type === "object" && r.items.allOf) {
14
- const i = o(r.items.allOf, t + 1);
15
- e.properties = n(
16
- e.properties || {},
14
+ const i = o(r.items.allOf, e + 1);
15
+ t.properties = n(
16
+ t.properties || {},
17
17
  i.properties || {},
18
- t + 1
18
+ e + 1
19
19
  );
20
20
  }
21
21
  }
22
- return A(e, r, t + 1);
22
+ return m(t, r, e + 1);
23
23
  }, {});
24
24
  }
25
- function n(f, t, p = 0) {
25
+ function n(f, e, p = 0) {
26
26
  if (p >= 20)
27
27
  return f;
28
28
  const r = typeof f == "object" ? { ...f } : {};
29
- return Object.entries(t).forEach(([e, i]) => {
29
+ return Object.entries(e).forEach(([t, i]) => {
30
30
  var s;
31
31
  if (!i || typeof i != "object") {
32
- r[e] = i;
32
+ r[t] = i;
33
33
  return;
34
34
  }
35
- if (!r[e]) {
36
- i.type === "array" && ((s = i.items) != null && s.allOf) ? r[e] = {
35
+ if (!r[t]) {
36
+ i.type === "array" && ((s = i.items) != null && s.allOf) ? r[t] = {
37
37
  ...i,
38
38
  items: o(i.items.allOf, p + 1)
39
- } : i.allOf ? r[e] = o(i.allOf, p + 1) : r[e] = i;
39
+ } : i.allOf ? r[t] = o(i.allOf, p + 1) : r[t] = i;
40
40
  return;
41
41
  }
42
42
  if (i.allOf)
43
- r[e] = o([r[e], ...i.allOf], p + 1);
43
+ r[t] = o([r[t], ...i.allOf], p + 1);
44
44
  else if (i.type === "array" && i.items)
45
- r[e] = {
46
- ...r[e],
45
+ r[t] = {
46
+ ...r[t],
47
47
  type: "array",
48
- items: O(r[e].items || {}, i.items, p + 1)
48
+ items: O(r[t].items || {}, i.items, p + 1)
49
49
  };
50
50
  else {
51
- const l = r[e].properties || i.properties ? n(r[e].properties || {}, i.properties || {}, p + 1) : void 0;
52
- r[e] = {
53
- ...r[e],
51
+ const l = r[t].properties || i.properties ? n(r[t].properties || {}, i.properties || {}, p + 1) : void 0;
52
+ r[t] = {
53
+ ...r[t],
54
54
  ...i
55
- }, l && (r[e].properties = l);
55
+ }, l && (r[t].properties = l);
56
56
  }
57
57
  }), r;
58
58
  }
59
- function O(f, t, p = 0) {
59
+ function O(f, e, p = 0) {
60
60
  if (p >= 20)
61
61
  return f;
62
- if (f.allOf || t.allOf) {
63
- const e = [...f.allOf || [f], ...t.allOf || [t]];
64
- return o(e, p + 1);
62
+ if (f.allOf || e.allOf) {
63
+ const t = [...f.allOf || [f], ...e.allOf || [e]];
64
+ return o(t, p + 1);
65
65
  }
66
66
  const r = {
67
67
  ...f,
68
- ...t
68
+ ...e
69
69
  };
70
- return (r.properties || t.properties) && (r.properties = n(r.properties || {}, t.properties || {}, p + 1)), r;
70
+ return (r.properties || e.properties) && (r.properties = n(r.properties || {}, e.properties || {}, p + 1)), r;
71
71
  }
72
- const A = (f, t, p = 0) => {
72
+ const m = (f, e, p = 0) => {
73
73
  if (p >= 20)
74
74
  return f;
75
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];
76
+ return e.required && Array.isArray(e.required) && (r.required = [...f.required || [], ...e.required]), e.type && !f.type && (r.type = e.type), e.title && !f.title && (r.title = e.title), e.name && !f.name && (r.name = e.name), e.description && !f.description && (r.description = e.description), ["oneOf", "anyOf"].forEach((t) => {
77
+ const i = e[t];
78
78
  i && i.forEach((s) => {
79
79
  s.properties && (r.properties = n(r.properties || {}, s.properties, p + 1));
80
80
  });
@@ -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;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
+ {"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;AAG9D,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,CA8DzG"}
@@ -1,20 +1,22 @@
1
- const c = ["oneOf", "anyOf", "allOf", "not"];
2
- function y(i) {
3
- var s;
1
+ import { mergeAllOfSchemas as p } from "./merge-all-of-schemas.js";
2
+ const y = ["oneOf", "anyOf", "allOf", "not"];
3
+ function m(i) {
4
+ var c;
4
5
  if (!i || typeof i != "object")
5
6
  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
- if (!Array.isArray(f))
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);
7
+ let r = { ...i };
8
+ const o = y.find((t) => r == null ? void 0 : r[t]);
9
+ if (!o || o === "not")
10
+ return r;
11
+ const n = r == null ? void 0 : r[o];
12
+ if (!Array.isArray(n))
13
+ return r;
14
+ const s = n.map((t) => t.allOf && Array.isArray(t.allOf) ? p(t.allOf) : t);
15
+ s.some((t) => t.type === "null") && (r.nullable = !0);
16
+ const f = s.filter((t) => t.type !== "null");
17
+ return f.length === 1 && (r != null && r[o]) ? (r = { ...r, ...f[0] }, r == null || delete r[o], r) : (Array.isArray(r == null ? void 0 : r[o]) && ((c = r == null ? void 0 : r[o]) == null ? void 0 : c.length) > 1 && (r[o] = f), r);
16
18
  }
17
19
  export {
18
- c as compositions,
19
- y as optimizeValueForDisplay
20
+ y as compositions,
21
+ m as optimizeValueForDisplay
20
22
  };
@@ -1,40 +1,32 @@
1
- import { stringify as o } from "flatted";
2
- function f(t, r) {
1
+ import { stringify as e } from "flatted";
2
+ function y(t, n) {
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 (r && typeof r == "object") {
10
- for (const [i, e] of Object.entries(r))
11
- if (o(e) === o(t))
12
- return i;
9
+ if (n && typeof n == "object") {
10
+ for (const [r, i] of Object.entries(n))
11
+ if (e(i) === e(t))
12
+ return r;
13
13
  }
14
14
  if ("$ref" in t) {
15
- const e = t.$ref.match(/\/([^\/]+)$/);
16
- if (e)
17
- return e[1];
15
+ const i = t.$ref.match(/\/([^\/]+)$/);
16
+ if (i)
17
+ return i[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 i = Object.keys(t);
25
- if (i.length > 0)
26
- return i[0];
24
+ const r = Object.keys(t);
25
+ if (r.length > 0)
26
+ return r[0];
27
27
  }
28
28
  return null;
29
29
  }
30
- function y(t) {
31
- return !t || ["anyOf", "oneOf", "allOf"].includes(t) ? !1 : /[A-Z]/.test(t) || /\s/.test(t) || /\(\d+\)/.test(t);
32
- }
33
- function N(t, r, i) {
34
- return t.some((n) => "$ref" in n) || t.map((n) => f(n, i)).some((n) => y(n)) ? t : r.map((n) => f(n, i)).some((n) => y(n)) ? r : t;
35
- }
36
30
  export {
37
- N as getCompositionDisplay,
38
- f as getModelNameFromSchema,
39
- y as hasName
31
+ y as getModelNameFromSchema
40
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OperationsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsList.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAW/C,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAiHF,wBAMG"}
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,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-324fe114"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-775f2c95"]]);
5
5
  export {
6
6
  a as default
7
7
  };