Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swagger-Codegen: How do I consolidate all files into one file for Client-Code-Generation

Tags:

I’ve just got started with Swagger and NodeJS. I was able to implement Swagger to my NodeExpress application and was also able to generate typescript-client-code with Swagger-Codegen (Typescript-Angular) to be exact.

One problem that I have is the generated code is so spread out many different files. I was hoping that it only output one file api.ts and it contains everything from API calls and interfaces/models.

I’ve been looking for a way to solve this problem because it is hard to read and maintain the generated-client-code as the backend grows.

Any suggestions or pointers would be much appreciated.

Happy Holiday! Thank you

EDIT: I have been looking for answers for this for a couple of days and still haven't found one. I'm currently working on a project with ASP.NET Core and they have NSwag which does what I want to achieve with Node Swagger.