@scalar/openapi-to-markdown 0.3.19 → 0.3.22

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @scalar/openapi-to-markdown
2
2
 
3
+ ## 0.3.22
4
+
5
+ ### Patch Changes
6
+
7
+ #### Updated Dependencies
8
+
9
+ - **@scalar/helpers@0.2.8**
10
+ - [#7751](https://github.com/scalar/scalar/pull/7751): fix: auth persistence
11
+
12
+ - **@scalar/oas-utils@0.6.19**
13
+
14
+ - **@scalar/components@0.16.22**
15
+
16
+ - **@scalar/types@0.5.8**
17
+
18
+ - **@scalar/openapi-parser@0.24.1**
19
+
20
+ - **@scalar/openapi-upgrader@0.1.7**
21
+
22
+ ## 0.3.21
23
+
24
+ ### Patch Changes
25
+
26
+ #### Updated Dependencies
27
+
28
+ - **@scalar/openapi-parser@0.24.0**
29
+ - [#7171](https://github.com/scalar/scalar/pull/7171): refactor: new validator class
30
+
31
+ - **@scalar/oas-utils@0.6.18**
32
+
33
+ - **@scalar/components@0.16.21**
34
+
35
+ ## 0.3.20
36
+
37
+ ### Patch Changes
38
+
39
+ #### Updated Dependencies
40
+
41
+ - **@scalar/oas-utils@0.6.17**
42
+
43
+ - **@scalar/components@0.16.20**
44
+
3
45
  ## 0.3.19
4
46
 
5
47
  ### Patch Changes
@@ -1,57 +1,57 @@
1
- import { defineComponent as B, createElementBlock as e, openBlock as t, createElementVNode as l, createBlock as v, createCommentVNode as i, toDisplayString as u, createTextVNode as d, unref as b, Fragment as r, renderList as m, createVNode as f } from "vue";
1
+ import { defineComponent as C, createElementBlock as e, openBlock as n, createElementVNode as l, createBlock as v, createCommentVNode as i, toDisplayString as u, createTextVNode as d, unref as b, Fragment as r, renderList as m, createVNode as f } from "vue";
2
2
  import { ScalarMarkdown as j } from "@scalar/components";
3
- import { getExampleFromSchema as x } from "@scalar/oas-utils/spec-getters";
4
- import O from "./Schema.vue.js";
5
- import V from "./XmlOrJson.vue.js";
6
- const C = { key: 1 }, E = { key: 0 }, w = { key: 1 }, D = { key: 2 }, M = { key: 0 }, N = { key: 1 }, P = { key: 0 }, R = { key: 1 }, U = { key: 3 }, q = { key: 2 }, A = { key: 3 }, F = { key: 0 }, I = { key: 1 }, L = { key: 4 }, K = /* @__PURE__ */ B({
3
+ import { getExampleFromSchema as O } from "@scalar/oas-utils/spec-getters";
4
+ import V from "./Schema.vue.js";
5
+ import B from "./XmlOrJson.vue.js";
6
+ const E = { key: 1 }, w = { key: 0 }, D = { key: 1 }, M = { key: 2 }, N = { key: 0 }, P = { key: 1 }, R = { key: 0 }, U = { key: 1 }, p = { key: 3 }, q = { key: 2 }, A = { key: 3 }, F = { key: 0 }, I = { key: 1 }, L = { key: 4 }, K = /* @__PURE__ */ C({
7
7
  __name: "MarkdownReference",
8
8
  props: {
9
9
  content: {}
10
10
  },
11
- setup($) {
12
- return (k, n) => (t(), e("section", null, [
11
+ setup(k) {
12
+ return ($, t) => (n(), e("section", null, [
13
13
  l("header", null, [
14
14
  l("h1", null, u(k.content?.info?.title), 1),
15
15
  l("ul", null, [
16
16
  l("li", null, [
17
- n[0] || (n[0] = l("strong", null, "OpenAPI Version:", -1)),
18
- n[1] || (n[1] = d(" ", -1)),
17
+ t[0] || (t[0] = l("strong", null, "OpenAPI Version:", -1)),
18
+ t[1] || (t[1] = d(" ", -1)),
19
19
  l("code", null, u(k.content?.openapi), 1)
20
20
  ]),
21
21
  l("li", null, [
22
- n[2] || (n[2] = l("strong", null, "API Version:", -1)),
23
- n[3] || (n[3] = d(" ", -1)),
22
+ t[2] || (t[2] = l("strong", null, "API Version:", -1)),
23
+ t[3] || (t[3] = d(" ", -1)),
24
24
  l("code", null, u(k.content?.info?.version), 1)
25
25
  ])
26
26
  ])
27
27
  ]),
28
- k.content?.info?.description ? (t(), v(b(j), {
28
+ k.content?.info?.description ? (n(), v(b(j), {
29
29
  key: 0,
30
30
  value: k.content?.info?.description
31
31
  }, null, 8, ["value"])) : i("", !0),
32
- k.content?.servers?.length ? (t(), e("section", C, [
33
- n[10] || (n[10] = l("h2", null, "Servers", -1)),
32
+ k.content?.servers?.length ? (n(), e("section", E, [
33
+ t[10] || (t[10] = l("h2", null, "Servers", -1)),
34
34
  l("ul", null, [
35
- (t(!0), e(r, null, m(k.content.servers, (o) => (t(), e("li", {
35
+ (n(!0), e(r, null, m(k.content.servers, (o) => (n(), e("li", {
36
36
  key: o.url
37
37
  }, [
38
- n[8] || (n[8] = l("strong", null, "URL:", -1)),
39
- n[9] || (n[9] = d(" ", -1)),
38
+ t[8] || (t[8] = l("strong", null, "URL:", -1)),
39
+ t[9] || (t[9] = d(" ", -1)),
40
40
  l("code", null, u(o.url), 1),
41
41
  l("ul", null, [
42
- o.description ? (t(), e("li", E, [
43
- n[4] || (n[4] = l("strong", null, "Description:", -1)),
42
+ o.description ? (n(), e("li", w, [
43
+ t[4] || (t[4] = l("strong", null, "Description:", -1)),
44
44
  d(" " + u(o.description), 1)
45
45
  ])) : i("", !0),
46
- o.variables && Object.keys(o.variables).length ? (t(), e("li", w, [
47
- n[7] || (n[7] = l("strong", null, "Variables:", -1)),
46
+ o.variables && Object.keys(o.variables).length ? (n(), e("li", D, [
47
+ t[7] || (t[7] = l("strong", null, "Variables:", -1)),
48
48
  l("ul", null, [
49
- (t(!0), e(r, null, m(o.variables, (s, y) => (t(), e("li", { key: y }, [
49
+ (n(!0), e(r, null, m(o.variables, (s, y) => (n(), e("li", { key: y }, [
50
50
  l("code", null, u(y), 1),
51
- n[5] || (n[5] = d(" (default: ", -1)),
51
+ t[5] || (t[5] = d(" (default: ", -1)),
52
52
  l("code", null, u(s.default), 1),
53
- n[6] || (n[6] = d(")", -1)),
54
- s.description ? (t(), e(r, { key: 0 }, [
53
+ t[6] || (t[6] = d(")", -1)),
54
+ s.description ? (n(), e(r, { key: 0 }, [
55
55
  d(": " + u(s.description), 1)
56
56
  ], 64)) : i("", !0)
57
57
  ]))), 128))
@@ -61,90 +61,90 @@ const C = { key: 1 }, E = { key: 0 }, w = { key: 1 }, D = { key: 2 }, M = { key:
61
61
  ]))), 128))
62
62
  ])
63
63
  ])) : i("", !0),
64
- Object.keys(k.content?.paths ?? {}).length ? (t(), e("section", D, [
65
- n[21] || (n[21] = l("h2", null, "Operations", -1)),
66
- (t(!0), e(r, null, m(Object.keys(k.content?.paths ?? {}), (o) => (t(), e(r, { key: o }, [
67
- (t(!0), e(r, null, m(k.content?.paths?.[o], (s, y) => (t(), e("section", { key: s }, [
64
+ Object.keys(k.content?.paths ?? {}).length ? (n(), e("section", M, [
65
+ t[21] || (t[21] = l("h2", null, "Operations", -1)),
66
+ (n(!0), e(r, null, m(Object.keys(k.content?.paths ?? {}), (o) => (n(), e(r, { key: o }, [
67
+ (n(!0), e(r, null, m(k.content?.paths?.[o], (s, y) => (n(), e("section", { key: s }, [
68
68
  l("header", null, [
69
69
  l("h3", null, [
70
- s.summary ? (t(), e(r, { key: 0 }, [
70
+ s.summary ? (n(), e(r, { key: 0 }, [
71
71
  d(u(s.summary), 1)
72
- ], 64)) : (t(), e(r, { key: 1 }, [
72
+ ], 64)) : (n(), e(r, { key: 1 }, [
73
73
  d(u(y.toString().toUpperCase()) + " " + u(o), 1)
74
74
  ], 64)),
75
- s["x-scalar-stability"] ? (t(), e(r, { key: 2 }, [
75
+ s["x-scalar-stability"] ? (n(), e(r, { key: 2 }, [
76
76
  d(" (" + u(s["x-scalar-stability"]) + ") ", 1)
77
- ], 64)) : s.deprecated ? (t(), e(r, { key: 3 }, [
77
+ ], 64)) : s.deprecated ? (n(), e(r, { key: 3 }, [
78
78
  d(" ⚠️ Deprecated ")
79
79
  ], 64)) : i("", !0)
80
80
  ])
81
81
  ]),
82
82
  l("ul", null, [
83
83
  l("li", null, [
84
- n[11] || (n[11] = l("strong", null, "Method:", -1)),
85
- n[12] || (n[12] = d(" ", -1)),
84
+ t[11] || (t[11] = l("strong", null, "Method:", -1)),
85
+ t[12] || (t[12] = d(" ", -1)),
86
86
  l("code", null, u(y.toString().toUpperCase()), 1)
87
87
  ]),
88
88
  l("li", null, [
89
- n[13] || (n[13] = l("strong", null, "Path:", -1)),
90
- n[14] || (n[14] = d(" ", -1)),
89
+ t[13] || (t[13] = l("strong", null, "Path:", -1)),
90
+ t[14] || (t[14] = d(" ", -1)),
91
91
  l("code", null, u(o), 1)
92
92
  ]),
93
- s.tags ? (t(), e("li", M, [
94
- n[15] || (n[15] = l("strong", null, "Tags:", -1)),
93
+ s.tags ? (n(), e("li", N, [
94
+ t[15] || (t[15] = l("strong", null, "Tags:", -1)),
95
95
  d(" " + u(s.tags.join(", ")), 1)
96
96
  ])) : i("", !0),
97
- s["x-scalar-stability"] ? (t(), e("li", N, [
98
- n[16] || (n[16] = l("strong", null, "Stability:", -1)),
97
+ s["x-scalar-stability"] ? (n(), e("li", P, [
98
+ t[16] || (t[16] = l("strong", null, "Stability:", -1)),
99
99
  d(" " + u(s["x-scalar-stability"]), 1)
100
100
  ])) : i("", !0)
101
101
  ]),
102
102
  f(b(j), {
103
103
  value: s.description
104
104
  }, null, 8, ["value"]),
105
- s.requestBody?.content ? (t(), e("section", P, [
106
- n[18] || (n[18] = l("h4", null, "Request Body", -1)),
107
- (t(!0), e(r, null, m(s.requestBody.content, (g, p) => (t(), e(r, { key: p }, [
108
- l("h5", null, "Content-Type: " + u(p), 1),
109
- g.schema ? (t(), e(r, { key: 0 }, [
110
- f(O, {
105
+ s.requestBody?.content ? (n(), e("section", R, [
106
+ t[18] || (t[18] = l("h4", null, "Request Body", -1)),
107
+ (n(!0), e(r, null, m(s.requestBody.content, (g, x) => (n(), e(r, { key: x }, [
108
+ l("h5", null, "Content-Type: " + u(x), 1),
109
+ g.schema ? (n(), e(r, { key: 0 }, [
110
+ f(V, {
111
111
  schema: g.schema
112
112
  }, null, 8, ["schema"]),
113
- n[17] || (n[17] = l("p", null, [
113
+ t[17] || (t[17] = l("p", null, [
114
114
  l("strong", null, "Example:")
115
115
  ], -1)),
116
- f(V, {
117
- xml: p?.toString().includes("xml"),
118
- "model-value": b(x)(g.schema, {
119
- xml: p?.toString().includes("xml")
116
+ f(B, {
117
+ xml: x?.toString().includes("xml"),
118
+ "model-value": b(O)(g.schema, {
119
+ xml: x?.toString().includes("xml")
120
120
  })
121
121
  }, null, 8, ["xml", "model-value"])
122
122
  ], 64)) : i("", !0)
123
123
  ], 64))), 128))
124
124
  ])) : i("", !0),
125
- s.responses ? (t(), e("section", R, [
126
- n[20] || (n[20] = l("h4", null, "Responses", -1)),
127
- (t(!0), e(r, null, m(s.responses, (g, p) => (t(), e("section", { key: p }, [
125
+ s.responses ? (n(), e("section", U, [
126
+ t[20] || (t[20] = l("h4", null, "Responses", -1)),
127
+ (n(!0), e(r, null, m(s.responses, (g, x) => (n(), e("section", { key: x }, [
128
128
  l("header", null, [
129
129
  l("h5", null, [
130
- d(" Status: " + u(p) + " ", 1),
131
- g.description ? (t(), e(r, { key: 0 }, [
130
+ d(" Status: " + u(x) + " ", 1),
131
+ g.description ? (n(), e(r, { key: 0 }, [
132
132
  d(u(g.description), 1)
133
133
  ], 64)) : i("", !0)
134
134
  ])
135
135
  ]),
136
- (t(!0), e(r, null, m(g.content, (a, S) => (t(), e("section", { key: S }, [
136
+ (n(!0), e(r, null, m(g.content, (a, S) => (n(), e("section", { key: S }, [
137
137
  l("h6", null, "Content-Type: " + u(S), 1),
138
- a.schema ? (t(), e(r, { key: 0 }, [
139
- f(O, {
138
+ a.schema ? (n(), e(r, { key: 0 }, [
139
+ f(V, {
140
140
  schema: a.schema
141
141
  }, null, 8, ["schema"]),
142
- n[19] || (n[19] = l("p", null, [
142
+ t[19] || (t[19] = l("p", null, [
143
143
  l("strong", null, "Example:")
144
144
  ], -1)),
145
- f(V, {
145
+ f(B, {
146
146
  xml: S?.toString().includes("xml"),
147
- "model-value": b(x)(a.schema, {
147
+ "model-value": b(O)(a.schema, {
148
148
  xml: S?.toString().includes("xml")
149
149
  })
150
150
  }, null, 8, ["xml", "model-value"])
@@ -155,34 +155,34 @@ const C = { key: 1 }, E = { key: 0 }, w = { key: 1 }, D = { key: 2 }, M = { key:
155
155
  ]))), 128))
156
156
  ], 64))), 128))
157
157
  ])) : i("", !0),
158
- Object.keys(k.content?.webhooks ?? {}).length ? (t(), e("section", U, [
159
- n[26] || (n[26] = l("h2", null, "Webhooks", -1)),
160
- (t(!0), e(r, null, m(k.content?.webhooks, (o, s) => (t(), e(r, { key: s }, [
161
- (t(!0), e(r, null, m(o, (y, g) => (t(), e("section", { key: y }, [
158
+ Object.keys(k.content?.webhooks ?? {}).length ? (n(), e("section", p, [
159
+ t[26] || (t[26] = l("h2", null, "Webhooks", -1)),
160
+ (n(!0), e(r, null, m(k.content?.webhooks, (o, s) => (n(), e(r, { key: s }, [
161
+ (n(!0), e(r, null, m(o, (y, g) => (n(), e("section", { key: y }, [
162
162
  l("header", null, [
163
163
  l("h3", null, [
164
- y.summary ? (t(), e(r, { key: 0 }, [
164
+ y.summary ? (n(), e(r, { key: 0 }, [
165
165
  d(u(y.summary), 1)
166
- ], 64)) : (t(), e(r, { key: 1 }, [
166
+ ], 64)) : (n(), e(r, { key: 1 }, [
167
167
  d(u(s), 1)
168
168
  ], 64)),
169
- y["x-scalar-stability"] ? (t(), e("span", q, "(" + u(y["x-scalar-stability"]) + ")", 1)) : y.deprecated ? (t(), e("span", A, "⚠️ Deprecated")) : i("", !0)
169
+ y["x-scalar-stability"] ? (n(), e("span", q, "(" + u(y["x-scalar-stability"]) + ")", 1)) : y.deprecated ? (n(), e("span", A, "⚠️ Deprecated")) : i("", !0)
170
170
  ])
171
171
  ]),
172
172
  l("ul", null, [
173
173
  l("li", null, [
174
- n[22] || (n[22] = l("strong", null, "Method:", -1)),
174
+ t[22] || (t[22] = l("strong", null, "Method:", -1)),
175
175
  l("code", null, u(g.toString().toUpperCase()), 1)
176
176
  ]),
177
177
  l("li", null, [
178
- n[23] || (n[23] = l("strong", null, "Path:", -1)),
178
+ t[23] || (t[23] = l("strong", null, "Path:", -1)),
179
179
  l("code", null, "/webhooks/" + u(s), 1)
180
180
  ]),
181
- y.tags ? (t(), e("li", F, [
182
- n[24] || (n[24] = l("strong", null, "Tags:", -1)),
181
+ y.tags ? (n(), e("li", F, [
182
+ t[24] || (t[24] = l("strong", null, "Tags:", -1)),
183
183
  d(" " + u(y.tags.join(", ")), 1)
184
184
  ])) : i("", !0),
185
- y.deprecated ? (t(), e("li", I, [...n[25] || (n[25] = [
185
+ y.deprecated ? (n(), e("li", I, [...t[25] || (t[25] = [
186
186
  l("strong", null, "Deprecated", -1)
187
187
  ])])) : i("", !0)
188
188
  ]),
@@ -192,32 +192,32 @@ const C = { key: 1 }, E = { key: 0 }, w = { key: 1 }, D = { key: 2 }, M = { key:
192
192
  ]))), 128))
193
193
  ], 64))), 128))
194
194
  ])) : i("", !0),
195
- k.content?.components?.schemas && Object.keys(k.content.components.schemas).length ? (t(), e("section", L, [
196
- n[29] || (n[29] = l("h2", null, "Schemas", -1)),
197
- (t(!0), e(r, null, m(k.content.components.schemas, (o, s) => (t(), e("section", { key: s }, [
195
+ k.content?.components?.schemas && Object.keys(k.content.components.schemas).length ? (n(), e("section", L, [
196
+ t[29] || (t[29] = l("h2", null, "Schemas", -1)),
197
+ (n(!0), e(r, null, m(k.content.components.schemas, (o, s) => (n(), e("section", { key: s }, [
198
198
  l("header", null, [
199
199
  l("h3", null, u(o.title ?? s), 1)
200
200
  ]),
201
201
  l("ul", null, [
202
202
  l("li", null, [
203
- n[27] || (n[27] = l("strong", null, "Type:", -1)),
203
+ t[27] || (t[27] = l("strong", null, "Type:", -1)),
204
204
  l("code", null, u(o.type), 1)
205
205
  ])
206
206
  ]),
207
- o.description ? (t(), v(b(j), {
207
+ o.description ? (n(), v(b(j), {
208
208
  key: 0,
209
209
  value: o.description
210
210
  }, null, 8, ["value"])) : i("", !0),
211
- o.type === "object" ? (t(), v(O, {
211
+ o.type === "object" ? (n(), v(V, {
212
212
  key: 1,
213
213
  schema: o
214
214
  }, null, 8, ["schema"])) : i("", !0),
215
- n[28] || (n[28] = l("p", null, [
215
+ t[28] || (t[28] = l("p", null, [
216
216
  l("strong", null, "Example:")
217
217
  ], -1)),
218
- o.type === "object" ? (t(), v(V, {
218
+ o.type === "object" ? (n(), v(B, {
219
219
  key: 2,
220
- "model-value": b(x)(o)
220
+ "model-value": b(O)(o)
221
221
  }, null, 8, ["model-value"])) : i("", !0)
222
222
  ]))), 128))
223
223
  ])) : i("", !0)
@@ -1,132 +1,132 @@
1
- import { defineComponent as O, resolveComponent as g, createElementBlock as t, createCommentVNode as i, openBlock as n, createElementVNode as o, Fragment as h, renderList as f, createVNode as a, createBlock as p, toDisplayString as u, createTextVNode as d } from "vue";
2
- const j = { key: 0 }, v = { key: 0 }, I = { key: 1 }, b = { key: 2 }, q = { key: 3 }, N = { key: 4 }, A = { key: 0 }, B = { key: 0 }, C = { key: 1 }, J = { key: 2 }, V = { key: 3 }, E = { key: 1 }, M = { key: 5 }, R = { key: 0 }, D = { key: 0 }, F = { key: 1 }, L = { key: 2 }, P = { key: 6 }, T = { key: 0 }, U = { key: 1 }, w = { key: 2 }, z = { key: 3 }, K = /* @__PURE__ */ O({
1
+ import { defineComponent as g, resolveComponent as j, createElementBlock as s, createCommentVNode as u, openBlock as n, createElementVNode as l, Fragment as y, renderList as h, createVNode as r, createBlock as v, toDisplayString as o, createTextVNode as a } from "vue";
2
+ const I = { key: 0 }, b = { key: 0 }, q = { key: 1 }, x = { key: 2 }, N = { key: 3 }, A = { key: 4 }, B = { key: 0 }, C = { key: 0 }, J = { key: 1 }, V = { key: 2 }, E = { key: 3 }, M = { key: 1 }, R = { key: 5 }, D = { key: 0 }, F = { key: 0 }, L = { key: 1 }, P = { key: 2 }, T = { key: 6 }, U = { key: 0 }, w = { key: 1 }, z = { key: 2 }, G = { key: 3 }, K = /* @__PURE__ */ g({
3
3
  __name: "Schema",
4
4
  props: {
5
5
  schema: { type: [Object, Boolean] }
6
6
  },
7
- setup(G) {
8
- const c = (e, s) => {
9
- const m = Object.entries(e).sort(([l], [r]) => {
10
- const y = s?.includes(l), k = s?.includes(r);
11
- return y && !k ? -1 : !y && k ? 1 : l.localeCompare(r);
7
+ setup(e) {
8
+ const O = (f, t) => {
9
+ const d = Object.entries(f).sort(([i], [m]) => {
10
+ const c = t?.includes(i), k = t?.includes(m);
11
+ return c && !k ? -1 : !c && k ? 1 : i.localeCompare(m);
12
12
  });
13
- return Object.fromEntries(m);
13
+ return Object.fromEntries(d);
14
14
  };
15
- return (e, s) => {
16
- const m = g("Schema", !0);
17
- return e.schema ? (n(), t("section", j, [
18
- e.schema.allOf ? (n(), t("section", v, [
19
- s[0] || (s[0] = o("header", null, [
20
- o("strong", null, "All of:")
15
+ return (f, t) => {
16
+ const d = j("Schema", !0);
17
+ return e.schema ? (n(), s("section", I, [
18
+ e.schema.allOf ? (n(), s("section", b, [
19
+ t[0] || (t[0] = l("header", null, [
20
+ l("strong", null, "All of:")
21
21
  ], -1)),
22
- (n(!0), t(h, null, f(e.schema.allOf, (l, r) => (n(), t("section", { key: r }, [
23
- a(m, { schema: l }, null, 8, ["schema"])
22
+ (n(!0), s(y, null, h(e.schema.allOf, (i, m) => (n(), s("section", { key: m }, [
23
+ r(d, { schema: i }, null, 8, ["schema"])
24
24
  ]))), 128))
25
- ])) : e.schema.anyOf ? (n(), t("section", I, [
26
- s[1] || (s[1] = o("header", null, [
27
- o("strong", null, "Any of:")
25
+ ])) : e.schema.anyOf ? (n(), s("section", q, [
26
+ t[1] || (t[1] = l("header", null, [
27
+ l("strong", null, "Any of:")
28
28
  ], -1)),
29
- (n(!0), t(h, null, f(e.schema.anyOf, (l, r) => (n(), t("section", { key: r }, [
30
- a(m, { schema: l }, null, 8, ["schema"])
29
+ (n(!0), s(y, null, h(e.schema.anyOf, (i, m) => (n(), s("section", { key: m }, [
30
+ r(d, { schema: i }, null, 8, ["schema"])
31
31
  ]))), 128))
32
- ])) : e.schema.oneOf ? (n(), t("section", b, [
33
- s[2] || (s[2] = o("header", null, [
34
- o("strong", null, "One of:")
32
+ ])) : e.schema.oneOf ? (n(), s("section", x, [
33
+ t[2] || (t[2] = l("header", null, [
34
+ l("strong", null, "One of:")
35
35
  ], -1)),
36
- (n(!0), t(h, null, f(e.schema.oneOf, (l, r) => (n(), t("section", { key: r }, [
37
- a(m, { schema: l }, null, 8, ["schema"])
36
+ (n(!0), s(y, null, h(e.schema.oneOf, (i, m) => (n(), s("section", { key: m }, [
37
+ r(d, { schema: i }, null, 8, ["schema"])
38
38
  ]))), 128))
39
- ])) : e.schema.not ? (n(), t("section", q, [
40
- s[3] || (s[3] = o("header", null, [
41
- o("strong", null, "Not:")
39
+ ])) : e.schema.not ? (n(), s("section", N, [
40
+ t[3] || (t[3] = l("header", null, [
41
+ l("strong", null, "Not:")
42
42
  ], -1)),
43
- o("section", null, [
44
- a(m, {
43
+ l("section", null, [
44
+ r(d, {
45
45
  schema: e.schema.not
46
46
  }, null, 8, ["schema"])
47
47
  ])
48
- ])) : e.schema.type === "object" || e.schema.properties ? (n(), t("section", N, [
49
- o("ul", null, [
50
- (n(!0), t(h, null, f(c(
48
+ ])) : e.schema.type === "object" || e.schema.properties ? (n(), s("section", A, [
49
+ l("ul", null, [
50
+ (n(!0), s(y, null, h(O(
51
51
  e.schema.properties || {},
52
52
  e.schema.required
53
- ), (l, r) => (n(), t("li", { key: r }, [
54
- o("strong", null, [
55
- o("code", null, u(r), 1),
56
- e.schema.required?.includes(r) ? (n(), t("span", A, " (required) ")) : i("", !0)
53
+ ), (i, m) => (n(), s("li", { key: m }, [
54
+ l("strong", null, [
55
+ l("code", null, o(m), 1),
56
+ e.schema.required?.includes(m) ? (n(), s("span", B, " (required) ")) : u("", !0)
57
57
  ]),
58
- o("p", null, [
59
- o("code", null, u(Array.isArray(l.type) ? l.type.join(" | ") : l.type || "object"), 1),
60
- l.format ? (n(), t("span", B, [
61
- s[4] || (s[4] = d(", format: ", -1)),
62
- o("code", null, u(l.format), 1)
63
- ])) : i("", !0),
64
- l.enum ? (n(), t("span", C, [
65
- s[5] || (s[5] = d(", possible values: ", -1)),
66
- o("code", null, u(l.enum.map((y) => JSON.stringify(y)).join(", ")), 1)
67
- ])) : i("", !0),
68
- l.default !== void 0 ? (n(), t("span", J, [
69
- s[6] || (s[6] = d(", default: ", -1)),
70
- o("code", null, u(JSON.stringify(l.default)), 1)
71
- ])) : i("", !0),
72
- l.description ? (n(), t("span", V, " — " + u(l.description), 1)) : i("", !0)
58
+ l("p", null, [
59
+ l("code", null, o(Array.isArray(i.type) ? i.type.join(" | ") : i.type || "object"), 1),
60
+ i.format ? (n(), s("span", C, [
61
+ t[4] || (t[4] = a(", format: ", -1)),
62
+ l("code", null, o(i.format), 1)
63
+ ])) : u("", !0),
64
+ i.enum ? (n(), s("span", J, [
65
+ t[5] || (t[5] = a(", possible values: ", -1)),
66
+ l("code", null, o(i.enum.map((c) => JSON.stringify(c)).join(", ")), 1)
67
+ ])) : u("", !0),
68
+ i.default !== void 0 ? (n(), s("span", V, [
69
+ t[6] || (t[6] = a(", default: ", -1)),
70
+ l("code", null, o(JSON.stringify(i.default)), 1)
71
+ ])) : u("", !0),
72
+ i.description ? (n(), s("span", E, " — " + o(i.description), 1)) : u("", !0)
73
73
  ]),
74
- l.type === "object" || l.properties ? (n(), p(m, {
74
+ i.type === "object" || i.properties ? (n(), v(d, {
75
75
  key: 0,
76
- schema: l
77
- }, null, 8, ["schema"])) : i("", !0),
78
- l.type === "array" && l.items ? (n(), t("section", E, [
79
- s[7] || (s[7] = o("header", null, [
80
- o("strong", null, "Items:")
76
+ schema: i
77
+ }, null, 8, ["schema"])) : u("", !0),
78
+ i.type === "array" && i.items ? (n(), s("section", M, [
79
+ t[7] || (t[7] = l("header", null, [
80
+ l("strong", null, "Items:")
81
81
  ], -1)),
82
- a(m, {
83
- schema: l.items
82
+ r(d, {
83
+ schema: i.items
84
84
  }, null, 8, ["schema"])
85
- ])) : i("", !0)
85
+ ])) : u("", !0)
86
86
  ]))), 128))
87
87
  ])
88
- ])) : e.schema.type === "array" && e.schema.items ? (n(), t("section", M, [
89
- s[11] || (s[11] = o("header", null, [
90
- o("strong", null, "Array of:")
88
+ ])) : e.schema.type === "array" && e.schema.items ? (n(), s("section", R, [
89
+ t[11] || (t[11] = l("header", null, [
90
+ l("strong", null, "Array of:")
91
91
  ], -1)),
92
- o("section", null, [
93
- a(m, {
92
+ l("section", null, [
93
+ r(d, {
94
94
  schema: e.schema.items
95
95
  }, null, 8, ["schema"])
96
96
  ]),
97
- e.schema.minItems !== void 0 || e.schema.maxItems !== void 0 || e.schema.uniqueItems ? (n(), t("ul", R, [
98
- e.schema.minItems !== void 0 ? (n(), t("li", D, [
99
- s[8] || (s[8] = d(" Min items: ", -1)),
100
- o("code", null, u(e.schema.minItems), 1)
101
- ])) : i("", !0),
102
- e.schema.maxItems !== void 0 ? (n(), t("li", F, [
103
- s[9] || (s[9] = d(" Max items: ", -1)),
104
- o("code", null, u(e.schema.maxItems), 1)
105
- ])) : i("", !0),
106
- e.schema.uniqueItems ? (n(), t("li", L, [...s[10] || (s[10] = [
107
- d("Unique items: ", -1),
108
- o("code", null, "true", -1)
109
- ])])) : i("", !0)
110
- ])) : i("", !0)
111
- ])) : (n(), t("section", P, [
112
- o("p", null, [
113
- o("code", null, u(e.schema.type), 1),
114
- e.schema.format ? (n(), t("span", T, [
115
- s[12] || (s[12] = d(", format: ", -1)),
116
- o("code", null, u(e.schema.format), 1)
117
- ])) : i("", !0),
118
- e.schema.enum ? (n(), t("span", U, [
119
- s[13] || (s[13] = d(", possible values: ", -1)),
120
- o("code", null, u(e.schema.enum.map((l) => JSON.stringify(l)).join(", ")), 1)
121
- ])) : i("", !0),
122
- e.schema.default !== void 0 ? (n(), t("span", w, [
123
- s[14] || (s[14] = d(", default: ", -1)),
124
- o("code", null, u(JSON.stringify(e.schema.default)), 1)
125
- ])) : i("", !0),
126
- e.schema.description ? (n(), t("span", z, " — " + u(e.schema.description), 1)) : i("", !0)
97
+ e.schema.minItems !== void 0 || e.schema.maxItems !== void 0 || e.schema.uniqueItems ? (n(), s("ul", D, [
98
+ e.schema.minItems !== void 0 ? (n(), s("li", F, [
99
+ t[8] || (t[8] = a(" Min items: ", -1)),
100
+ l("code", null, o(e.schema.minItems), 1)
101
+ ])) : u("", !0),
102
+ e.schema.maxItems !== void 0 ? (n(), s("li", L, [
103
+ t[9] || (t[9] = a(" Max items: ", -1)),
104
+ l("code", null, o(e.schema.maxItems), 1)
105
+ ])) : u("", !0),
106
+ e.schema.uniqueItems ? (n(), s("li", P, [...t[10] || (t[10] = [
107
+ a("Unique items: ", -1),
108
+ l("code", null, "true", -1)
109
+ ])])) : u("", !0)
110
+ ])) : u("", !0)
111
+ ])) : (n(), s("section", T, [
112
+ l("p", null, [
113
+ l("code", null, o(e.schema.type), 1),
114
+ e.schema.format ? (n(), s("span", U, [
115
+ t[12] || (t[12] = a(", format: ", -1)),
116
+ l("code", null, o(e.schema.format), 1)
117
+ ])) : u("", !0),
118
+ e.schema.enum ? (n(), s("span", w, [
119
+ t[13] || (t[13] = a(", possible values: ", -1)),
120
+ l("code", null, o(e.schema.enum.map((i) => JSON.stringify(i)).join(", ")), 1)
121
+ ])) : u("", !0),
122
+ e.schema.default !== void 0 ? (n(), s("span", z, [
123
+ t[14] || (t[14] = a(", default: ", -1)),
124
+ l("code", null, o(JSON.stringify(e.schema.default)), 1)
125
+ ])) : u("", !0),
126
+ e.schema.description ? (n(), s("span", G, " — " + o(e.schema.description), 1)) : u("", !0)
127
127
  ])
128
128
  ]))
129
- ])) : i("", !0);
129
+ ])) : u("", !0);
130
130
  };
131
131
  }
132
132
  });
@@ -1,16 +1,16 @@
1
- import { defineComponent as s, createElementBlock as o, openBlock as l, createElementVNode as n, toDisplayString as t, unref as a } from "vue";
2
- import { json2xml as r } from "@scalar/helpers/file/json2xml";
3
- const m = { key: 0 }, c = { class: "language-xml" }, p = { key: 1 }, d = { class: "language-json" }, g = /* @__PURE__ */ s({
1
+ import { defineComponent as a, createElementBlock as o, openBlock as t, createElementVNode as l, toDisplayString as n, unref as s } from "vue";
2
+ import { json2xml as c } from "@scalar/helpers/file/json2xml";
3
+ const m = { key: 0 }, r = { class: "language-xml" }, d = { key: 1 }, i = { class: "language-json" }, g = /* @__PURE__ */ a({
4
4
  __name: "XmlOrJson",
5
5
  props: {
6
6
  xml: { type: Boolean, default: !1 },
7
7
  modelValue: { type: [Object, Boolean] }
8
8
  },
9
- setup(_) {
10
- return (e, i) => e.xml ? (l(), o("pre", m, [
11
- n("code", c, t(a(r)(e.modelValue)), 1)
12
- ])) : (l(), o("pre", p, [
13
- n("code", d, t(JSON.stringify(e.modelValue, null, 2)), 1)
9
+ setup(e) {
10
+ return (u, _) => e.xml ? (t(), o("pre", m, [
11
+ l("code", r, n(s(c)(e.modelValue)), 1)
12
+ ])) : (t(), o("pre", d, [
13
+ l("code", i, n(JSON.stringify(e.modelValue, null, 2)), 1)
14
14
  ]));
15
15
  }
16
16
  });
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "llm",
17
17
  "swagger"
18
18
  ],
19
- "version": "0.3.19",
19
+ "version": "0.3.22",
20
20
  "engines": {
21
21
  "node": ">=20"
22
22
  },
@@ -52,24 +52,24 @@
52
52
  "remark-gfm": "^4.0.0",
53
53
  "remark-stringify": "^11.0.0",
54
54
  "unified": "^11.0.4",
55
- "vue": "^3.5.21",
56
- "@scalar/helpers": "0.2.7",
57
- "@scalar/oas-utils": "0.6.16",
58
- "@scalar/openapi-parser": "0.23.13",
59
- "@scalar/openapi-types": "0.5.3",
55
+ "vue": "^3.5.26",
56
+ "@scalar/components": "0.16.22",
57
+ "@scalar/helpers": "0.2.8",
58
+ "@scalar/oas-utils": "0.6.19",
59
+ "@scalar/openapi-parser": "0.24.1",
60
60
  "@scalar/openapi-upgrader": "0.1.7",
61
- "@scalar/types": "0.5.7",
62
- "@scalar/components": "0.16.19"
61
+ "@scalar/openapi-types": "0.5.3",
62
+ "@scalar/types": "0.5.8"
63
63
  },
64
64
  "devDependencies": {
65
- "@hono/node-server": "1.19.5",
65
+ "@hono/node-server": "^1.19.7",
66
66
  "@types/html-minifier-terser": "^7.0.2",
67
- "@vitejs/plugin-vue": "6.0.1",
67
+ "@vitejs/plugin-vue": "^6.0.3",
68
68
  "@vue/test-utils": "2.4.6",
69
69
  "hono": "4.11.4",
70
- "vite": "7.1.11",
71
- "vitest": "3.2.4",
72
- "vue": "^3.5.21",
70
+ "vite": "^7.3.1",
71
+ "vitest": "4.0.16",
72
+ "vue": "^3.5.26",
73
73
  "@scalar/build-tooling": "0.4.1",
74
74
  "@scalar/galaxy": "0.5.12"
75
75
  },