Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine param in maven plugin. #2881

Merged
merged 1 commit into from
May 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -550,6 +556,10 @@ public void execute() throws MojoExecutionException {
configurator.setTemplateDir(templateDirectory.getAbsolutePath());
}

if (null != engine) {
configurator.setTemplatingEngineName(engine);
}

// Set generation options
if (null != generateApis && generateApis) {
GeneratorProperties.setProperty(CodegenConstants.APIS, "");
Expand Down