forked from loafle/openapi-generator-original
Support custom git repository (#3757)
* add gitHost param to GeneratorSettings and related * parameterize gitHost in READMEs * parameterize gitHost in go.mod * parameterize gitHost in git_push * update petstore samples * run ./bin/utils/export_docs_generators.sh * run meta-codehen.sh * Revert "run meta-codehen.sh" This reverts commitd6d579f615. * Revert "run ./bin/utils/export_docs_generators.sh" This reverts commit1b81538198. * Revert "update petstore samples" This reverts commitf513add883. * run ensure-up-to-date
This commit is contained in:
committed by
William Cheng
parent
3be1196264
commit
8f13b88ed9
@@ -97,6 +97,12 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
@Parameter(name = "inputSpec", property = "openapi.generator.maven.plugin.inputSpec", required = true)
|
||||
private String inputSpec;
|
||||
|
||||
/**
|
||||
* Git host, e.g. gitlab.com.
|
||||
*/
|
||||
@Parameter(name = "gitHost", property = "openapi.generator.maven.plugin.gitHost", required = false)
|
||||
private String gitHost;
|
||||
|
||||
/**
|
||||
* Git user ID, e.g. swagger-api.
|
||||
*/
|
||||
@@ -456,6 +462,10 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
configurator.setInputSpec(inputSpec);
|
||||
}
|
||||
|
||||
if (isNotEmpty(gitHost)) {
|
||||
configurator.setGitHost(gitHost);
|
||||
}
|
||||
|
||||
if (isNotEmpty(gitUserId)) {
|
||||
configurator.setGitUserId(gitUserId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user