Engine param in maven plugin. (#2881)

This commit is contained in:
azizamaan
2019-05-29 19:01:21 +05:30
committed by William Cheng
parent 8a6d996c4f
commit 91af76700e

View File

@@ -126,6 +126,12 @@ public class CodeGenMojo extends AbstractMojo {
@Parameter(name = "templateDirectory")
private File templateDirectory;
/**
* The name of templating engine to use, "mustache" (default) or "handlebars" (beta)
*/
@Parameter(name = "engine", defaultValue = "mustache")
private String engine;
/**
* Adds authorization headers when fetching the swagger definitions remotely. " Pass in a
* URL-encoded string of name:header with a comma separating multiple values
@@ -550,6 +556,10 @@ public class CodeGenMojo extends AbstractMojo {
configurator.setTemplateDir(templateDirectory.getAbsolutePath());
}
if (null != engine) {
configurator.setTemplatingEngineName(engine);
}
// Set generation options
if (null != generateApis && generateApis) {
GeneratorProperties.setProperty(CodegenConstants.APIS, "");