-
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
Embedded mustache files are used even if TemplateFolder option is specified and contains a different version of the mustache file (in a library folder) #4627
Comments
This seems to affect all languages that have libraries, not limited to Spring. |
eblis
added a commit
to eblis/swagger-codegen
that referenced
this issue
Jan 23, 2017
…ibraries subfolder of the supplied templateFolder, before checking the embedded locations.
3 tasks
eblis
changed the title
[SPRING] Default pom.mustache is used even if TemplateFolder option is specified and contains a different pom.mustache
Embedded mustache files are used even if TemplateFolder option is specified and contains a different version of the mustache file (in a library folder)
Jan 23, 2017
wing328
pushed a commit
that referenced
this issue
Mar 20, 2017
* #4627 - When looking for template files also look in the libraries subfolder of the supplied templateFolder, before checking the embedded locations. * Reworked the order in which template files are searched for: - 1st the code will check if there's a <template folder>/libraries/<library> folder containing the file - 2nd it will check for the file in the specified <template folder> folder - 3rd it will check if there's an <embedded template>/libraries/<library> folder containing the file - 4th and last it will assume the file is in <embedded template> folder. Added unit test to test template dir overloading.
spr3nk3ls
pushed a commit
to spr3nk3ls/swagger-codegen
that referenced
this issue
Mar 28, 2017
…gger-api#4628) * swagger-api#4627 - When looking for template files also look in the libraries subfolder of the supplied templateFolder, before checking the embedded locations. * Reworked the order in which template files are searched for: - 1st the code will check if there's a <template folder>/libraries/<library> folder containing the file - 2nd it will check for the file in the specified <template folder> folder - 3rd it will check if there's an <embedded template>/libraries/<library> folder containing the file - 4th and last it will assume the file is in <embedded template> folder. Added unit test to test template dir overloading.
I haven't been following this for a while, but have you tried my changes that I made ? It worked for me at the time. |
this is fixed for codegen 2.x version, so closing now, but please, let me know if issue it's still present and i work on it asap. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I'm trying to generate Spring-Boot server sources from a swagger.json file and I'm specifying my own TemplateFolder which was copied from the original
JavaSpring
template folder and subsequently modified. I've modified thepom.mustache
file for all 3 Spring libraries (spring-boot
,spring-cloud
andspring-mvc
) and none are taken into consideration while generating forspring-boot
library.Swagger-codegen version
2.2.2-SNAPSHOT
Command line used for generation
./java -jar swagger-codegen-cli.jar generate -i swagger.json -c spring-config.json -l spring -o samples/server/test -t JavaSpring-Modified
The text was updated successfully, but these errors were encountered: