sprint-es 0.0.66 → 0.0.67
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/dist/cjs/index.cjs +4 -5
- package/dist/esm/index.js +4 -5
- package/dist/types/sprint.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -167,7 +167,8 @@ class Sprint {
|
|
|
167
167
|
console.log(`[Sprint] Loading Swagger UI...`);
|
|
168
168
|
import("swagger-ui-express").then((swaggerUi) => {
|
|
169
169
|
console.log(`[Sprint] Swagger UI imported successfully`);
|
|
170
|
-
this.app.use("/swagger", swaggerUi.serve
|
|
170
|
+
this.app.use("/swagger", swaggerUi.serve);
|
|
171
|
+
this.app.use("/swagger", swaggerUi.setup(void 0, {
|
|
171
172
|
swaggerUrl: "/openapi.json"
|
|
172
173
|
}));
|
|
173
174
|
console.log(`[Sprint] Swagger UI mounted at /swagger`);
|
|
@@ -439,7 +440,7 @@ class Sprint {
|
|
|
439
440
|
}
|
|
440
441
|
}
|
|
441
442
|
};
|
|
442
|
-
if (route.schema?.body) {
|
|
443
|
+
if (route.schema?.body && !["GET", "HEAD", "DELETE"].includes(route.method)) {
|
|
443
444
|
try {
|
|
444
445
|
const bodySchema = this.zodSchemaToOpenAPI(route.schema.body);
|
|
445
446
|
if (Object.keys(bodySchema).length > 0) {
|
|
@@ -458,9 +459,7 @@ class Sprint {
|
|
|
458
459
|
if (route.schema?.queryParams) {
|
|
459
460
|
try {
|
|
460
461
|
const params = this.zodParamsToOpenAPI(route.schema.queryParams);
|
|
461
|
-
if (params.length > 0)
|
|
462
|
-
routeSpec.parameters = params;
|
|
463
|
-
}
|
|
462
|
+
if (params.length > 0) routeSpec.parameters = params;
|
|
464
463
|
} catch (e) {
|
|
465
464
|
console.warn("[Sprint] Failed to convert query params schema:", e);
|
|
466
465
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -142,7 +142,8 @@ class Sprint {
|
|
|
142
142
|
console.log(`[Sprint] Loading Swagger UI...`);
|
|
143
143
|
import("swagger-ui-express").then((swaggerUi) => {
|
|
144
144
|
console.log(`[Sprint] Swagger UI imported successfully`);
|
|
145
|
-
this.app.use("/swagger", swaggerUi.serve
|
|
145
|
+
this.app.use("/swagger", swaggerUi.serve);
|
|
146
|
+
this.app.use("/swagger", swaggerUi.setup(void 0, {
|
|
146
147
|
swaggerUrl: "/openapi.json"
|
|
147
148
|
}));
|
|
148
149
|
console.log(`[Sprint] Swagger UI mounted at /swagger`);
|
|
@@ -414,7 +415,7 @@ class Sprint {
|
|
|
414
415
|
}
|
|
415
416
|
}
|
|
416
417
|
};
|
|
417
|
-
if (route.schema?.body) {
|
|
418
|
+
if (route.schema?.body && !["GET", "HEAD", "DELETE"].includes(route.method)) {
|
|
418
419
|
try {
|
|
419
420
|
const bodySchema = this.zodSchemaToOpenAPI(route.schema.body);
|
|
420
421
|
if (Object.keys(bodySchema).length > 0) {
|
|
@@ -433,9 +434,7 @@ class Sprint {
|
|
|
433
434
|
if (route.schema?.queryParams) {
|
|
434
435
|
try {
|
|
435
436
|
const params = this.zodParamsToOpenAPI(route.schema.queryParams);
|
|
436
|
-
if (params.length > 0)
|
|
437
|
-
routeSpec.parameters = params;
|
|
438
|
-
}
|
|
437
|
+
if (params.length > 0) routeSpec.parameters = params;
|
|
439
438
|
} catch (e) {
|
|
440
439
|
console.warn("[Sprint] Failed to convert query params schema:", e);
|
|
441
440
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprint.d.ts","sourceRoot":"","sources":["../../src/sprint.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAA+B,gBAAgB,EAAoB,MAAM,SAAS,CAAC;AACnG,OAAO,OAAO,EAAE,EAAE,WAAW,EAAoD,MAAM,SAAS,CAAC;AAejG,eAAO,MAAM,aAAa,SAAQ,CAAC;AACnC,eAAO,MAAM,YAAY,SAAS,CAAC;AAwCnC,qBAAa,MAAM;IACR,G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