prefix local variable with localVar (#4402)

This commit is contained in:
William Cheng 2019-11-08 15:04:33 +08:00 committed by GitHub
parent 7cf027fbf5
commit 05e954c8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 450 additions and 450 deletions

View File

@ -62,17 +62,17 @@ import {{packageName}}.infrastructure.toMultiValue
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Any?{{/returnType}}>(
val localVarResponse = request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Any?{{/returnType}}>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> {{#returnType}}(response as Success<*>).data as {{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}
return when (localVarResponse.responseType) {
ResponseType.Success -> {{#returnType}}(localVarResponse as Success<*>).data as {{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -48,17 +48,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -83,17 +83,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -121,17 +121,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -159,17 +159,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -194,17 +194,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Pet>(
val localVarResponse = request<Pet>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Pet
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Pet
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -228,17 +228,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -264,17 +264,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -301,17 +301,17 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2")
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<ApiResponse>(
val localVarResponse = request<ApiResponse>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as ApiResponse
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as ApiResponse
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
val localVarResponse = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -116,17 +116,17 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -151,17 +151,17 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -115,17 +115,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -149,17 +149,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -184,17 +184,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<User>(
val localVarResponse = request<User>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as User
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as User
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -224,17 +224,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.String>(
val localVarResponse = request<kotlin.String>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.String
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -257,17 +257,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -292,17 +292,17 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2"
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -48,17 +48,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -83,17 +83,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -121,17 +121,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -159,17 +159,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -194,17 +194,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Pet>(
val localVarResponse = request<Pet>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Pet
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Pet
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -228,17 +228,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -264,17 +264,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -301,17 +301,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<ApiResponse>(
val localVarResponse = request<ApiResponse>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as ApiResponse
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as ApiResponse
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
val localVarResponse = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -116,17 +116,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -151,17 +151,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -115,17 +115,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -149,17 +149,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -184,17 +184,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<User>(
val localVarResponse = request<User>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as User
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as User
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -224,17 +224,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.String>(
val localVarResponse = request<kotlin.String>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.String
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -257,17 +257,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -292,17 +292,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -48,17 +48,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -83,17 +83,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -121,17 +121,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -159,17 +159,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -194,17 +194,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Pet>(
val localVarResponse = request<Pet>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Pet
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Pet
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -228,17 +228,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -264,17 +264,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -301,17 +301,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<ApiResponse>(
val localVarResponse = request<ApiResponse>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as ApiResponse
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as ApiResponse
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
val localVarResponse = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -116,17 +116,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -151,17 +151,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -115,17 +115,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -149,17 +149,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -184,17 +184,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<User>(
val localVarResponse = request<User>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as User
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as User
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -224,17 +224,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.String>(
val localVarResponse = request<kotlin.String>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.String
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -257,17 +257,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -292,17 +292,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -48,17 +48,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -83,17 +83,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -121,17 +121,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -159,17 +159,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -194,17 +194,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Pet>(
val localVarResponse = request<Pet>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Pet
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Pet
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -228,17 +228,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -264,17 +264,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -301,17 +301,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<ApiResponse>(
val localVarResponse = request<ApiResponse>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as ApiResponse
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as ApiResponse
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
val localVarResponse = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -116,17 +116,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -151,17 +151,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -115,17 +115,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -149,17 +149,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -184,17 +184,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<User>(
val localVarResponse = request<User>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as User
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as User
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -224,17 +224,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.String>(
val localVarResponse = request<kotlin.String>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.String
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -257,17 +257,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -292,17 +292,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -48,17 +48,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -83,17 +83,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -121,17 +121,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -159,17 +159,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.Array<Pet>>(
val localVarResponse = request<kotlin.Array<Pet>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Pet>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Array<Pet>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -194,17 +194,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Pet>(
val localVarResponse = request<Pet>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Pet
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Pet
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -228,17 +228,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -264,17 +264,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -301,17 +301,17 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<ApiResponse>(
val localVarResponse = request<ApiResponse>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as ApiResponse
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as ApiResponse
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
val localVarResponse = request<kotlin.collections.Map<kotlin.String, kotlin.Int>>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.Map<kotlin.String, kotlin.Int>
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -116,17 +116,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -151,17 +151,17 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Order>(
val localVarResponse = request<Order>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as Order
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as Order
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}

View File

@ -47,17 +47,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -81,17 +81,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -115,17 +115,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -149,17 +149,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -184,17 +184,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<User>(
val localVarResponse = request<User>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as User
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as User
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -224,17 +224,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<kotlin.String>(
val localVarResponse = request<kotlin.String>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
ResponseType.Success -> (response as Success<*>).data as kotlin.String
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -257,17 +257,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}
@ -292,17 +292,17 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
query = localVariableQuery,
headers = localVariableHeaders
)
val response = request<Any?>(
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (response.responseType) {
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
ResponseType.ClientError -> throw ClientException((localVarResponse as ClientError<*>).body as? String ?: "Client error")
ResponseType.ServerError -> throw ServerException((localVarResponse as ServerError<*>).message ?: "Server error")
}
}