[BUG][Kotlin-client] Handling default values of parameters (#12255)

* Bugfix Kotlin-client: Handling default values of parameters

* Adding object
This commit is contained in:
Johan Sjöblom
2022-04-29 14:26:29 +00:00
committed by GitHub
parent b6a8037f62
commit 8950a9a3c0
221 changed files with 12616 additions and 5807 deletions

View File

@@ -44,7 +44,7 @@ open class PetApi(
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param body Pet object that needs to be added to the store
* @return void
*/
open suspend fun addPet(body: Pet): HttpResponse<Unit> {
@@ -76,11 +76,11 @@ open class PetApi(
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param petId Pet id to delete
* @param apiKey (optional)
* @return void
*/
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): HttpResponse<Unit> {
open suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): HttpResponse<Unit> {
val localVariableAuthNames = listOf<String>("petstore_auth")
@@ -110,7 +110,7 @@ open class PetApi(
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
* @param status Status values that need to be considered for filter
* @return kotlin.collections.List<Pet>
*/
@Suppress("UNCHECKED_CAST")
@@ -154,7 +154,7 @@ open class PetApi(
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
* @param tags Tags to filter by
* @return kotlin.collections.List<Pet>
*/
@Suppress("UNCHECKED_CAST")
@@ -198,7 +198,7 @@ open class PetApi(
/**
* Find pet by ID
* Returns a single pet
* @param petId ID of pet to return
* @param petId ID of pet to return
* @return Pet
*/
@Suppress("UNCHECKED_CAST")
@@ -231,7 +231,7 @@ open class PetApi(
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param body Pet object that needs to be added to the store
* @return void
*/
open suspend fun updatePet(body: Pet): HttpResponse<Unit> {
@@ -263,12 +263,12 @@ open class PetApi(
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @return void
*/
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): HttpResponse<Unit> {
open suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): HttpResponse<Unit> {
val localVariableAuthNames = listOf<String>("petstore_auth")
@@ -300,13 +300,13 @@ open class PetApi(
/**
* uploads an image
*
* @param petId ID of pet to update
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return ModelApiResponse
*/
@Suppress("UNCHECKED_CAST")
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: io.ktor.client.request.forms.InputProvider?): HttpResponse<ModelApiResponse> {
open suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: io.ktor.client.request.forms.InputProvider? = null): HttpResponse<ModelApiResponse> {
val localVariableAuthNames = listOf<String>("petstore_auth")

View File

@@ -43,7 +43,7 @@ open class StoreApi(
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted
* @param orderId ID of the order that needs to be deleted
* @return void
*/
open suspend fun deleteOrder(orderId: kotlin.String): HttpResponse<Unit> {
@@ -117,7 +117,7 @@ open class StoreApi(
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
* @param orderId ID of pet that needs to be fetched
* @return Order
*/
@Suppress("UNCHECKED_CAST")
@@ -150,7 +150,7 @@ open class StoreApi(
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param body order placed for purchasing the pet
* @return Order
*/
@Suppress("UNCHECKED_CAST")

View File

@@ -43,7 +43,7 @@ open class UserApi(
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object
* @param body Created user object
* @return void
*/
open suspend fun createUser(body: User): HttpResponse<Unit> {
@@ -75,7 +75,7 @@ open class UserApi(
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param body List of user object
* @return void
*/
open suspend fun createUsersWithArrayInput(body: kotlin.collections.List<User>): HttpResponse<Unit> {
@@ -116,7 +116,7 @@ open class UserApi(
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param body List of user object
* @return void
*/
open suspend fun createUsersWithListInput(body: kotlin.collections.List<User>): HttpResponse<Unit> {
@@ -157,7 +157,7 @@ open class UserApi(
/**
* Delete user
* This can only be done by the logged in user.
* @param username The name that needs to be deleted
* @param username The name that needs to be deleted
* @return void
*/
open suspend fun deleteUser(username: kotlin.String): HttpResponse<Unit> {
@@ -189,7 +189,7 @@ open class UserApi(
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param username The name that needs to be fetched. Use user1 for testing.
* @return User
*/
@Suppress("UNCHECKED_CAST")
@@ -222,8 +222,8 @@ open class UserApi(
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param username The user name for login
* @param password The password for login in clear text
* @return kotlin.String
*/
@Suppress("UNCHECKED_CAST")
@@ -289,8 +289,8 @@ open class UserApi(
/**
* Updated user
* This can only be done by the logged in user.
* @param username name that need to be deleted
* @param body Updated user object
* @param username name that need to be deleted
* @param body Updated user object
* @return void
*/
open suspend fun updateUser(username: kotlin.String, body: User): HttpResponse<Unit> {