diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java index 5eaa29f051a0..07e6001fb35b 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java @@ -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 = ""; }