forked from loafle/openapi-generator-original
[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:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user