@scalar/api-reference 1.28.32 → 1.28.33

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.
@@ -1,29 +1,30 @@
1
- import { defineComponent as T, createElementBlock as i, openBlock as t, createCommentVNode as r, createBlock as o, normalizeClass as z, renderSlot as E, Fragment as s, createTextVNode as a, toDisplayString as n, createVNode as p, unref as v, withCtx as u } from "vue";
2
- import { stringify as L } from "flatted";
3
- import { discriminators as H } from "./helpers/optimizeValueForDisplay.js";
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";
4
5
  import R from "./SchemaPropertyExamples.vue.js";
5
- import f from "../../ScreenReader.vue.js";
6
+ import B from "../../ScreenReader.vue.js";
6
7
  import m from "./SchemaPropertyDetail.vue.js";
7
- import $ from "../../Badge/Badge.vue.js";
8
- const G = { class: "property-heading" }, J = {
8
+ import L from "../../Badge/Badge.vue.js";
9
+ const G = { class: "property-heading" }, K = {
9
10
  key: 1,
10
11
  class: "property-additional"
11
- }, K = {
12
+ }, Q = {
12
13
  key: 2,
13
14
  class: "property-pattern"
14
- }, Q = {
15
+ }, U = {
15
16
  key: 3,
16
17
  class: "property-deprecated"
17
- }, U = {
18
+ }, W = {
18
19
  key: 4,
19
20
  class: "property-const"
20
- }, W = {
21
+ }, X = {
21
22
  key: 7,
22
23
  class: "property-write-only"
23
- }, X = {
24
+ }, Y = {
24
25
  key: 8,
25
26
  class: "property-read-only"
26
- }, Y = {
27
+ }, Z = {
27
28
  key: 9,
28
29
  class: "property-required"
29
30
  }, ae = /* @__PURE__ */ T({
@@ -38,209 +39,212 @@ const G = { class: "property-heading" }, J = {
38
39
  schemas: {}
39
40
  },
40
41
  setup(d) {
41
- const D = H.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), F = (e) => Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : e == null ? void 0 : e.default, O = (e) => {
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) => {
42
43
  if (!e)
43
44
  return null;
44
45
  if (e.name)
45
46
  return e.name;
46
47
  if (d.schemas && typeof d.schemas == "object") {
47
- for (const [l, y] of Object.entries(d.schemas))
48
- if (L(y) === L(e))
49
- return l;
48
+ for (const [t, k] of Object.entries(d.schemas))
49
+ if (E(k) === E(e))
50
+ return t;
50
51
  }
51
52
  return null;
52
53
  };
53
- return (e, l) => {
54
- var y, k, g, B, b, N, S, q, w, P, j, I, M;
55
- return t(), i("div", G, [
56
- e.$slots.name ? (t(), i("div", {
54
+ 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", {
57
58
  key: 0,
58
- class: z(["property-name", { deprecated: (y = e.value) == null ? void 0 : y.deprecated }])
59
+ class: z(["property-name", { deprecated: (k = e.value) == null ? void 0 : k.deprecated }])
59
60
  }, [
60
- e.pattern ? (t(), i(s, { key: 1 }, [
61
- l[0] || (l[0] = a("/")),
62
- E(e.$slots, "name", {}, void 0, !0),
63
- l[1] || (l[1] = a("/"))
64
- ], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
65
- ], 2)) : r("", !0),
66
- e.additional ? (t(), i("div", J, [
67
- (k = e.value) != null && k["x-additionalPropertiesName"] ? (t(), i(s, { key: 0 }, [
68
- a(n(e.value["x-additionalPropertiesName"]), 1)
69
- ], 64)) : (t(), i(s, { key: 1 }, [
70
- a("additional properties")
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")
71
72
  ], 64))
72
- ])) : r("", !0),
73
- e.pattern ? (t(), i("div", K, [
74
- p(v($), null, {
75
- default: u(() => l[2] || (l[2] = [
76
- a("pattern")
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")
77
78
  ])),
78
79
  _: 1
79
80
  })
80
- ])) : r("", !0),
81
- (g = e.value) != null && g.deprecated ? (t(), i("div", Q, [
82
- p(v($), null, {
83
- default: u(() => l[3] || (l[3] = [
84
- a("deprecated")
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")
85
86
  ])),
86
87
  _: 1
87
88
  })
88
- ])) : r("", !0),
89
- (B = e.value) != null && B.const || (b = e.value) != null && b.enum && e.value.enum.length === 1 ? (t(), i("div", U, [
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, [
90
91
  p(m, { truncate: "" }, {
91
- prefix: u(() => l[4] || (l[4] = [
92
- a("const:")
92
+ prefix: a(() => t[4] || (t[4] = [
93
+ r("const:")
93
94
  ])),
94
- default: u(() => [
95
- a(" " + n(e.value.const ?? e.value.enum[0]), 1)
96
- ]),
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
+ }),
97
101
  _: 1
98
102
  })
99
- ])) : (N = e.value) != null && N.type ? (t(), i(s, { key: 5 }, [
103
+ ])) : (w = e.value) != null && w.type ? (l(), i(s, { key: 5 }, [
100
104
  p(m, null, {
101
- default: u(() => {
102
- var V, A, C;
105
+ default: a(() => {
106
+ var y, f, v;
103
107
  return [
104
- p(f, null, {
105
- default: u(() => l[5] || (l[5] = [
106
- a("Type:")
108
+ p(B, null, {
109
+ default: a(() => t[5] || (t[5] = [
110
+ r("Type:")
107
111
  ])),
108
112
  _: 1
109
113
  }),
110
- (A = (V = e.value) == null ? void 0 : V.items) != null && A.type ? (t(), i(s, { key: 0 }, [
111
- a(n(e.value.type) + " " + n(O(e.value.items) || e.value.items.type) + "[] ", 1)
112
- ], 64)) : (t(), i(s, { key: 1 }, [
113
- a(n(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + n((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
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)
114
118
  ], 64)),
115
- e.value.minItems || e.value.maxItems ? (t(), i(s, { key: 2 }, [
116
- a(n(e.value.minItems) + "…" + n(e.value.maxItems), 1)
117
- ], 64)) : r("", !0)
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)
118
122
  ];
119
123
  }),
120
124
  _: 1
121
125
  }),
122
- e.value.minLength ? (t(), o(m, { key: 0 }, {
123
- prefix: u(() => l[6] || (l[6] = [
124
- a("min:")
126
+ e.value.minLength ? (l(), o(m, { key: 0 }, {
127
+ prefix: a(() => t[6] || (t[6] = [
128
+ r("min:")
125
129
  ])),
126
- default: u(() => [
127
- a(" " + n(e.value.minLength), 1)
130
+ default: a(() => [
131
+ r(" " + n(e.value.minLength), 1)
128
132
  ]),
129
133
  _: 1
130
- })) : r("", !0),
131
- e.value.maxLength ? (t(), o(m, { key: 1 }, {
132
- prefix: u(() => l[7] || (l[7] = [
133
- a("max:")
134
+ })) : u("", !0),
135
+ e.value.maxLength ? (l(), o(m, { key: 1 }, {
136
+ prefix: a(() => t[7] || (t[7] = [
137
+ r("max:")
134
138
  ])),
135
- default: u(() => [
136
- a(" " + n(e.value.maxLength), 1)
139
+ default: a(() => [
140
+ r(" " + n(e.value.maxLength), 1)
137
141
  ]),
138
142
  _: 1
139
- })) : r("", !0),
140
- e.value.uniqueItems ? (t(), o(m, { key: 2 }, {
141
- default: u(() => l[8] || (l[8] = [
142
- a(" unique! ")
143
+ })) : u("", !0),
144
+ e.value.uniqueItems ? (l(), o(m, { key: 2 }, {
145
+ default: a(() => t[8] || (t[8] = [
146
+ r(" unique! ")
143
147
  ])),
144
148
  _: 1
145
- })) : r("", !0),
146
- e.value.format ? (t(), o(m, { key: 3 }, {
147
- default: u(() => [
148
- p(f, null, {
149
- default: u(() => l[9] || (l[9] = [
150
- a("Format:")
149
+ })) : u("", !0),
150
+ e.value.format ? (l(), o(m, { key: 3 }, {
151
+ default: a(() => [
152
+ p(B, null, {
153
+ default: a(() => t[9] || (t[9] = [
154
+ r("Format:")
151
155
  ])),
152
156
  _: 1
153
157
  }),
154
- a(" " + n(e.value.format), 1)
158
+ r(" " + n(e.value.format), 1)
155
159
  ]),
156
160
  _: 1
157
- })) : r("", !0),
158
- e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (t(), o(m, { key: 4 }, {
159
- prefix: u(() => l[10] || (l[10] = [
160
- a("greater than:")
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:")
161
165
  ])),
162
- default: u(() => [
163
- a(" " + n(e.value.minimum), 1)
166
+ default: a(() => [
167
+ r(" " + n(e.value.minimum), 1)
164
168
  ]),
165
169
  _: 1
166
- })) : r("", !0),
167
- e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (t(), o(m, { key: 5 }, {
168
- prefix: u(() => l[11] || (l[11] = [
169
- a("min:")
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:")
170
174
  ])),
171
- default: u(() => [
172
- a(" " + n(e.value.minimum), 1)
175
+ default: a(() => [
176
+ r(" " + n(e.value.minimum), 1)
173
177
  ]),
174
178
  _: 1
175
- })) : r("", !0),
176
- e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (t(), o(m, { key: 6 }, {
177
- prefix: u(() => l[12] || (l[12] = [
178
- a("less than:")
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:")
179
183
  ])),
180
- default: u(() => [
181
- a(" " + n(e.value.maximum), 1)
184
+ default: a(() => [
185
+ r(" " + n(e.value.maximum), 1)
182
186
  ]),
183
187
  _: 1
184
- })) : r("", !0),
185
- e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (t(), o(m, { key: 7 }, {
186
- prefix: u(() => l[13] || (l[13] = [
187
- a("max:")
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:")
188
192
  ])),
189
- default: u(() => [
190
- a(" " + n(e.value.maximum), 1)
193
+ default: a(() => [
194
+ r(" " + n(e.value.maximum), 1)
191
195
  ]),
192
196
  _: 1
193
- })) : r("", !0),
194
- e.value.pattern ? (t(), o(m, {
197
+ })) : u("", !0),
198
+ e.value.pattern ? (l(), o(m, {
195
199
  key: 8,
196
200
  code: "",
197
201
  truncate: ""
198
202
  }, {
199
- default: u(() => [
200
- p(f, null, {
201
- default: u(() => l[14] || (l[14] = [
202
- a("Pattern:")
203
+ default: a(() => [
204
+ p(B, null, {
205
+ default: a(() => t[14] || (t[14] = [
206
+ r("Pattern:")
203
207
  ])),
204
208
  _: 1
205
209
  }),
206
- a(" " + n(e.value.pattern), 1)
210
+ r(" " + n(e.value.pattern), 1)
207
211
  ]),
208
212
  _: 1
209
- })) : r("", !0),
210
- e.$props.enum ? (t(), o(m, { key: 9 }, {
211
- default: u(() => l[15] || (l[15] = [
212
- a("enum")
213
+ })) : u("", !0),
214
+ e.$props.enum ? (l(), o(m, { key: 9 }, {
215
+ default: a(() => t[15] || (t[15] = [
216
+ r("enum")
213
217
  ])),
214
218
  _: 1
215
- })) : r("", !0),
216
- e.value.default !== void 0 ? (t(), o(m, {
219
+ })) : u("", !0),
220
+ e.value.default !== void 0 ? (l(), o(m, {
217
221
  key: 10,
218
222
  truncate: ""
219
223
  }, {
220
- prefix: u(() => l[16] || (l[16] = [
221
- a("default:")
224
+ prefix: a(() => t[16] || (t[16] = [
225
+ r("default:")
222
226
  ])),
223
- default: u(() => [
224
- a(" " + n(F(e.value)), 1)
227
+ default: a(() => [
228
+ r(" " + n($(e.value)), 1)
225
229
  ]),
226
230
  _: 1
227
- })) : r("", !0)
228
- ], 64)) : (t(), i(s, { key: 6 }, [
229
- ((S = e.value) == null ? void 0 : S.nullable) === !0 ? (t(), o(m, { key: 0 }, {
230
- default: u(() => l[17] || (l[17] = [
231
- a(" nullable ")
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 }, {
234
+ default: a(() => t[17] || (t[17] = [
235
+ r(" nullable ")
232
236
  ])),
233
237
  _: 1
234
- })) : r("", !0)
238
+ })) : u("", !0)
235
239
  ], 64)),
236
- (q = e.value) != null && q.writeOnly ? (t(), i("div", W, " write-only ")) : (w = e.value) != null && w.readOnly ? (t(), i("div", X, " read-only ")) : r("", !0),
237
- e.required ? (t(), i("div", Y, " required ")) : r("", !0),
238
- e.withExamples ? (t(), o(R, {
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, {
239
243
  key: 10,
240
- examples: (P = e.value) == null ? void 0 : P.examples,
241
- example: ((j = e.value) == null ? void 0 : j.example) || ((M = (I = e.value) == null ? void 0 : I.items) == null ? void 0 : M.example),
242
- "discriminator-type": v(D)
243
- }, null, 8, ["examples", "example", "discriminator-type"])) : r("", !0)
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)
244
248
  ]);
245
249
  };
246
250
  }
@@ -1,7 +1,7 @@
1
1
  import o from "./SectionHeader.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2f429af7"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b460b827"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SpecificationExtension.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecificationExtension/SpecificationExtension.vue"],"names":[],"mappings":"AAsEA,KAAK,WAAW,GAAG;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CAC3C,CAAC;;AA2GF,wBAMG"}
1
+ {"version":3,"file":"SpecificationExtension.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecificationExtension/SpecificationExtension.vue"],"names":[],"mappings":"AAkFA,KAAK,WAAW,GAAG;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CAC3C,CAAC;;AAyHF,wBAMG"}
@@ -1,40 +1,49 @@
1
- import { defineComponent as d, computed as s, createElementBlock as u, createCommentVNode as v, openBlock as n, Fragment as g, renderList as E, createBlock as c, unref as _, withCtx as x, resolveDynamicComponent as C, mergeProps as h } from "vue";
2
- import { ScalarErrorBoundary as k } from "@scalar/components";
3
- import { usePluginManager as y } from "../../plugins/hooks/usePluginManager.js";
4
- const B = {
1
+ import { defineComponent as E, computed as c, createElementBlock as l, createCommentVNode as _, openBlock as r, Fragment as k, renderList as y, createBlock as o, unref as C, withCtx as h, resolveDynamicComponent as s, mergeProps as p } from "vue";
2
+ import { ScalarErrorBoundary as B } from "@scalar/components";
3
+ import { usePluginManager as b } from "../../plugins/hooks/usePluginManager.js";
4
+ const N = {
5
5
  key: 0,
6
6
  class: "text-base"
7
- }, j = /* @__PURE__ */ d({
7
+ }, O = /* @__PURE__ */ E({
8
8
  __name: "SpecificationExtension",
9
9
  props: {
10
10
  value: {}
11
11
  },
12
- setup(m) {
13
- const { getSpecificationExtensions: i } = y();
14
- function l(e) {
15
- return Object.keys(e ?? {}).filter(
16
- (t) => t.startsWith("x-")
12
+ setup(i) {
13
+ const { getSpecificationExtensions: f } = b();
14
+ function d(t) {
15
+ return Object.keys(t ?? {}).filter(
16
+ (n) => n.startsWith("x-")
17
17
  );
18
18
  }
19
- function p(e) {
20
- return e.flatMap((t) => i(t)).filter((t) => t.component);
19
+ function v(t) {
20
+ return t.flatMap((n) => f(n)).filter((n) => n.component);
21
21
  }
22
- const f = s(() => l(m.value)), r = s(
23
- () => p(f.value)
22
+ const g = c(() => d(i.value)), a = c(
23
+ () => v(g.value)
24
24
  );
25
- return (e, t) => typeof e.value == "object" && r.value.length ? (n(), u("div", B, [
26
- (n(!0), u(g, null, E(r.value, (o) => (n(), c(_(k), null, {
27
- default: x(() => {
28
- var a;
25
+ return (t, n) => typeof t.value == "object" && a.value.length ? (r(), l("div", N, [
26
+ (r(!0), l(k, null, y(a.value, (e) => (r(), o(C(B), null, {
27
+ default: h(() => {
28
+ var u, m;
29
29
  return [
30
- (n(), c(C(o.component), h({ ref_for: !0 }, { [o.name]: (a = e.value) == null ? void 0 : a[o.name] }), null, 16))
30
+ e.renderer ? (r(), o(s(e.renderer), p({
31
+ key: 0,
32
+ ref_for: !0
33
+ }, {
34
+ [e.name]: (u = t.value) == null ? void 0 : u[e.name],
35
+ component: e.component
36
+ }), null, 16)) : (r(), o(s(e.component), p({
37
+ key: 1,
38
+ ref_for: !0
39
+ }, { [e.name]: (m = t.value) == null ? void 0 : m[e.name] }), null, 16))
31
40
  ];
32
41
  }),
33
42
  _: 2
34
43
  }, 1024))), 256))
35
- ])) : v("", !0);
44
+ ])) : _("", !0);
36
45
  }
37
46
  });
38
47
  export {
39
- j as default
48
+ O as default
40
49
  };