Switching template system from Mustache to Handlebars (or something else)
Description
There were discussions about switching from Mustache to Handlebars (or something else) before. The goal was to simplify the templates as Mustache is a logicless template system and therefore we will need to create a lot of mustache tag(e.g. isInteger, isHttpBasic, etc) every time we need to compare values.
As discussed in https://github.com/swagger-api/swagger-codegen/issues/6077, Handlebars seems to be a good replacement. Here are a couple of questions we need to address:
- are we going to support both at the same time?
- when will we remove Mustache template support?
- Is any tool/script to help migrate the templates from Mustache to Handlebar? (my understanding is that Handlebar is not 100% backward compatible with Mustache)
- for new generators, when will we recommend using Handlebar as the default?
- if users have already customized the Mustache templates, how can they migrate those to Handlebars? (in other words, are we going to provide a tool/script or just a migration guide and users need to manually update the customized Mustache templates)
- let's say we switch the template system from Mustache to Handlebars in v4.0.0, how are we going to sync enhancements, bug fixes from v3.x to v4.0.0 before v4.0.0 is officially released?
The goal of this discussion is to collect feedback from the community and formula a plan to replace Mustache if needed
openapi-generator version
Future major release (4.x or later)
Related issues/PRs
It was previously discussed in https://github.com/swagger-api/swagger-codegen/issues/6077