made noservice option

This commit is contained in:
Tony Tam 2015-03-19 14:59:32 -07:00
parent de56f76284
commit cdf8648d3b

View File

@ -44,8 +44,7 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig
*/ */
public String getHelp() { public String getHelp() {
return "Generates a nodejs server library using the swagger-tools project. By default, " + return "Generates a nodejs server library using the swagger-tools project. By default, " +
"it will not generate service classes--which you will have to implement on your own or let " + "it will also generate service classes--which you can disable with the `-Dnoservice` environment variable.";
"the codegen do it with the `-Dservice` environment variable.";
} }
public NodeJSServerCodegen() { public NodeJSServerCodegen() {
@ -117,7 +116,7 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig
"", "",
"package.json") "package.json")
); );
if(System.getProperty("service") != null) { if(System.getProperty("noservice") == null) {
apiTemplateFiles.put( apiTemplateFiles.put(
"service.mustache", // the template to use "service.mustache", // the template to use
"Service.js"); // the extension for each file to write "Service.js"); // the extension for each file to write