fmvilas / swagger-node-codegen

An OpenAPI 3.x/Swagger 2 code generator for Node.js
Apache License 2.0
200 stars 55 forks source link

Feat request: add ability to generate model files #52

Open crhistianramirez opened 5 years ago

crhistianramirez commented 5 years ago

In the same way we can generate multiple operation files from a single template, it would be beneficial to generate multiple model files from a single template. This would allow us to support strongly typed languages that share interfaces/models.

We'd just need a way to differentiate those types of files. Currently, operations are denoted by three underscores, maybe we could reserve some other set of characters for models. Another idea to solve for this would be to have some kind of file registry. This would allow us to associate a template explicitly with one of the many ways it can be interpreted by the codegen. This would also let us name handlebar files in .hbs so we can get some intellisense while templating locally.

I'd be happy to work on this :)

fmvilas commented 5 years ago

Hi @crhistianramirez! I don't maintain this project anymore, in favor of https://github.com/fmvilas/openapi3-generator. You may want to have a look at it. If that's good for you, we can transfer this issue there, as I think it's a great idea.