Add gitUseID and gitRepoID flags to maven plugin

This commit is contained in:
mbohlool
2016-11-15 17:34:06 -08:00
parent 97924c78a0
commit 355e694fb2

View File

@@ -70,6 +70,18 @@ public class CodeGenMojo extends AbstractMojo {
@Parameter(name = "inputSpec", required = true)
private String inputSpec;
/**
* Git user ID, e.g. swagger-api.
*/
@Parameter(name = "gitUserId", required = false)
private String gitUserId;
/**
* Git repo ID, e.g. swagger-codegen.
*/
@Parameter(name = "gitRepoId", required = false)
private String gitRepoId;
/**
* Folder containing the template files.
*/
@@ -195,6 +207,14 @@ public class CodeGenMojo extends AbstractMojo {
configurator.setInputSpec(inputSpec);
}
if(isNotEmpty(gitUserId)) {
configurator.setGitUserId(gitUserId);
}
if(isNotEmpty(gitRepoId)) {
configurator.setGitRepoId(gitRepoId);
}
configurator.setLang(language);
configurator.setOutputDir(output.getAbsolutePath());