You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now only Mustache is supported, I can see the benefits of the template language. It's just a little bit off putting for people how doesn't know it that well to build custom templates.
I don't consider this important, just would like to open a discussion around it.
API Proposal
There are already a something building on top of this, building this up more to be able to handle more abstract types would make it easy to solve.
I like this! @Markionium and I have previously discussed supporting ES6 template literals for instance. To maintain backwards compatibility and allow people to use their preferred template language, adding the template logic in some plugin-like way (with maybe mustache as the default fallback) would be nice, and would make the generator quite a bit more flexible.
I don't think it's the highest priority feature either, but it's definitely a Nice-to-Have
Yes, as little of breaking changes as possible is always nice.
What would be the ideal naming conversion? Currently it's named transform and transformToCodeWithMustache.
The options structure should probably also be revisited in some way, so there can be custom options for each language.
Hm, naming wise maybe transform and transformToCode would be decent
Options-wise it should probably just be a simple base-config with a set of mandatory and optional properties, with some way of extending that based on the template language.
Justification
Right now only Mustache is supported, I can see the benefits of the template language. It's just a little bit off putting for people how doesn't know it that well to build custom templates.
I don't consider this important, just would like to open a discussion around it.
API Proposal
There are already a something building on top of this, building this up more to be able to handle more abstract types would make it easy to solve.
https://github.com/mtennoe/swagger-typescript-codegen/blob/master/src/transform/transformToCodeWithMustache.ts#L12-L38
I am not sure what the design reason behind having the default templates inside the
transform
code, it would be nice to move that out of there.https://github.com/mtennoe/swagger-typescript-codegen/blob/master/src/transform/transformToCodeWithMustache.ts#L40-L52
Considerations
The text was updated successfully, but these errors were encountered: