forked from loafle/openapi-generator-original
update samples
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
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user