[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:
Matthias Gabriel
2024-01-10 06:39:54 +01:00
committed by GitHub
parent 9b7528d8c8
commit e3c0a3e8b0
5 changed files with 33 additions and 33 deletions

View File

@@ -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()),)