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({
146146 default : codeGenBaseConfig . enumNamesAsValues ,
147147 } ,
148148 "extract-request-params" : {
149+ type : "boolean" ,
149150 description :
150151 "extract request params to data contract (Also combine path params and query params into one object)" ,
151152 default : codeGenBaseConfig . extractRequestParams ,
@@ -280,7 +281,7 @@ const generateCommand = defineCommand({
280281 } ,
281282 } ,
282283 run : async ( { args } ) => {
283- let customConfig ;
284+ let customConfig = undefined ;
284285
285286 if ( args [ "custom-config" ] ) {
286287 try {
@@ -314,7 +315,7 @@ const generateCommand = defineCommand({
314315 extractResponseError : args [ "extract-response-error" ] ,
315316 extractResponses : args [ "extract-responses" ] ,
316317 fileName : args . name ,
317- generateClient : ! ( args . axios || args [ "no-client" ] ) ,
318+ generateClient : ! args [ "no-client" ] ,
318319 generateResponses : args . responses ,
319320 generateRouteTypes : args [ "route-types" ] ,
320321 generateUnionEnums : args [ "union-enums" ] ,
You can’t perform that action at this time.
0 commit comments