Skip to content

Commit

Permalink
[online] Honor generator environment variable and system property (Op…
Browse files Browse the repository at this point in the history
…enAPITools#3265)

Previously, this pulled from the GENERATOR_HOST system property. This
should have been an environment variable. Fallback is now generator.host
system property.
  • Loading branch information
jimschubert authored Jul 2, 2019
1 parent b878068 commit 1fc7740
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ ApiInfo apiInfo() {
public Docket customImplementation(){
String host;
try {
host = new URI(System.getProperty("GENERATOR_HOST", "http://localhost")).getHost();
String baseUrl = System.getenv("GENERATOR_HOST");
if (baseUrl == null) {
baseUrl = System.getProperty("generator.host", "http://localhost");
}
host = new URI(baseUrl).getHost();
} catch (URISyntaxException e) {
host = "";
}
Expand Down

0 comments on commit 1fc7740

Please sign in to comment.