Skip to content

Commit

Permalink
Merge pull request #421 from tsedio/fix-generate-swagger-http-client
Browse files Browse the repository at this point in the history
fix(cli-generate-http-client): fix missing .ts extension when generat…
  • Loading branch information
Romakita authored Nov 26, 2024
2 parents 9e9a341 + a346274 commit 257114b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ export class GenerateHttpClientCmd implements CommandProvider {
.replace("requestParams.headers.put = {};", "")
.replace("(this.instance.defaults.headers || {})", "((this.instance.defaults.headers || {}) as any)");

console.log(`${$ctx.output}/${name}`, path.resolve(`${$ctx.output}/${name}`));
return this.fs.writeFile(`${$ctx.output}/${name}`, file.fileContent, {encoding: "utf8"});
return this.fs.writeFile(`${$ctx.output}/${name}.ts`, file.fileContent, {encoding: "utf8"});
});

return Promise.all(promises);
Expand Down

0 comments on commit 257114b

Please sign in to comment.