[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

@@ -38,7 +38,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath
companion object {
@JvmStatic
val defaultBasePath: String by lazy {
System.getProperties().getProperty("org.openapitools.client.baseUrl", "http://localhost")
System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost")
}
}

View File

@@ -44,6 +44,7 @@ open class ApiClient(val baseUrl: String) {
var username: String? = null
var password: String? = null
var accessToken: String? = null
const val baseUrlKey = "org.openapitools.client.baseUrl"
@JvmStatic
val client: OkHttpClient by lazy {