-
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
Specifying a TemplateDirectory requires all the templates to be present in the new TemplateDirectory #8904
Comments
The root cause of the issue (at least in the scope of spring) is in the SpringCodegen class. It does not initialize the embeddedTemplateDir variable if the templateDir was specified. Interesting enough the but is fixed in the master branch so the unit tests there do not fail but, the 3.0.0 branch does not include the version of SpringCodegen class in the master branch. It instead uses the version of the SpringCodegen class in the swagger-codegen-generators package v1.0.2 which has the issue. So, I guess the question is, when the SpringCodegen class in the master branch is going to be released? |
this has been fixed by swagger-codegen-generators#710 for codegen v3 |
I'm still facing the same issue with codegen maven plugin - 3.0.23. It is required to copy all the relevant mustache files into the template directory. Getting the following exception when generating code for
@HugoMario, appreciate any help on this |
I am also facing this issue with codegen plugin, version 3.0.23. I am getting the following exception when using
|
Any word on this one? I am also experiencing the same issue. |
I discovered that specifying the same name for the template dir helps. In my case I am coming up with a custom library for the I think somewhere in the codegen it uses For swagger codegen v3, this changes to |
Description
Need to customize the api.mustache template,
<templateDirectory>${project.basedir}/src/main/resources</templateDirectory>
when the code generation is invoked, this is the error.
if I copy the model.mustache file to the resource directory, then the generation fails, due too another mustache file missing.
I found this old Issue,
https://github.com/swagger-api/swagger-codegen/issues/200
Specifying that just the template to be modified is required to exist in the templateDirectory and how the code generator will fallback to the embedded templates.
Swagger-codegen version
3.0.2
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: