[kotlin][client] add base url key (#10633)

* [kotlin][client] add base url key

* [kotlin][client] update sample projects

* [kotlin][client] add base url key
This commit is contained in:
Bruno Coelho
2021-11-02 15:32:42 +00:00
committed by GitHub
parent df260acc8f
commit 57afa97166
54 changed files with 66 additions and 40 deletions

View File

@@ -201,9 +201,12 @@ class ApiClient(
}
companion object {
@JvmStatic
protected val baseUrlKey = "org.openapitools.client.baseUrl"
@JvmStatic
val defaultBasePath: String by lazy {
System.getProperties().getProperty("org.openapitools.client.baseUrl", "http://petstore.swagger.io/v2")
System.getProperties().getProperty(baseUrlKey, "http://petstore.swagger.io/v2")
}
}
}