forked from loafle/openapi-generator-original
[BUG][Kotlin] Add default values to optional parameters for jvm-spring-webclient and jvm-spring-restclient (#17393)
* Add default values to optional parameters for jvm-spring-webclient * Update samples * Add default values to optional parameters for jvm-spring-restclient
This commit is contained in:
parent
9b7528d8c8
commit
e3c0a3e8b0
@ -65,7 +65,7 @@ import {{packageName}}.infrastructure.*
|
||||
{{#isDeprecated}}
|
||||
@Deprecated(message = "This operation is deprecated.")
|
||||
{{/isDeprecated}}
|
||||
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} {
|
||||
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} {
|
||||
return {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
||||
.body!!
|
||||
}
|
||||
@ -74,7 +74,7 @@ import {{packageName}}.infrastructure.*
|
||||
{{#isDeprecated}}
|
||||
@Deprecated(message = "This operation is deprecated.")
|
||||
{{/isDeprecated}}
|
||||
fun {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): ResponseEntity<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> {
|
||||
fun {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): ResponseEntity<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> {
|
||||
val localVariableConfig = {{operationId}}RequestConfig({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
||||
return request<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, PartConfig<*>>{{/hasFormParams}}{{/hasBodyParam}}, {{{returnType}}}{{^returnType}}Unit{{/returnType}}>(
|
||||
localVariableConfig
|
||||
@ -84,7 +84,7 @@ import {{packageName}}.infrastructure.*
|
||||
{{#isDeprecated}}
|
||||
@Deprecated(message = "This operation is deprecated.")
|
||||
{{/isDeprecated}}
|
||||
fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, PartConfig<*>>{{/hasFormParams}}{{/hasBodyParam}}> {
|
||||
fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, PartConfig<*>>{{/hasFormParams}}{{/hasBodyParam}}> {
|
||||
val localVariableBody = {{#hasBodyParam}}{{!
|
||||
}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{!
|
||||
}}{{^hasFormParams}}null{{/hasFormParams}}{{!
|
||||
|
@ -69,7 +69,7 @@ import {{packageName}}.infrastructure.*
|
||||
{{#isDeprecated}}
|
||||
@Deprecated(message = "This operation is deprecated.")
|
||||
{{/isDeprecated}}
|
||||
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): Mono<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> {
|
||||
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): Mono<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> {
|
||||
return {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
||||
.map { it.body }
|
||||
}
|
||||
@ -78,7 +78,7 @@ import {{packageName}}.infrastructure.*
|
||||
{{#isDeprecated}}
|
||||
@Deprecated(message = "This operation is deprecated.")
|
||||
{{/isDeprecated}}
|
||||
fun {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): Mono<ResponseEntity<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}>> {
|
||||
fun {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): Mono<ResponseEntity<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}>> {
|
||||
val localVariableConfig = {{operationId}}RequestConfig({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
||||
return request<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, PartConfig<*>>{{/hasFormParams}}{{/hasBodyParam}}, {{{returnType}}}{{^returnType}}Unit{{/returnType}}>(
|
||||
localVariableConfig
|
||||
@ -88,7 +88,7 @@ import {{packageName}}.infrastructure.*
|
||||
{{#isDeprecated}}
|
||||
@Deprecated(message = "This operation is deprecated.")
|
||||
{{/isDeprecated}}
|
||||
fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, PartConfig<*>>{{/hasFormParams}}{{/hasBodyParam}}> {
|
||||
fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, PartConfig<*>>{{/hasFormParams}}{{/hasBodyParam}}> {
|
||||
val localVariableBody = {{#hasBodyParam}}{{!
|
||||
}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{!
|
||||
}}{{^hasFormParams}}null{{/hasFormParams}}{{!
|
||||
|
@ -75,20 +75,20 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Mono<Unit> {
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<Unit> {
|
||||
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
||||
.map { it.body }
|
||||
}
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun deletePetWithHttpInfo(petId: kotlin.Long, apiKey: kotlin.String?): Mono<ResponseEntity<Unit>> {
|
||||
fun deletePetWithHttpInfo(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<ResponseEntity<Unit>> {
|
||||
val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey)
|
||||
return request<Unit, Unit>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig<Unit> {
|
||||
fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
@ -250,20 +250,20 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Mono<Unit> {
|
||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<Unit> {
|
||||
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
||||
.map { it.body }
|
||||
}
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Mono<ResponseEntity<Unit>> {
|
||||
fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<ResponseEntity<Unit>> {
|
||||
val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status)
|
||||
return request<Map<String, PartConfig<*>>, Unit>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"name" to PartConfig(body = name, headers = mutableMapOf()),
|
||||
"status" to PartConfig(body = status, headers = mutableMapOf()),)
|
||||
@ -282,20 +282,20 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?): Mono<ModelApiResponse> {
|
||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): Mono<ModelApiResponse> {
|
||||
return uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
||||
.map { it.body }
|
||||
}
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?): Mono<ResponseEntity<ModelApiResponse>> {
|
||||
fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): Mono<ResponseEntity<ModelApiResponse>> {
|
||||
val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
||||
return request<Map<String, PartConfig<*>>, ModelApiResponse>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()),
|
||||
"file" to PartConfig(body = file, headers = mutableMapOf()),)
|
||||
|
@ -71,20 +71,20 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit {
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Unit {
|
||||
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
||||
.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun deletePetWithHttpInfo(petId: kotlin.Long, apiKey: kotlin.String?): ResponseEntity<Unit> {
|
||||
fun deletePetWithHttpInfo(petId: kotlin.Long, apiKey: kotlin.String? = null): ResponseEntity<Unit> {
|
||||
val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey)
|
||||
return request<Unit, Unit>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig<Unit> {
|
||||
fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
@ -246,20 +246,20 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit {
|
||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Unit {
|
||||
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
||||
.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): ResponseEntity<Unit> {
|
||||
fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): ResponseEntity<Unit> {
|
||||
val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status)
|
||||
return request<Map<String, PartConfig<*>>, Unit>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"name" to PartConfig(body = name, headers = mutableMapOf()),
|
||||
"status" to PartConfig(body = status, headers = mutableMapOf()),)
|
||||
@ -278,20 +278,20 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?): ModelApiResponse {
|
||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): ModelApiResponse {
|
||||
return uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
||||
.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?): ResponseEntity<ModelApiResponse> {
|
||||
fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): ResponseEntity<ModelApiResponse> {
|
||||
val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
||||
return request<Map<String, PartConfig<*>>, ModelApiResponse>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()),
|
||||
"file" to PartConfig(body = file, headers = mutableMapOf()),)
|
||||
|
@ -75,20 +75,20 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Mono<Unit> {
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<Unit> {
|
||||
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
||||
.map { it.body }
|
||||
}
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun deletePetWithHttpInfo(petId: kotlin.Long, apiKey: kotlin.String?): Mono<ResponseEntity<Unit>> {
|
||||
fun deletePetWithHttpInfo(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<ResponseEntity<Unit>> {
|
||||
val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey)
|
||||
return request<Unit, Unit>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig<Unit> {
|
||||
fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
@ -250,20 +250,20 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Mono<Unit> {
|
||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<Unit> {
|
||||
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
||||
.map { it.body }
|
||||
}
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Mono<ResponseEntity<Unit>> {
|
||||
fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<ResponseEntity<Unit>> {
|
||||
val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status)
|
||||
return request<Map<String, PartConfig<*>>, Unit>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"name" to PartConfig(body = name, headers = mutableMapOf()),
|
||||
"status" to PartConfig(body = status, headers = mutableMapOf()),)
|
||||
@ -282,20 +282,20 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
||||
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?): Mono<ModelApiResponse> {
|
||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): Mono<ModelApiResponse> {
|
||||
return uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
||||
.map { it.body }
|
||||
}
|
||||
|
||||
@Throws(WebClientResponseException::class)
|
||||
fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?): Mono<ResponseEntity<ModelApiResponse>> {
|
||||
fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): Mono<ResponseEntity<ModelApiResponse>> {
|
||||
val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
||||
return request<Map<String, PartConfig<*>>, ModelApiResponse>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"additionalMetadata" to PartConfig(body = additionalMetadata, headers = mutableMapOf()),
|
||||
"file" to PartConfig(body = file, headers = mutableMapOf()),)
|
||||
|
Loading…
x
Reference in New Issue
Block a user