File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " swagger-typescript-api " : patch
3
+ ---
4
+
5
+ Add boolean type for ` extract-request-params ` in command configuration.
Original file line number Diff line number Diff line change
1
+ ---
2
+ " swagger-typescript-api " : patch
3
+ ---
4
+
5
+ Fix generateClient logic to exclude only 'no-client' argument.
Original file line number Diff line number Diff line change
1
+ ---
2
+ " swagger-typescript-api " : patch
3
+ ---
4
+
5
+ Initialise ` customConfig ` to ` undefined ` in command run function.
Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ const generateCommand = defineCommand({
146
146
default : codeGenBaseConfig . enumNamesAsValues ,
147
147
} ,
148
148
"extract-request-params" : {
149
+ type : "boolean" ,
149
150
description :
150
151
"extract request params to data contract (Also combine path params and query params into one object)" ,
151
152
default : codeGenBaseConfig . extractRequestParams ,
@@ -280,7 +281,7 @@ const generateCommand = defineCommand({
280
281
} ,
281
282
} ,
282
283
run : async ( { args } ) => {
283
- let customConfig ;
284
+ let customConfig = undefined ;
284
285
285
286
if ( args [ "custom-config" ] ) {
286
287
try {
@@ -314,7 +315,7 @@ const generateCommand = defineCommand({
314
315
extractResponseError : args [ "extract-response-error" ] ,
315
316
extractResponses : args [ "extract-responses" ] ,
316
317
fileName : args . name ,
317
- generateClient : ! ( args . axios || args [ "no-client" ] ) ,
318
+ generateClient : ! args [ "no-client" ] ,
318
319
generateResponses : args . responses ,
319
320
generateRouteTypes : args [ "route-types" ] ,
320
321
generateUnionEnums : args [ "union-enums" ] ,
You can’t perform that action at this time.
0 commit comments