File tree Expand file tree Collapse file tree
modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff 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 , "" );
You can’t perform that action at this time.
0 commit comments