-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[all] allow per-template overloading with Handlerbar (as with Mustache) #9183
Comments
Possibly related to #8904, though that mentions Mustache and Spring specifically. I see this with Mustache templates and Relevant stack, attempting to only override
|
With HandleBarTemplateEngine.getHandlebars(String templateFile) there is a problem with following code
It relies on templateDir, so when -template-dir is used, it cannot load file from classpath, as it never goes there (without -t it works fine) |
@HugoMario maybe fixed by #11162? |
Fixed by #11191 |
Description
With swagger-codegen 2.0 & mustache templates, I could specify a
--template-dir
containing only the templates I wanted to overload. swagger-codegen would use my templates when available and otherwise fall back to the default ones.With Handlerbar templates, swagger-codegen only reads
--template-dir
so I need to copy the whole original directory and make my changes.This is very cumbersome when only a slight change in one or a few templates is needed.
Swagger-codegen version
3.0.x
Suggest a fix/enhancement
Some tweaking is needed in
HandlebarTemplateEngine
, using a handlebarsCompositeTemplateLoader
would be appropriate. Template path processing looks tricky which is why I don't have a pull request.Thanks
The text was updated successfully, but these errors were encountered: