@scalar/fastify-api-reference 1.25.17 → 1.25.19
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 +8 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +25 -19
- package/dist/js/standalone.js +15108 -14635
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -14109,33 +14109,39 @@ function t$5(t5) {
|
|
|
14109
14109
|
return ((_a2 = e4.$ref) == null ? void 0 : _a2.startsWith("#/definitions/")) && (e4.$ref = e4.$ref.replace(/^#\/definitions\//, "#/components/schemas/")), e4;
|
|
14110
14110
|
})), t5.paths) {
|
|
14111
14111
|
for (const e4 in t5.paths) if (Object.hasOwn(t5.paths, e4)) {
|
|
14112
|
-
const
|
|
14113
|
-
for (const e5 in
|
|
14114
|
-
const
|
|
14115
|
-
if (
|
|
14116
|
-
const e6 = structuredClone(
|
|
14112
|
+
const o2 = t5.paths[e4];
|
|
14113
|
+
for (const e5 in o2) if (Object.hasOwn(o2, e5)) {
|
|
14114
|
+
const s2 = o2[e5];
|
|
14115
|
+
if (s2.parameters) {
|
|
14116
|
+
const e6 = structuredClone(s2.parameters.find((e7) => "body" === e7.in) ?? {});
|
|
14117
14117
|
if (e6 && Object.keys(e6).length) {
|
|
14118
14118
|
delete e6.name, delete e6.in;
|
|
14119
|
-
const
|
|
14120
|
-
"object" != typeof
|
|
14119
|
+
const o4 = t5.consumes ?? s2.consumes ?? ["application/json"];
|
|
14120
|
+
"object" != typeof s2.requestBody && (s2.requestBody = {}), "object" != typeof s2.requestBody.content && (s2.requestBody.content = {});
|
|
14121
14121
|
const { schema: n2, ...r3 } = e6;
|
|
14122
|
-
|
|
14123
|
-
for (const e7 of
|
|
14122
|
+
s2.requestBody = { ...s2.requestBody, ...r3 };
|
|
14123
|
+
for (const e7 of o4) s2.requestBody.content[e7] = { schema: n2 };
|
|
14124
|
+
}
|
|
14125
|
+
s2.parameters = s2.parameters.filter((e7) => "body" !== e7.in), delete s2.consumes;
|
|
14126
|
+
const o3 = s2.parameters.filter((e7) => "formData" === e7.in);
|
|
14127
|
+
if (o3.length > 0) {
|
|
14128
|
+
"object" != typeof s2.requestBody && (s2.requestBody = {}), "object" != typeof s2.requestBody.content && (s2.requestBody.content = {}), s2.requestBody.content["application/x-www-form-urlencoded"] = { schema: { type: "object", properties: {}, required: [] } };
|
|
14129
|
+
for (const e7 of o3) s2.requestBody.content["application/x-www-form-urlencoded"].schema.properties[e7.name] = { type: e7.type, description: e7.description }, e7.required && s2.requestBody.content["application/x-www-form-urlencoded"].schema.required.push(e7.name);
|
|
14130
|
+
s2.parameters = s2.parameters.filter((e7) => "formData" !== e7.in);
|
|
14124
14131
|
}
|
|
14125
|
-
o2.parameters = o2.parameters.filter((e7) => "body" !== e7.in), delete o2.consumes;
|
|
14126
14132
|
}
|
|
14127
|
-
if (
|
|
14128
|
-
for (const e6 in
|
|
14129
|
-
const
|
|
14130
|
-
if (
|
|
14131
|
-
const e7 = t5.produces ??
|
|
14132
|
-
"object" != typeof
|
|
14133
|
-
for (const t6 of e7)
|
|
14134
|
-
delete
|
|
14133
|
+
if (s2.responses) {
|
|
14134
|
+
for (const e6 in s2.responses) if (Object.hasOwn(s2.responses, e6)) {
|
|
14135
|
+
const o3 = s2.responses[e6];
|
|
14136
|
+
if (o3.schema) {
|
|
14137
|
+
const e7 = t5.produces ?? s2.produces ?? ["application/json"];
|
|
14138
|
+
"object" != typeof o3.content && (o3.content = {});
|
|
14139
|
+
for (const t6 of e7) o3.content[t6] = { schema: o3.schema };
|
|
14140
|
+
delete o3.schema;
|
|
14135
14141
|
}
|
|
14136
14142
|
}
|
|
14137
14143
|
}
|
|
14138
|
-
delete
|
|
14144
|
+
delete s2.produces, 0 === ((_c = s2.parameters) == null ? void 0 : _c.length) && delete s2.parameters;
|
|
14139
14145
|
}
|
|
14140
14146
|
}
|
|
14141
14147
|
}
|