You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should return error because no templates files are found
Actual Result:
Code is generated, completely ignoring the templates folder. If any template file is included inside the folder (e.g. service.mustache), it is also ignored.
A test with another language to verify that other languages work:
Result: ERROR io.swagger.codegen.v3.templates.MustacheTemplateEngine - javascript/model.mustache (No such file or directory)
That is the expected result because there is no model.mustache inside the templates.
Suggest a fix/enhancement
It caught my attention that in the resources folder there is a nodejs folder but not a nodejs-server folder; not sure if that's the issue, but there's definitely something fishy going on:
The text was updated successfully, but these errors were encountered:
enbits
changed the title
--template-dir completely ignores nodejs-server generator.
--template-dir completely ignored by nodejs-server generator.
Dec 19, 2019
Description
Can not use custom templates on nodejs-server code generation.
Swagger-codegen version
3.0.14
Swagger declaration file content or url
Tested with the default petstore and several other with the same result.
Command line used for generation
swagger-codegen generate -i petstore.json -l nodejs-server -t ./templates --template-engine mustache
Steps to reproduce
Run the following commands
wget http://petstore.swagger.io/v2/swagger.json
mkdir templates
swagger-codegen generate -i swagger.json -l nodejs-server -t ./templates --template-engine mustache
Expected Result:
Actual Result:
A test with another language to verify that other languages work:
Run the following command:
swagger-codegen generate -i swagger.json -l javascript -t ./templates --template-engine mustache
Result:
ERROR io.swagger.codegen.v3.templates.MustacheTemplateEngine - javascript/model.mustache (No such file or directory)
That is the expected result because there is no model.mustache inside the templates.
Suggest a fix/enhancement
It caught my attention that in the resources folder there is a
nodejs
folder but not anodejs-server
folder; not sure if that's the issue, but there's definitely something fishy going on:https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/nodejs
The text was updated successfully, but these errors were encountered: