@scalar/api-reference 1.28.13 → 1.28.15

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 (52) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/browser/standalone.js +6710 -6674
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Card/Card.vue.d.ts.map +1 -1
  5. package/dist/components/Card/Card.vue.js +7 -7
  6. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  7. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  8. package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +18 -19
  9. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  11. package/dist/components/Content/Introduction/Introduction.vue2.js +44 -35
  12. package/dist/components/Content/Lazy/Loading.vue.d.ts +8 -17
  13. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Lazy/Loading.vue.js +50 -44
  15. package/dist/components/Content/Schema/Schema.preview.d.ts +525 -0
  16. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  17. package/dist/components/Content/Schema/Schema.vue.d.ts +1 -0
  18. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  20. package/dist/components/Content/Schema/Schema.vue2.js +86 -75
  21. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +1 -0
  22. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  23. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +41 -56
  25. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +169 -153
  29. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +12 -0
  30. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -0
  31. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +70 -0
  32. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  33. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  34. package/dist/features/Operation/components/ParameterListItem.vue2.js +13 -12
  35. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  36. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  37. package/dist/features/Operation/components/RequestBody.vue2.js +29 -26
  38. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  39. package/dist/features/Search/SearchButton.vue.js +2 -2
  40. package/dist/features/Search/SearchButton.vue2.js +42 -29
  41. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  42. package/dist/features/Search/SearchModal.vue.js +3 -3
  43. package/dist/features/Search/SearchModal.vue2.js +102 -96
  44. package/dist/features/Search/useSearchIndex.d.ts +2 -1
  45. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  46. package/dist/features/Search/useSearchIndex.js +55 -52
  47. package/dist/hooks/useSidebar.d.ts +1 -0
  48. package/dist/hooks/useSidebar.d.ts.map +1 -1
  49. package/dist/hooks/useSidebar.js +131 -119
  50. package/dist/index.js +1 -1
  51. package/dist/style.css +1 -1
  52. package/package.json +8 -8
@@ -1,35 +1,37 @@
1
- import { defineComponent as $, computed as u, openBlock as r, createElementBlock as i, normalizeClass as z, createBlock as b, createSlots as G, withCtx as y, createTextVNode as S, toDisplayString as d, createCommentVNode as l, createVNode as s, unref as a, Fragment as c, renderList as k, createElementVNode as f } from "vue";
2
- import { Disclosure as J, DisclosurePanel as K, DisclosureButton as Q } from "@headlessui/vue";
3
- import { ScalarMarkdown as D, ScalarIcon as W } from "@scalar/components";
4
- import { optimizeValueForDisplay as X, discriminators as I } from "./helpers/optimizeValueForDisplay.js";
5
- import L from "./Schema.vue.js";
6
- import O from "./SchemaDiscriminator.vue.js";
7
- import Y from "./SchemaPropertyHeading.vue.js";
8
- const x = {
1
+ import { defineComponent as $, computed as y, openBlock as l, createBlock as f, resolveDynamicComponent as G, normalizeClass as I, withCtx as m, createSlots as J, createTextVNode as D, toDisplayString as c, createCommentVNode as a, createElementBlock as i, createVNode as s, unref as r, Fragment as d, renderList as k, createElementVNode as h } from "vue";
2
+ import { Disclosure as K, DisclosurePanel as Q, DisclosureButton as W } from "@headlessui/vue";
3
+ import { ScalarMarkdown as S, ScalarIcon as X } from "@scalar/components";
4
+ import { optimizeValueForDisplay as Y, discriminators as L } from "./helpers/optimizeValueForDisplay.js";
5
+ import O from "./Schema.vue.js";
6
+ import R from "./SchemaDiscriminator.vue.js";
7
+ import x from "./SchemaPropertyHeading.vue.js";
8
+ const ee = {
9
9
  key: 1,
10
10
  class: "property-description"
11
- }, ee = {
11
+ }, te = {
12
12
  key: 2,
13
13
  class: "property-description"
14
- }, te = {
14
+ }, ne = {
15
15
  key: 3,
16
16
  class: "property-enum"
17
- }, ne = {
17
+ }, le = {
18
18
  key: 0,
19
19
  class: "property-list"
20
- }, re = { class: "property-heading" }, oe = { class: "property-name" }, ie = { class: "property-description" }, le = {
20
+ }, oe = { class: "property-heading" }, ie = { class: "property-name" }, ae = { class: "property-description" }, se = {
21
21
  key: 1,
22
22
  class: "property-enum-values"
23
- }, se = { class: "property-enum-value-label" }, ae = { class: "property-enum-value-label" }, pe = {
23
+ }, re = { class: "property-enum-value-label" }, pe = { class: "property-enum-value-label" }, me = {
24
24
  key: 4,
25
25
  class: "children"
26
- }, de = {
26
+ }, ce = {
27
27
  key: 0,
28
28
  class: "children"
29
29
  }, ve = /* @__PURE__ */ $({
30
30
  __name: "SchemaProperty",
31
31
  props: {
32
+ is: {},
32
33
  value: {},
34
+ noncollapsible: { type: Boolean },
33
35
  level: { default: 0 },
34
36
  name: {},
35
37
  required: { type: Boolean, default: !1 },
@@ -41,8 +43,8 @@ const x = {
41
43
  schemas: {},
42
44
  hideHeading: { type: Boolean }
43
45
  },
44
- setup(R) {
45
- const T = R, H = {
46
+ setup(T) {
47
+ const U = T, H = {
46
48
  integer: {
47
49
  _default: "Integer numbers.",
48
50
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -58,155 +60,169 @@ const x = {
58
60
  }, B = (e, n) => n != null && n.properties || n != null && n.additionalProperties || n != null && n.patternProperties || n != null && n.allOf ? null : e || (n == null ? void 0 : n.description) || null, E = (e) => !e || !H[e.type] ? null : H[e.type][e.format || "_default"], p = (e) => {
59
61
  var n;
60
62
  return (e == null ? void 0 : e.enum) || ((n = e == null ? void 0 : e.items) == null ? void 0 : n.enum) || [];
61
- }, _ = u(
63
+ }, C = y(
62
64
  () => p(t.value).length > 9
63
- ), P = u(() => _.value ? 5 : 9), U = u(
65
+ ), P = y(() => C.value ? 5 : 9), Z = y(
64
66
  () => p(t.value).slice(0, P.value)
65
- ), Z = u(
67
+ ), M = y(
66
68
  () => p(t.value).slice(P.value)
67
- ), t = u(() => X(T.value));
68
- I.find((e) => !t.value || typeof t.value != "object" ? !1 : e in t.value || t.value.items && typeof t.value.items == "object" && e in t.value.items);
69
- const M = (e, n, h, g, v) => n || h || g || (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) || v;
69
+ ), t = y(() => Y(U.value));
70
+ L.find((e) => !t.value || typeof t.value != "object" ? !1 : e in t.value || t.value.items && typeof t.value.items == "object" && e in t.value.items);
71
+ const _ = (e, n, b, g, v) => n || b || g || (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) || v;
70
72
  return (e, n) => {
71
- var h, g, v, w, C, j, q, A, F, N;
72
- return r(), i("li", {
73
- class: z(["property", [
73
+ var b;
74
+ return l(), f(G(e.is ?? "li"), {
75
+ class: I(["property", [
74
76
  (B(e.description, t.value), ""),
75
77
  `property--level-${e.level}`,
76
78
  {
77
79
  "property--compact": e.compact,
78
- "property--deprecated": (h = t.value) == null ? void 0 : h.deprecated
80
+ "property--deprecated": (b = t.value) == null ? void 0 : b.deprecated
79
81
  }
80
82
  ]])
81
- }, [
82
- M(
83
- t.value,
84
- e.name,
85
- e.additional,
86
- e.pattern,
87
- e.required
88
- ) ? (r(), b(Y, {
89
- key: 0,
90
- additional: e.additional,
91
- enum: p(t.value).length > 0,
92
- pattern: e.pattern,
93
- required: e.required,
94
- value: t.value
95
- }, G({ _: 2 }, [
96
- e.name ? {
97
- name: "name",
98
- fn: y(() => [
99
- S(d(e.name), 1)
100
- ]),
101
- key: "0"
102
- } : void 0,
103
- (g = t.value) != null && g.example ? {
104
- name: "example",
105
- fn: y(() => [
106
- S(" Example: " + d(t.value.example), 1)
107
- ]),
108
- key: "1"
109
- } : void 0
110
- ]), 1032, ["additional", "enum", "pattern", "required", "value"])) : l("", !0),
111
- B(e.description, t.value) ? (r(), i("div", x, [
112
- s(a(D), {
113
- value: B(e.description, t.value)
114
- }, null, 8, ["value"])
115
- ])) : E(t.value) ? (r(), i("div", ee, [
116
- s(a(D), {
117
- value: E(t.value) || ""
118
- }, null, 8, ["value"])
119
- ])) : l("", !0),
120
- ((v = p(t.value)) == null ? void 0 : v.length) > 0 ? (r(), i("div", te, [
121
- Array.isArray((w = t.value) == null ? void 0 : w["x-enumDescriptions"]) ? (r(), i("div", ne, [
122
- (r(!0), i(c, null, k(p(t.value), (o) => (r(), i("div", {
123
- key: o,
124
- class: "property"
125
- }, [
126
- f("div", re, [
127
- f("div", oe, d(o), 1)
128
- ]),
129
- f("div", ie, [
130
- s(a(D), {
131
- value: t.value["x-enumDescriptions"][o]
132
- }, null, 8, ["value"])
133
- ])
134
- ]))), 128))
135
- ])) : (r(), i("ul", le, [
136
- (r(!0), i(c, null, k(U.value, (o) => (r(), i("li", {
137
- key: o,
138
- class: "property-enum-value"
139
- }, [
140
- f("span", se, d(o), 1)
141
- ]))), 128)),
142
- _.value ? (r(), b(a(J), { key: 0 }, {
143
- default: y(({ open: o }) => [
144
- s(a(K), null, {
145
- default: y(() => [
146
- (r(!0), i(c, null, k(Z.value, (m) => (r(), i("li", {
147
- key: m,
148
- class: "property-enum-value"
149
- }, [
150
- f("span", ae, d(m), 1)
151
- ]))), 128))
152
- ]),
153
- _: 1
154
- }),
155
- s(a(Q), { class: "enum-toggle-button" }, {
156
- default: y(() => [
157
- s(a(W), {
158
- class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
159
- icon: "Add",
160
- size: "sm"
161
- }, null, 8, ["class"]),
162
- S(" " + d(o ? "Hide values" : "Show all values"), 1)
163
- ]),
164
- _: 2
165
- }, 1024)
166
- ]),
167
- _: 1
168
- })) : l("", !0)
169
- ]))
170
- ])) : l("", !0),
171
- ((C = t.value) == null ? void 0 : C.type) === "object" && ((j = t.value) != null && j.properties || (q = t.value) != null && q.additionalProperties) ? (r(), i("div", pe, [
172
- s(L, {
173
- compact: e.compact,
174
- level: e.level + 1,
175
- value: t.value
176
- }, null, 8, ["compact", "level", "value"])
177
- ])) : l("", !0),
178
- (A = t.value) != null && A.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (r(), i(c, { key: 5 }, [
179
- ["object"].includes((N = (F = t.value) == null ? void 0 : F.items) == null ? void 0 : N.type) ? (r(), i("div", de, [
180
- s(L, {
181
- compact: e.compact,
182
- level: e.level + 1,
183
- value: t.value.items
184
- }, null, 8, ["compact", "level", "value"])
185
- ])) : l("", !0)
186
- ], 64)) : l("", !0),
187
- (r(!0), i(c, null, k(a(I), (o) => {
188
- var m, V;
189
- return r(), i(c, { key: o }, [
190
- (m = t.value) != null && m[o] ? (r(), b(O, {
83
+ }, {
84
+ default: m(() => {
85
+ var g, v, w, j, q, A, F, N, V;
86
+ return [
87
+ _(
88
+ t.value,
89
+ e.name,
90
+ e.additional,
91
+ e.pattern,
92
+ e.required
93
+ ) ? (l(), f(x, {
191
94
  key: 0,
192
- compact: e.compact,
193
- discriminator: o,
194
- hideHeading: e.hideHeading,
195
- level: e.level,
196
- schemas: e.schemas,
95
+ additional: e.additional,
96
+ enum: p(t.value).length > 0,
97
+ pattern: e.pattern,
98
+ required: e.required,
197
99
  value: t.value
198
- }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : (V = t.value) != null && V.items && typeof o == "string" && typeof t.value.items == "object" && o in t.value.items && Array.isArray(t.value.items[o]) && e.level < 3 ? (r(), b(O, {
199
- key: 1,
200
- compact: e.compact,
201
- discriminator: o,
202
- hideHeading: e.hideHeading,
203
- level: e.level,
204
- schemas: e.schemas,
205
- value: t.value.items
206
- }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : l("", !0)
207
- ], 64);
208
- }), 128))
209
- ], 2);
100
+ }, J({ _: 2 }, [
101
+ e.name ? {
102
+ name: "name",
103
+ fn: m(() => [
104
+ D(c(e.name), 1)
105
+ ]),
106
+ key: "0"
107
+ } : void 0,
108
+ (g = t.value) != null && g.example ? {
109
+ name: "example",
110
+ fn: m(() => [
111
+ D(" Example: " + c(t.value.example), 1)
112
+ ]),
113
+ key: "1"
114
+ } : void 0
115
+ ]), 1032, ["additional", "enum", "pattern", "required", "value"])) : a("", !0),
116
+ B(e.description, t.value) ? (l(), i("div", ee, [
117
+ s(r(S), {
118
+ value: B(e.description, t.value)
119
+ }, null, 8, ["value"])
120
+ ])) : E(t.value) ? (l(), i("div", te, [
121
+ s(r(S), {
122
+ value: E(t.value) || ""
123
+ }, null, 8, ["value"])
124
+ ])) : a("", !0),
125
+ ((v = p(t.value)) == null ? void 0 : v.length) > 0 ? (l(), i("div", ne, [
126
+ Array.isArray((w = t.value) == null ? void 0 : w["x-enumDescriptions"]) ? (l(), i("div", le, [
127
+ (l(!0), i(d, null, k(p(t.value), (o) => (l(), i("div", {
128
+ key: o,
129
+ class: "property"
130
+ }, [
131
+ h("div", oe, [
132
+ h("div", ie, c(o), 1)
133
+ ]),
134
+ h("div", ae, [
135
+ s(r(S), {
136
+ value: t.value["x-enumDescriptions"][o]
137
+ }, null, 8, ["value"])
138
+ ])
139
+ ]))), 128))
140
+ ])) : (l(), i("ul", se, [
141
+ (l(!0), i(d, null, k(Z.value, (o) => (l(), i("li", {
142
+ key: o,
143
+ class: "property-enum-value"
144
+ }, [
145
+ h("span", re, c(o), 1)
146
+ ]))), 128)),
147
+ C.value ? (l(), f(r(K), { key: 0 }, {
148
+ default: m(({ open: o }) => [
149
+ s(r(Q), null, {
150
+ default: m(() => [
151
+ (l(!0), i(d, null, k(M.value, (u) => (l(), i("li", {
152
+ key: u,
153
+ class: "property-enum-value"
154
+ }, [
155
+ h("span", pe, c(u), 1)
156
+ ]))), 128))
157
+ ]),
158
+ _: 1
159
+ }),
160
+ s(r(W), { class: "enum-toggle-button" }, {
161
+ default: m(() => [
162
+ s(r(X), {
163
+ class: I(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
164
+ icon: "Add",
165
+ size: "sm"
166
+ }, null, 8, ["class"]),
167
+ D(" " + c(o ? "Hide values" : "Show all values"), 1)
168
+ ]),
169
+ _: 2
170
+ }, 1024)
171
+ ]),
172
+ _: 1
173
+ })) : a("", !0)
174
+ ]))
175
+ ])) : a("", !0),
176
+ ((j = t.value) == null ? void 0 : j.type) === "object" && ((q = t.value) != null && q.properties || (A = t.value) != null && A.additionalProperties) ? (l(), i("div", me, [
177
+ s(O, {
178
+ compact: e.compact,
179
+ level: e.level + 1,
180
+ name: e.name,
181
+ noncollapsible: e.noncollapsible,
182
+ value: t.value
183
+ }, null, 8, ["compact", "level", "name", "noncollapsible", "value"])
184
+ ])) : a("", !0),
185
+ (F = t.value) != null && F.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (l(), i(d, { key: 5 }, [
186
+ ["object"].includes((V = (N = t.value) == null ? void 0 : N.items) == null ? void 0 : V.type) ? (l(), i("div", ce, [
187
+ s(O, {
188
+ compact: e.compact,
189
+ level: e.level + 1,
190
+ name: e.name,
191
+ noncollapsible: e.noncollapsible,
192
+ value: t.value.items
193
+ }, null, 8, ["compact", "level", "name", "noncollapsible", "value"])
194
+ ])) : a("", !0)
195
+ ], 64)) : a("", !0),
196
+ (l(!0), i(d, null, k(r(L), (o) => {
197
+ var u, z;
198
+ return l(), i(d, { key: o }, [
199
+ (u = t.value) != null && u[o] ? (l(), f(R, {
200
+ key: 0,
201
+ compact: e.compact,
202
+ discriminator: o,
203
+ hideHeading: e.hideHeading,
204
+ level: e.level,
205
+ name: e.name,
206
+ noncollapsible: e.noncollapsible,
207
+ schemas: e.schemas,
208
+ value: t.value
209
+ }, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (z = t.value) != null && z.items && typeof o == "string" && typeof t.value.items == "object" && o in t.value.items && Array.isArray(t.value.items[o]) && e.level < 3 ? (l(), f(R, {
210
+ key: 1,
211
+ compact: e.compact,
212
+ discriminator: o,
213
+ hideHeading: e.hideHeading,
214
+ level: e.level,
215
+ name: e.name,
216
+ noncollapsible: e.noncollapsible,
217
+ schemas: e.schemas,
218
+ value: t.value.items
219
+ }, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : a("", !0)
220
+ ], 64);
221
+ }), 128))
222
+ ];
223
+ }),
224
+ _: 1
225
+ }, 8, ["class"]);
210
226
  };
211
227
  }
212
228
  });
@@ -0,0 +1,12 @@
1
+ import type { OpenAPI } from '@scalar/openapi-types';
2
+ type SchemaObject = OpenAPI.SchemaObject;
3
+ /**
4
+ * Merges multiple OpenAPI schema objects into a single schema object.
5
+ * Handles nested allOf compositions and merges properties recursively.
6
+ *
7
+ * @param schemas - Array of OpenAPI schema objects to merge
8
+ * @returns Merged schema object
9
+ */
10
+ export declare function mergeAllOfSchemas(schemas: SchemaObject[]): SchemaObject;
11
+ export {};
12
+ //# sourceMappingURL=merge-all-of-schemas.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,70 @@
1
+ function f(p) {
2
+ return !Array.isArray(p) || p.length === 0 ? {} : p.reduce((i, r) => {
3
+ if (!r || typeof r != "object")
4
+ return i;
5
+ if (r.allOf) {
6
+ const t = f(r.allOf);
7
+ return f([i, t]);
8
+ }
9
+ const e = typeof i == "object" ? { ...i } : {};
10
+ if (r.properties && (e.properties = o(e.properties || {}, r.properties)), r.items) {
11
+ if (r.type === "array")
12
+ e.items = l(e.items || {}, r.items);
13
+ else if (r.type === "object" && r.items.allOf) {
14
+ const t = f(r.items.allOf);
15
+ e.properties = o(e.properties || {}, t.properties || {});
16
+ }
17
+ }
18
+ return n(e, r);
19
+ }, {});
20
+ }
21
+ function o(p, i) {
22
+ const r = typeof p == "object" ? { ...p } : {};
23
+ return Object.entries(i).forEach(([e, t]) => {
24
+ var s;
25
+ if (!t || typeof t != "object") {
26
+ r[e] = t;
27
+ return;
28
+ }
29
+ if (!r[e]) {
30
+ t.type === "array" && ((s = t.items) != null && s.allOf) ? r[e] = {
31
+ ...t,
32
+ items: f(t.items.allOf)
33
+ } : t.allOf ? r[e] = f(t.allOf) : r[e] = t;
34
+ return;
35
+ }
36
+ if (t.allOf)
37
+ r[e] = f([r[e], ...t.allOf]);
38
+ else if (t.type === "array" && t.items)
39
+ r[e] = {
40
+ ...r[e],
41
+ type: "array",
42
+ items: l(r[e].items || {}, t.items)
43
+ };
44
+ else {
45
+ const d = r[e].properties || t.properties ? o(r[e].properties || {}, t.properties || {}) : void 0;
46
+ r[e] = {
47
+ ...r[e],
48
+ ...t
49
+ }, d && (r[e].properties = d);
50
+ }
51
+ }), r;
52
+ }
53
+ function l(p, i) {
54
+ if (p.allOf || i.allOf) {
55
+ const e = [...p.allOf || [p], ...i.allOf || [i]];
56
+ return f(e);
57
+ }
58
+ const r = {
59
+ ...p,
60
+ ...i
61
+ };
62
+ return (r.properties || i.properties) && (r.properties = o(r.properties || {}, i.properties || {})), r;
63
+ }
64
+ const n = (p, i) => {
65
+ const r = typeof p == "object" ? { ...p } : {};
66
+ return i.required && Array.isArray(i.required) && (r.required = [...p.required || [], ...i.required]), i.type && !p.type && (r.type = i.type), i.description && !p.description && (r.description = i.description), r;
67
+ };
68
+ export {
69
+ f as mergeAllOfSchemas
70
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AA+OA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAW9E,KAAK,WAAW,GAAG;IACf,SAAS,EACL,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,GAChD,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;kBANe,OAAO;kBAFP,OAAO;sBACH,OAAO;;AAuQ9B,wBAOG"}
1
+ {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAgPA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAW9E,KAAK,WAAW,GAAG;IACf,SAAS,EACL,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,GAChD,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;kBANe,OAAO;kBAFP,OAAO;sBACH,OAAO;;AAuQ9B,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./ParameterListItem.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6ec785c3"]]);
3
+ import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-b0aacc52"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as w, computed as i, ref as C, openBlock as o, createElementBlock as g, createVNode as m, unref as t, withCtx as c, createBlock as p, normalizeClass as B, createElementVNode as u, toDisplayString as b, createCommentVNode as n } from "vue";
2
- import { Disclosure as E, DisclosureButton as S, DisclosurePanel as q } from "@headlessui/vue";
1
+ import { defineComponent as w, computed as i, ref as g, openBlock as o, createElementBlock as C, createVNode as m, unref as t, withCtx as c, createBlock as p, normalizeClass as B, createElementVNode as u, toDisplayString as E, createCommentVNode as n } from "vue";
2
+ import { Disclosure as S, DisclosureButton as b, DisclosurePanel as q } from "@headlessui/vue";
3
3
  import { ScalarIcon as D, ScalarMarkdown as P } from "@scalar/components";
4
4
  import V from "./ContentTypeSelect.vue.js";
5
5
  import I from "./ParameterHeaders.vue.js";
@@ -7,7 +7,7 @@ import j from "../../../components/Content/Schema/SchemaProperty.vue.js";
7
7
  const N = {
8
8
  key: 0,
9
9
  class: "parameter-item group/parameter-item relative"
10
- }, T = { class: "parameter-item-name" }, O = { class: "parameter-item-type" }, _ = { class: "absolute right-0 top-2.5 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, A = /* @__PURE__ */ w({
10
+ }, T = { class: "parameter-item-name" }, _ = { class: "parameter-item-type" }, O = { class: "absolute right-0 top-2.5 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, A = /* @__PURE__ */ w({
11
11
  __name: "ParameterListItem",
12
12
  props: {
13
13
  parameter: {},
@@ -17,15 +17,15 @@ const N = {
17
17
  schemas: {}
18
18
  },
19
19
  setup(y) {
20
- const a = y, v = i(() => a.parameter.content ? Object.keys(a.parameter.content) : []), s = C(
20
+ const a = y, v = i(() => a.parameter.content ? Object.keys(a.parameter.content) : []), s = g(
21
21
  v.value[0]
22
22
  );
23
23
  a.parameter.content && "application/json" in a.parameter.content && (s.value = "application/json");
24
24
  const r = i(() => !!(a.collapsableItems && a.parameter.content)), k = i(() => a.parameter.readOnly !== !0);
25
- return (e, d) => k.value ? (o(), g("li", N, [
26
- m(t(E), null, {
25
+ return (e, d) => k.value ? (o(), C("li", N, [
26
+ m(t(S), null, {
27
27
  default: c(({ open: l }) => [
28
- r.value ? (o(), p(t(S), {
28
+ r.value ? (o(), p(t(b), {
29
29
  key: 0,
30
30
  class: B(["parameter-item-trigger flex", { "parameter-item-trigger-open": l }])
31
31
  }, {
@@ -35,8 +35,8 @@ const N = {
35
35
  icon: l ? "ChevronDown" : "ChevronRight",
36
36
  thickness: "1.5"
37
37
  }, null, 8, ["icon"]),
38
- u("span", T, b(e.parameter.name), 1),
39
- u("span", O, [
38
+ u("span", T, E(e.parameter.name), 1),
39
+ u("span", _, [
40
40
  e.parameter.description ? (o(), p(t(P), {
41
41
  key: 0,
42
42
  class: "markdown",
@@ -58,10 +58,11 @@ const N = {
58
58
  headers: e.parameter.headers
59
59
  }, null, 8, ["headers"])) : n("", !0),
60
60
  m(t(j), {
61
+ is: "div",
61
62
  compact: "",
62
63
  description: r.value ? "" : e.parameter.description,
63
64
  name: r.value ? "" : e.parameter.name,
64
- noncollapsible: e.showChildren,
65
+ noncollapsible: !0,
65
66
  required: e.parameter.required,
66
67
  schemas: e.schemas,
67
68
  value: {
@@ -69,7 +70,7 @@ const N = {
69
70
  ...e.parameter.content ? (f = (h = e.parameter.content) == null ? void 0 : h[s.value]) == null ? void 0 : f.schema : e.parameter.schema
70
71
  },
71
72
  withExamples: e.withExamples
72
- }, null, 8, ["description", "name", "noncollapsible", "required", "schemas", "value", "withExamples"])
73
+ }, null, 8, ["description", "name", "required", "schemas", "value", "withExamples"])
73
74
  ];
74
75
  }),
75
76
  _: 1
@@ -77,7 +78,7 @@ const N = {
77
78
  ]),
78
79
  _: 1
79
80
  }),
80
- u("div", _, [
81
+ u("div", O, [
81
82
  r.value && a.parameter.content ? (o(), p(V, {
82
83
  key: 0,
83
84
  class: "parameter-item-content-type",
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASpE,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;AAoDF,iBAAS,cAAc;WAiHT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAwMA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASpE,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;AAoDF,iBAAS,cAAc;WAiHT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-44390f88"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1aa0f610"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };