@tim-smart/openapi-gen 0.4.9 → 0.4.10
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/main.js +8 -0
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -35559,6 +35559,7 @@ var make65 = gen2(function* () {
|
|
|
35559
35559
|
);
|
|
35560
35560
|
op.payloadFormData = true;
|
|
35561
35561
|
}
|
|
35562
|
+
let defaultSchema;
|
|
35562
35563
|
Object.entries(operation.responses ?? {}).forEach(
|
|
35563
35564
|
([status2, response]) => {
|
|
35564
35565
|
if (response.content?.["application/json"]?.schema) {
|
|
@@ -35568,6 +35569,10 @@ var make65 = gen2(function* () {
|
|
|
35568
35569
|
context7,
|
|
35569
35570
|
true
|
|
35570
35571
|
);
|
|
35572
|
+
if (status2 === "default") {
|
|
35573
|
+
defaultSchema = schemaName;
|
|
35574
|
+
return;
|
|
35575
|
+
}
|
|
35571
35576
|
const statusLower = status2.toLowerCase();
|
|
35572
35577
|
const statusMajorNumber = Number(status2[0]);
|
|
35573
35578
|
if (isNaN(statusMajorNumber)) {
|
|
@@ -35580,6 +35585,9 @@ var make65 = gen2(function* () {
|
|
|
35580
35585
|
}
|
|
35581
35586
|
}
|
|
35582
35587
|
);
|
|
35588
|
+
if (op.successSchemas.size === 0 && defaultSchema) {
|
|
35589
|
+
op.successSchemas.set("2xx", defaultSchema);
|
|
35590
|
+
}
|
|
35583
35591
|
operations.push(op);
|
|
35584
35592
|
});
|
|
35585
35593
|
Object.entries(spec2.paths).forEach(
|