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