forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 5.4.x
This commit is contained in:
@@ -23,6 +23,7 @@ package org.openapitools.client.apis
|
||||
import org.openapitools.client.models.ModelWithEnumPropertyHavingDefault
|
||||
|
||||
import org.openapitools.client.infrastructure.ApiClient
|
||||
import org.openapitools.client.infrastructure.ApiInfrastructureResponse
|
||||
import org.openapitools.client.infrastructure.ClientException
|
||||
import org.openapitools.client.infrastructure.ClientError
|
||||
import org.openapitools.client.infrastructure.ServerException
|
||||
@@ -38,7 +39,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")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,11 +54,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
@Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class)
|
||||
fun operation() : ModelWithEnumPropertyHavingDefault {
|
||||
val localVariableConfig = operationRequestConfig()
|
||||
|
||||
val localVarResponse = request<Unit, ModelWithEnumPropertyHavingDefault>(
|
||||
localVariableConfig
|
||||
)
|
||||
val localVarResponse = operationWithHttpInfo()
|
||||
|
||||
return when (localVarResponse.responseType) {
|
||||
ResponseType.Success -> (localVarResponse as Success<*>).data as ModelWithEnumPropertyHavingDefault
|
||||
@@ -74,6 +71,24 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ApiInfrastructureResponse<ModelWithEnumPropertyHavingDefault?>
|
||||
* @throws UnsupportedOperationException If the API returns an informational or redirection response
|
||||
* @throws ClientException If the API returns a client error response
|
||||
* @throws ServerException If the API returns a server error response
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
@Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class)
|
||||
fun operationWithHttpInfo() : ApiInfrastructureResponse<ModelWithEnumPropertyHavingDefault?> {
|
||||
val localVariableConfig = operationRequestConfig()
|
||||
|
||||
return request<Unit, ModelWithEnumPropertyHavingDefault>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* To obtain the request config of the operation operation
|
||||
*
|
||||
|
||||
@@ -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