Update NodeJSServerCodegen.java

projectName was already defined so never overriden.
This commit is contained in:
frinux 2016-01-07 10:26:10 +01:00 committed by Francois LE QUEMENER
parent 6064f32ba5
commit 15676ff72e

View File

@ -263,8 +263,8 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig
if (swagger.getInfo() != null) {
Info info = swagger.getInfo();
if (projectName == null && info.getTitle() != null) {
// when projectName is not specified, generate it from info.title
if (info.getTitle() != null) {
// when info.title is defined, use it for projectName
// used in package.json
projectName = dashize(info.getTitle());
this.additionalProperties.put("projectName", projectName);