forked from loafle/openapi-generator-original
Engine param in maven plugin. (#2881)
This commit is contained in:
@@ -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, "");
|
||||
|
||||
Reference in New Issue
Block a user