Merge remote-tracking branch 'origin/master' into 6.0.x

This commit is contained in:
William Cheng
2022-01-02 15:41:37 +08:00
2007 changed files with 39758 additions and 48375 deletions

View File

@@ -3,7 +3,6 @@ package org.openapitools.api
import org.openapitools.model.ModelApiResponse
import org.openapitools.model.Pet
import org.junit.jupiter.api.Test
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.test.runBlockingTest
import org.springframework.http.ResponseEntity
@@ -13,138 +12,121 @@ class PetApiTest {
private val service: PetApiService = PetApiServiceImpl()
private val api: PetApiController = PetApiController(service)
/**
* Add a new pet to the store
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.addPet
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun addPetTest() = runBlockingTest {
val body:Pet? = null
val response: ResponseEntity<Unit> = api.addPet(body!!)
val body:Pet = TODO()
val response: ResponseEntity<Unit> = api.addPet(body)
// TODO: test validations
}
/**
* Deletes a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.deletePet
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun deletePetTest() = runBlockingTest {
val petId:kotlin.Long? = null
val apiKey:kotlin.String? = null
val response: ResponseEntity<Unit> = api.deletePet(petId!!, apiKey!!)
val petId:kotlin.Long = TODO()
val apiKey:kotlin.String? = TODO()
val response: ResponseEntity<Unit> = api.deletePet(petId, apiKey)
// TODO: test validations
}
/**
* Finds Pets by status
*
* Multiple status values can be provided with comma separated strings
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.findPetsByStatus
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun findPetsByStatusTest() = runBlockingTest {
val status:kotlin.collections.List<kotlin.String>? = null
val response: ResponseEntity<Flow<Pet>> = api.findPetsByStatus(status!!)
val status:kotlin.collections.List<kotlin.String> = TODO()
val response: ResponseEntity<Flow<Pet>> = api.findPetsByStatus(status)
// TODO: test validations
}
/**
* Finds Pets by tags
*
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.findPetsByTags
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun findPetsByTagsTest() = runBlockingTest {
val tags:kotlin.collections.List<kotlin.String>? = null
val response: ResponseEntity<Flow<Pet>> = api.findPetsByTags(tags!!)
val tags:kotlin.collections.List<kotlin.String> = TODO()
val response: ResponseEntity<Flow<Pet>> = api.findPetsByTags(tags)
// TODO: test validations
}
/**
* Find pet by ID
*
* Returns a single pet
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.getPetById
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun getPetByIdTest() = runBlockingTest {
val petId:kotlin.Long? = null
val response: ResponseEntity<Pet> = api.getPetById(petId!!)
val petId:kotlin.Long = TODO()
val response: ResponseEntity<Pet> = api.getPetById(petId)
// TODO: test validations
}
/**
* Update an existing pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.updatePet
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun updatePetTest() = runBlockingTest {
val body:Pet? = null
val response: ResponseEntity<Unit> = api.updatePet(body!!)
val body:Pet = TODO()
val response: ResponseEntity<Unit> = api.updatePet(body)
// TODO: test validations
}
/**
* Updates a pet in the store with form data
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.updatePetWithForm
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun updatePetWithFormTest() = runBlockingTest {
val petId:kotlin.Long? = null
val name:kotlin.String? = null
val status:kotlin.String? = null
val response: ResponseEntity<Unit> = api.updatePetWithForm(petId!!, name!!, status!!)
val petId:kotlin.Long = TODO()
val name:kotlin.String? = TODO()
val status:kotlin.String? = TODO()
val response: ResponseEntity<Unit> = api.updatePetWithForm(petId, name, status)
// TODO: test validations
}
/**
* uploads an image
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test PetApiController.uploadFile
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun uploadFileTest() = runBlockingTest {
val petId:kotlin.Long? = null
val additionalMetadata:kotlin.String? = null
val file:org.springframework.core.io.Resource? = null
val response: ResponseEntity<ModelApiResponse> = api.uploadFile(petId!!, additionalMetadata!!, file!!)
val petId:kotlin.Long = TODO()
val additionalMetadata:kotlin.String? = TODO()
val file:org.springframework.core.io.Resource? = TODO()
val response: ResponseEntity<ModelApiResponse> = api.uploadFile(petId, additionalMetadata, file)
// TODO: test validations
}
}

View File

@@ -2,7 +2,6 @@ package org.openapitools.api
import org.openapitools.model.Order
import org.junit.jupiter.api.Test
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.test.runBlockingTest
import org.springframework.http.ResponseEntity
@@ -12,68 +11,59 @@ class StoreApiTest {
private val service: StoreApiService = StoreApiServiceImpl()
private val api: StoreApiController = StoreApiController(service)
/**
* Delete purchase order by ID
*
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
*
* @throws ApiException
* if the Api call fails
*/
* To test StoreApiController.deleteOrder
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun deleteOrderTest() = runBlockingTest {
val orderId:kotlin.String? = null
val response: ResponseEntity<Unit> = api.deleteOrder(orderId!!)
val orderId:kotlin.String = TODO()
val response: ResponseEntity<Unit> = api.deleteOrder(orderId)
// TODO: test validations
}
/**
* Returns pet inventories by status
*
* Returns a map of status codes to quantities
*
* @throws ApiException
* if the Api call fails
*/
* To test StoreApiController.getInventory
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun getInventoryTest() = runBlockingTest {
val response: ResponseEntity<Map<String, kotlin.Int>> = api.getInventory()
// TODO: test validations
}
/**
* Find purchase order by ID
*
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
*
* @throws ApiException
* if the Api call fails
*/
* To test StoreApiController.getOrderById
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun getOrderByIdTest() = runBlockingTest {
val orderId:kotlin.Long? = null
val response: ResponseEntity<Order> = api.getOrderById(orderId!!)
val orderId:kotlin.Long = TODO()
val response: ResponseEntity<Order> = api.getOrderById(orderId)
// TODO: test validations
}
/**
* Place an order for a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test StoreApiController.placeOrder
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun placeOrderTest() = runBlockingTest {
val body:Order? = null
val response: ResponseEntity<Order> = api.placeOrder(body!!)
val body:Order = TODO()
val response: ResponseEntity<Order> = api.placeOrder(body)
// TODO: test validations
}
}

View File

@@ -2,7 +2,6 @@ package org.openapitools.api
import org.openapitools.model.User
import org.junit.jupiter.api.Test
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.test.runBlockingTest
import org.springframework.http.ResponseEntity
@@ -12,134 +11,117 @@ class UserApiTest {
private val service: UserApiService = UserApiServiceImpl()
private val api: UserApiController = UserApiController(service)
/**
* Create user
*
* This can only be done by the logged in user.
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.createUser
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun createUserTest() = runBlockingTest {
val body:User? = null
val response: ResponseEntity<Unit> = api.createUser(body!!)
val body:User = TODO()
val response: ResponseEntity<Unit> = api.createUser(body)
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.createUsersWithArrayInput
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun createUsersWithArrayInputTest() = runBlockingTest {
val body:kotlin.collections.List<User>? = null
val response: ResponseEntity<Unit> = api.createUsersWithArrayInput(body!!)
val body:kotlin.collections.List<User> = TODO()
val response: ResponseEntity<Unit> = api.createUsersWithArrayInput(body)
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.createUsersWithListInput
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun createUsersWithListInputTest() = runBlockingTest {
val body:kotlin.collections.List<User>? = null
val response: ResponseEntity<Unit> = api.createUsersWithListInput(body!!)
val body:kotlin.collections.List<User> = TODO()
val response: ResponseEntity<Unit> = api.createUsersWithListInput(body)
// TODO: test validations
}
/**
* Delete user
*
* This can only be done by the logged in user.
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.deleteUser
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun deleteUserTest() = runBlockingTest {
val username:kotlin.String? = null
val response: ResponseEntity<Unit> = api.deleteUser(username!!)
val username:kotlin.String = TODO()
val response: ResponseEntity<Unit> = api.deleteUser(username)
// TODO: test validations
}
/**
* Get user by user name
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.getUserByName
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun getUserByNameTest() = runBlockingTest {
val username:kotlin.String? = null
val response: ResponseEntity<User> = api.getUserByName(username!!)
val username:kotlin.String = TODO()
val response: ResponseEntity<User> = api.getUserByName(username)
// TODO: test validations
}
/**
* Logs user into the system
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.loginUser
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun loginUserTest() = runBlockingTest {
val username:kotlin.String? = null
val password:kotlin.String? = null
val response: ResponseEntity<kotlin.String> = api.loginUser(username!!, password!!)
val username:kotlin.String = TODO()
val password:kotlin.String = TODO()
val response: ResponseEntity<kotlin.String> = api.loginUser(username, password)
// TODO: test validations
}
/**
* Logs out current logged in user session
*
*
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.logoutUser
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun logoutUserTest() = runBlockingTest {
val response: ResponseEntity<Unit> = api.logoutUser()
// TODO: test validations
}
/**
* Updated user
*
* This can only be done by the logged in user.
*
* @throws ApiException
* if the Api call fails
*/
* To test UserApiController.updateUser
*
* @throws ApiException
* if the Api call fails
*/
@Test
fun updateUserTest() = runBlockingTest {
val username:kotlin.String? = null
val body:User? = null
val response: ResponseEntity<Unit> = api.updateUser(username!!, body!!)
val username:kotlin.String = TODO()
val body:User = TODO()
val response: ResponseEntity<Unit> = api.updateUser(username, body)
// TODO: test validations
}
}