-
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
Not using files from template folders with libraries inside them #4628
Not using files from template folders with libraries inside them #4628
Conversation
…ibraries subfolder of the supplied templateFolder, before checking the embedded locations.
…rary-folders-not-used
…rary-folders-not-used
…rary-folders-not-used
…rary-folders-not-used
…rary-folders-not-used
- 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.
…rary-folders-not-used
While working on this pull request I discovered another issue, when library folders are present. I have modified the pull request to take this into consideration, while also adding a unit test to check that this does indeed happen.
|
@eblis thanks for the PR with additional tests and test cases. I did some tests and the result looks good. |
…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.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0
branch for breaking (non-backward compatible) changes.Description of the PR
#4627 - When looking for template files also look in the libraries subfolder of the supplied templateFolder, before checking the embedded locations.
If the template files reside in the library subfolder in the template dir they are never checked and used, instead the embedded files (from the library subfolder) are used instead.