Skip to content

Commit 91af767

Browse files
azizamaanwing328
authored andcommitted
Engine param in maven plugin. (#2881)
1 parent 8a6d996 commit 91af767

File tree

1 file changed

+10
-0
lines changed
  • modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin

1 file changed

+10
-0
lines changed

modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ public class CodeGenMojo extends AbstractMojo {
126126
@Parameter(name = "templateDirectory")
127127
private File templateDirectory;
128128

129+
/**
130+
* The name of templating engine to use, "mustache" (default) or "handlebars" (beta)
131+
*/
132+
@Parameter(name = "engine", defaultValue = "mustache")
133+
private String engine;
134+
129135
/**
130136
* Adds authorization headers when fetching the swagger definitions remotely. " Pass in a
131137
* URL-encoded string of name:header with a comma separating multiple values
@@ -550,6 +556,10 @@ public void execute() throws MojoExecutionException {
550556
configurator.setTemplateDir(templateDirectory.getAbsolutePath());
551557
}
552558

559+
if (null != engine) {
560+
configurator.setTemplatingEngineName(engine);
561+
}
562+
553563
// Set generation options
554564
if (null != generateApis && generateApis) {
555565
GeneratorProperties.setProperty(CodegenConstants.APIS, "");

0 commit comments

Comments
 (0)