-
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
--template-dir completely ignored by nodejs-server generator. #9941
Comments
This also applies to typescript-fetch. |
Should be solved fixing NodeJSServerCodegen as done in AbstractCSharpCodegen
|
Duplicate of #8904 |
this has been fixed by swagger-codegen-generators#710 for codegen v3 |
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: