@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
|
|
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
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
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 (
|
|
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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
23
|
-
|
|
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 ? (
|
|
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 ? (
|
|
33
|
-
|
|
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
|
-
(
|
|
35
|
+
(n(!0), e(r, null, m(k.content.servers, (o) => (n(), e("li", {
|
|
36
36
|
key: o.url
|
|
37
37
|
}, [
|
|
38
|
-
|
|
39
|
-
|
|
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 ? (
|
|
43
|
-
|
|
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 ? (
|
|
47
|
-
|
|
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
|
-
(
|
|
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
|
-
|
|
51
|
+
t[5] || (t[5] = d(" (default: ", -1)),
|
|
52
52
|
l("code", null, u(s.default), 1),
|
|
53
|
-
|
|
54
|
-
s.description ? (
|
|
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 ? (
|
|
65
|
-
|
|
66
|
-
(
|
|
67
|
-
(
|
|
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 ? (
|
|
70
|
+
s.summary ? (n(), e(r, { key: 0 }, [
|
|
71
71
|
d(u(s.summary), 1)
|
|
72
|
-
], 64)) : (
|
|
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"] ? (
|
|
75
|
+
s["x-scalar-stability"] ? (n(), e(r, { key: 2 }, [
|
|
76
76
|
d(" (" + u(s["x-scalar-stability"]) + ") ", 1)
|
|
77
|
-
], 64)) : s.deprecated ? (
|
|
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
|
-
|
|
85
|
-
|
|
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
|
-
|
|
90
|
-
|
|
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 ? (
|
|
94
|
-
|
|
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"] ? (
|
|
98
|
-
|
|
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 ? (
|
|
106
|
-
|
|
107
|
-
(
|
|
108
|
-
l("h5", null, "Content-Type: " + u(
|
|
109
|
-
g.schema ? (
|
|
110
|
-
f(
|
|
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
|
-
|
|
113
|
+
t[17] || (t[17] = l("p", null, [
|
|
114
114
|
l("strong", null, "Example:")
|
|
115
115
|
], -1)),
|
|
116
|
-
f(
|
|
117
|
-
xml:
|
|
118
|
-
"model-value": b(
|
|
119
|
-
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 ? (
|
|
126
|
-
|
|
127
|
-
(
|
|
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(
|
|
131
|
-
g.description ? (
|
|
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
|
-
(
|
|
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 ? (
|
|
139
|
-
f(
|
|
138
|
+
a.schema ? (n(), e(r, { key: 0 }, [
|
|
139
|
+
f(V, {
|
|
140
140
|
schema: a.schema
|
|
141
141
|
}, null, 8, ["schema"]),
|
|
142
|
-
|
|
142
|
+
t[19] || (t[19] = l("p", null, [
|
|
143
143
|
l("strong", null, "Example:")
|
|
144
144
|
], -1)),
|
|
145
|
-
f(
|
|
145
|
+
f(B, {
|
|
146
146
|
xml: S?.toString().includes("xml"),
|
|
147
|
-
"model-value": b(
|
|
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 ? (
|
|
159
|
-
|
|
160
|
-
(
|
|
161
|
-
(
|
|
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 ? (
|
|
164
|
+
y.summary ? (n(), e(r, { key: 0 }, [
|
|
165
165
|
d(u(y.summary), 1)
|
|
166
|
-
], 64)) : (
|
|
166
|
+
], 64)) : (n(), e(r, { key: 1 }, [
|
|
167
167
|
d(u(s), 1)
|
|
168
168
|
], 64)),
|
|
169
|
-
y["x-scalar-stability"] ? (
|
|
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
|
-
|
|
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
|
-
|
|
178
|
+
t[23] || (t[23] = l("strong", null, "Path:", -1)),
|
|
179
179
|
l("code", null, "/webhooks/" + u(s), 1)
|
|
180
180
|
]),
|
|
181
|
-
y.tags ? (
|
|
182
|
-
|
|
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 ? (
|
|
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 ? (
|
|
196
|
-
|
|
197
|
-
(
|
|
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
|
-
|
|
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 ? (
|
|
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" ? (
|
|
211
|
+
o.type === "object" ? (n(), v(V, {
|
|
212
212
|
key: 1,
|
|
213
213
|
schema: o
|
|
214
214
|
}, null, 8, ["schema"])) : i("", !0),
|
|
215
|
-
|
|
215
|
+
t[28] || (t[28] = l("p", null, [
|
|
216
216
|
l("strong", null, "Example:")
|
|
217
217
|
], -1)),
|
|
218
|
-
o.type === "object" ? (
|
|
218
|
+
o.type === "object" ? (n(), v(B, {
|
|
219
219
|
key: 2,
|
|
220
|
-
"model-value": b(
|
|
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
|
|
2
|
-
const
|
|
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(
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
return
|
|
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(
|
|
13
|
+
return Object.fromEntries(d);
|
|
14
14
|
};
|
|
15
|
-
return (
|
|
16
|
-
const
|
|
17
|
-
return e.schema ? (n(),
|
|
18
|
-
e.schema.allOf ? (n(),
|
|
19
|
-
|
|
20
|
-
|
|
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),
|
|
23
|
-
|
|
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(),
|
|
26
|
-
|
|
27
|
-
|
|
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),
|
|
30
|
-
|
|
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(),
|
|
33
|
-
|
|
34
|
-
|
|
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),
|
|
37
|
-
|
|
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(),
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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(),
|
|
49
|
-
|
|
50
|
-
(n(!0),
|
|
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
|
-
), (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
e.schema.required?.includes(
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
])) :
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
])) :
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
])) :
|
|
72
|
-
|
|
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
|
-
|
|
74
|
+
i.type === "object" || i.properties ? (n(), v(d, {
|
|
75
75
|
key: 0,
|
|
76
|
-
schema:
|
|
77
|
-
}, null, 8, ["schema"])) :
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
83
|
-
schema:
|
|
82
|
+
r(d, {
|
|
83
|
+
schema: i.items
|
|
84
84
|
}, null, 8, ["schema"])
|
|
85
|
-
])) :
|
|
85
|
+
])) : u("", !0)
|
|
86
86
|
]))), 128))
|
|
87
87
|
])
|
|
88
|
-
])) : e.schema.type === "array" && e.schema.items ? (n(),
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
93
|
-
|
|
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(),
|
|
98
|
-
e.schema.minItems !== void 0 ? (n(),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
])) :
|
|
102
|
-
e.schema.maxItems !== void 0 ? (n(),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
])) :
|
|
106
|
-
e.schema.uniqueItems ? (n(),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
])])) :
|
|
110
|
-
])) :
|
|
111
|
-
])) : (n(),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
e.schema.format ? (n(),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
])) :
|
|
118
|
-
e.schema.enum ? (n(),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
])) :
|
|
122
|
-
e.schema.default !== void 0 ? (n(),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
])) :
|
|
126
|
-
e.schema.description ? (n(),
|
|
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
|
-
])) :
|
|
129
|
+
])) : u("", !0);
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { json2xml as
|
|
3
|
-
const m = { key: 0 },
|
|
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 (
|
|
11
|
-
|
|
12
|
-
])) : (
|
|
13
|
-
|
|
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
|
+
"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.
|
|
56
|
-
"@scalar/
|
|
57
|
-
"@scalar/
|
|
58
|
-
"@scalar/
|
|
59
|
-
"@scalar/openapi-
|
|
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.
|
|
62
|
-
"@scalar/
|
|
61
|
+
"@scalar/openapi-types": "0.5.3",
|
|
62
|
+
"@scalar/types": "0.5.8"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@hono/node-server": "1.19.
|
|
65
|
+
"@hono/node-server": "^1.19.7",
|
|
66
66
|
"@types/html-minifier-terser": "^7.0.2",
|
|
67
|
-
"@vitejs/plugin-vue": "6.0.
|
|
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
|
|
71
|
-
"vitest": "
|
|
72
|
-
"vue": "^3.5.
|
|
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
|
},
|