We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fec0a09 commit 0e3158bCopy full SHA for 0e3158b
.changeset/extract-request-params-delete.md
@@ -0,0 +1,5 @@
1
+---
2
+"swagger-typescript-api": patch
3
4
+
5
+Support extracting request parameters for routes that only declare path parameters, such as DELETE methods.
src/schema-routes/schema-routes.ts
@@ -645,7 +645,11 @@ export class SchemaRoutes {
645
extractRequestParams,
646
routeName,
647
}) => {
648
- if (!queryParams || !queryParams.length) return null;
+ if (
649
+ (!queryParams || !queryParams.length) &&
650
+ (!pathArgsSchemas || !pathArgsSchemas.length)
651
+ )
652
+ return null;
653
654
const pathParams = pathArgsSchemas.reduce((acc, pathArgSchema) => {
655
if (pathArgSchema.name) {
0 commit comments