forked from loafle/openapi-generator-original
[KOTLIN Spring] fix generation with modelNamePrefix/Suffix (#3038)
* [KOTLIN Spring] fix generation with modelNamePrefix/modelNameSuffix * fix indent * fix indent * fix indent * fix indent * fix indent * fix indent
This commit is contained in:
committed by
William Cheng
parent
c6207c0a49
commit
57560d365f
@@ -69,8 +69,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
|
||||
@RequestMapping(
|
||||
value = ["/pet/{petId}"],
|
||||
method = [RequestMethod.DELETE])
|
||||
fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long
|
||||
,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String?
|
||||
fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long
|
||||
,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String?
|
||||
): ResponseEntity<Unit> {
|
||||
return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.valueOf(400))
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
|
||||
value = ["/pet/findByStatus"],
|
||||
produces = ["application/xml", "application/json"],
|
||||
method = [RequestMethod.GET])
|
||||
fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List<String>
|
||||
fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List<kotlin.String>
|
||||
): ResponseEntity<List<Pet>> {
|
||||
return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200))
|
||||
}
|
||||
@@ -106,7 +106,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
|
||||
value = ["/pet/findByTags"],
|
||||
produces = ["application/xml", "application/json"],
|
||||
method = [RequestMethod.GET])
|
||||
fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List<String>
|
||||
fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List<kotlin.String>
|
||||
): ResponseEntity<List<Pet>> {
|
||||
return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200))
|
||||
}
|
||||
@@ -123,7 +123,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
|
||||
value = ["/pet/{petId}"],
|
||||
produces = ["application/xml", "application/json"],
|
||||
method = [RequestMethod.GET])
|
||||
fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long
|
||||
fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long
|
||||
): ResponseEntity<Pet> {
|
||||
return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200))
|
||||
}
|
||||
@@ -155,9 +155,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
|
||||
value = ["/pet/{petId}"],
|
||||
consumes = ["application/x-www-form-urlencoded"],
|
||||
method = [RequestMethod.POST])
|
||||
fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long
|
||||
,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String?
|
||||
,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String?
|
||||
fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long
|
||||
,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String?
|
||||
,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String?
|
||||
): ResponseEntity<Unit> {
|
||||
return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405))
|
||||
}
|
||||
@@ -175,8 +175,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) {
|
||||
produces = ["application/json"],
|
||||
consumes = ["multipart/form-data"],
|
||||
method = [RequestMethod.POST])
|
||||
fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long
|
||||
,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String?
|
||||
fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long
|
||||
,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String?
|
||||
,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource?
|
||||
): ResponseEntity<ModelApiResponse> {
|
||||
return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200))
|
||||
|
||||
@@ -6,17 +6,17 @@ interface PetApiService {
|
||||
|
||||
fun addPet(body: Pet): Unit
|
||||
|
||||
fun deletePet(petId: Long, apiKey: String?): Unit
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit
|
||||
|
||||
fun findPetsByStatus(status: List<String>): List<Pet>
|
||||
fun findPetsByStatus(status: kotlin.collections.List<kotlin.String>): List<Pet>
|
||||
|
||||
fun findPetsByTags(tags: List<String>): List<Pet>
|
||||
fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): List<Pet>
|
||||
|
||||
fun getPetById(petId: Long): Pet
|
||||
fun getPetById(petId: kotlin.Long): Pet
|
||||
|
||||
fun updatePet(body: Pet): Unit
|
||||
|
||||
fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit
|
||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit
|
||||
|
||||
fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse
|
||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse
|
||||
}
|
||||
|
||||
@@ -10,19 +10,19 @@ class PetApiServiceImpl : PetApiService {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun deletePet(petId: Long, apiKey: String?): Unit {
|
||||
override fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun findPetsByStatus(status: List<String>): List<Pet> {
|
||||
override fun findPetsByStatus(status: kotlin.collections.List<kotlin.String>): List<Pet> {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun findPetsByTags(tags: List<String>): List<Pet> {
|
||||
override fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): List<Pet> {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun getPetById(petId: Long): Pet {
|
||||
override fun getPetById(petId: kotlin.Long): Pet {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ class PetApiServiceImpl : PetApiService {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit {
|
||||
override fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse {
|
||||
override fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse {
|
||||
TODO("Implement me")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic
|
||||
@RequestMapping(
|
||||
value = ["/store/order/{orderId}"],
|
||||
method = [RequestMethod.DELETE])
|
||||
fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String
|
||||
fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String
|
||||
): ResponseEntity<Unit> {
|
||||
return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400))
|
||||
}
|
||||
@@ -60,16 +60,16 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic
|
||||
value = "Returns pet inventories by status",
|
||||
nickname = "getInventory",
|
||||
notes = "Returns a map of status codes to quantities",
|
||||
response = Int::class,
|
||||
response = kotlin.Int::class,
|
||||
responseContainer = "Map",
|
||||
authorizations = [Authorization(value = "api_key")])
|
||||
@ApiResponses(
|
||||
value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")])
|
||||
value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")])
|
||||
@RequestMapping(
|
||||
value = ["/store/inventory"],
|
||||
produces = ["application/json"],
|
||||
method = [RequestMethod.GET])
|
||||
fun getInventory(): ResponseEntity<Map<String, Int>> {
|
||||
fun getInventory(): ResponseEntity<Map<String, kotlin.Int>> {
|
||||
return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200))
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic
|
||||
value = ["/store/order/{orderId}"],
|
||||
produces = ["application/xml", "application/json"],
|
||||
method = [RequestMethod.GET])
|
||||
fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long
|
||||
fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long
|
||||
): ResponseEntity<Order> {
|
||||
return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200))
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ package org.openapitools.api
|
||||
import org.openapitools.model.Order
|
||||
interface StoreApiService {
|
||||
|
||||
fun deleteOrder(orderId: String): Unit
|
||||
fun deleteOrder(orderId: kotlin.String): Unit
|
||||
|
||||
fun getInventory(): Map<String, Int>
|
||||
fun getInventory(): Map<String, kotlin.Int>
|
||||
|
||||
fun getOrderById(orderId: Long): Order
|
||||
fun getOrderById(orderId: kotlin.Long): Order
|
||||
|
||||
fun placeOrder(body: Order): Order
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import org.springframework.stereotype.Service
|
||||
@Service
|
||||
class StoreApiServiceImpl : StoreApiService {
|
||||
|
||||
override fun deleteOrder(orderId: String): Unit {
|
||||
override fun deleteOrder(orderId: kotlin.String): Unit {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun getInventory(): Map<String, Int> {
|
||||
override fun getInventory(): Map<String, kotlin.Int> {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun getOrderById(orderId: Long): Order {
|
||||
override fun getOrderById(orderId: kotlin.Long): Order {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
|
||||
@RequestMapping(
|
||||
value = ["/user/createWithArray"],
|
||||
method = [RequestMethod.POST])
|
||||
fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: List<User>
|
||||
fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: kotlin.collections.List<User>
|
||||
): ResponseEntity<Unit> {
|
||||
return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.valueOf(200))
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
|
||||
@RequestMapping(
|
||||
value = ["/user/createWithList"],
|
||||
method = [RequestMethod.POST])
|
||||
fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: List<User>
|
||||
fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: kotlin.collections.List<User>
|
||||
): ResponseEntity<Unit> {
|
||||
return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.valueOf(200))
|
||||
}
|
||||
@@ -93,7 +93,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
|
||||
@RequestMapping(
|
||||
value = ["/user/{username}"],
|
||||
method = [RequestMethod.DELETE])
|
||||
fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String
|
||||
fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String
|
||||
): ResponseEntity<Unit> {
|
||||
return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400))
|
||||
}
|
||||
@@ -109,7 +109,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
|
||||
value = ["/user/{username}"],
|
||||
produces = ["application/xml", "application/json"],
|
||||
method = [RequestMethod.GET])
|
||||
fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String
|
||||
fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String
|
||||
): ResponseEntity<User> {
|
||||
return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200))
|
||||
}
|
||||
@@ -118,16 +118,16 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
|
||||
value = "Logs user into the system",
|
||||
nickname = "loginUser",
|
||||
notes = "",
|
||||
response = String::class)
|
||||
response = kotlin.String::class)
|
||||
@ApiResponses(
|
||||
value = [ApiResponse(code = 200, message = "successful operation", response = String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")])
|
||||
value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")])
|
||||
@RequestMapping(
|
||||
value = ["/user/login"],
|
||||
produces = ["application/xml", "application/json"],
|
||||
method = [RequestMethod.GET])
|
||||
fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String
|
||||
,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String
|
||||
): ResponseEntity<String> {
|
||||
fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String
|
||||
,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String
|
||||
): ResponseEntity<kotlin.String> {
|
||||
return ResponseEntity(service.loginUser(username, password), HttpStatus.valueOf(200))
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
|
||||
@RequestMapping(
|
||||
value = ["/user/{username}"],
|
||||
method = [RequestMethod.PUT])
|
||||
fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String
|
||||
fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String
|
||||
,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody body: User
|
||||
): ResponseEntity<Unit> {
|
||||
return ResponseEntity(service.updateUser(username, body), HttpStatus.valueOf(400))
|
||||
|
||||
@@ -5,17 +5,17 @@ interface UserApiService {
|
||||
|
||||
fun createUser(body: User): Unit
|
||||
|
||||
fun createUsersWithArrayInput(body: List<User>): Unit
|
||||
fun createUsersWithArrayInput(body: kotlin.collections.List<User>): Unit
|
||||
|
||||
fun createUsersWithListInput(body: List<User>): Unit
|
||||
fun createUsersWithListInput(body: kotlin.collections.List<User>): Unit
|
||||
|
||||
fun deleteUser(username: String): Unit
|
||||
fun deleteUser(username: kotlin.String): Unit
|
||||
|
||||
fun getUserByName(username: String): User
|
||||
fun getUserByName(username: kotlin.String): User
|
||||
|
||||
fun loginUser(username: String, password: String): String
|
||||
fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String
|
||||
|
||||
fun logoutUser(): Unit
|
||||
|
||||
fun updateUser(username: String, body: User): Unit
|
||||
fun updateUser(username: kotlin.String, body: User): Unit
|
||||
}
|
||||
|
||||
@@ -9,23 +9,23 @@ class UserApiServiceImpl : UserApiService {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun createUsersWithArrayInput(body: List<User>): Unit {
|
||||
override fun createUsersWithArrayInput(body: kotlin.collections.List<User>): Unit {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun createUsersWithListInput(body: List<User>): Unit {
|
||||
override fun createUsersWithListInput(body: kotlin.collections.List<User>): Unit {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun deleteUser(username: String): Unit {
|
||||
override fun deleteUser(username: kotlin.String): Unit {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun getUserByName(username: String): User {
|
||||
override fun getUserByName(username: kotlin.String): User {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun loginUser(username: String, password: String): String {
|
||||
override fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class UserApiServiceImpl : UserApiService {
|
||||
TODO("Implement me")
|
||||
}
|
||||
|
||||
override fun updateUser(username: String, body: User): Unit {
|
||||
override fun updateUser(username: kotlin.String, body: User): Unit {
|
||||
TODO("Implement me")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Category (
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: Long? = null,
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("name") val name: String? = null
|
||||
@JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class ModelApiResponse (
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("code") val code: Int? = null,
|
||||
@JsonProperty("code") val code: kotlin.Int? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("type") val type: String? = null,
|
||||
@JsonProperty("type") val type: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("message") val message: String? = null
|
||||
@JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Order (
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: Long? = null,
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("petId") val petId: Long? = null,
|
||||
@JsonProperty("petId") val petId: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("quantity") val quantity: Int? = null,
|
||||
@JsonProperty("quantity") val quantity: kotlin.Int? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null,
|
||||
@@ -39,14 +39,14 @@ data class Order (
|
||||
@JsonProperty("status") val status: Order.Status? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("complete") val complete: Boolean? = null
|
||||
@JsonProperty("complete") val complete: kotlin.Boolean? = null
|
||||
) {
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
enum class Status(val value: String) {
|
||||
enum class Status(val value: kotlin.String) {
|
||||
|
||||
@JsonProperty("placed") placed("placed"),
|
||||
|
||||
|
||||
@@ -27,20 +27,20 @@ data class Pet (
|
||||
|
||||
@get:NotNull
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
@JsonProperty("name") val name: String,
|
||||
@JsonProperty("name") val name: kotlin.String,
|
||||
|
||||
@get:NotNull
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("photoUrls") val photoUrls: List<String>,
|
||||
@JsonProperty("photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: Long? = null,
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("category") val category: Category? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("tags") val tags: List<Tag>? = null,
|
||||
@JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "pet status in the store")
|
||||
@JsonProperty("status") val status: Pet.Status? = null
|
||||
@@ -50,7 +50,7 @@ data class Pet (
|
||||
* pet status in the store
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
enum class Status(val value: String) {
|
||||
enum class Status(val value: kotlin.String) {
|
||||
|
||||
@JsonProperty("available") available("available"),
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Tag (
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: Long? = null,
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("name") val name: String? = null
|
||||
@JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -25,28 +25,28 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class User (
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: Long? = null,
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("username") val username: String? = null,
|
||||
@JsonProperty("username") val username: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("firstName") val firstName: String? = null,
|
||||
@JsonProperty("firstName") val firstName: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("lastName") val lastName: String? = null,
|
||||
@JsonProperty("lastName") val lastName: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("email") val email: String? = null,
|
||||
@JsonProperty("email") val email: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("password") val password: String? = null,
|
||||
@JsonProperty("password") val password: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("phone") val phone: String? = null,
|
||||
@JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "User Status")
|
||||
@JsonProperty("userStatus") val userStatus: Int? = null
|
||||
@JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun deletePetTest() {
|
||||
val petId:Long? = null
|
||||
val apiKey:String? = null
|
||||
val petId:kotlin.Long? = null
|
||||
val apiKey:kotlin.String? = null
|
||||
val response: ResponseEntity<Unit> = api.deletePet(petId!!, apiKey!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -55,7 +55,7 @@ class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun findPetsByStatusTest() {
|
||||
val status:List<String>? = null
|
||||
val status:kotlin.collections.List<kotlin.String>? = null
|
||||
val response: ResponseEntity<List<Pet>> = api.findPetsByStatus(status!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -71,7 +71,7 @@ class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun findPetsByTagsTest() {
|
||||
val tags:List<String>? = null
|
||||
val tags:kotlin.collections.List<kotlin.String>? = null
|
||||
val response: ResponseEntity<List<Pet>> = api.findPetsByTags(tags!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -87,7 +87,7 @@ class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun getPetByIdTest() {
|
||||
val petId:Long? = null
|
||||
val petId:kotlin.Long? = null
|
||||
val response: ResponseEntity<Pet> = api.getPetById(petId!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -119,9 +119,9 @@ class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun updatePetWithFormTest() {
|
||||
val petId:Long? = null
|
||||
val name:String? = null
|
||||
val status:String? = null
|
||||
val petId:kotlin.Long? = null
|
||||
val name:kotlin.String? = null
|
||||
val status:kotlin.String? = null
|
||||
val response: ResponseEntity<Unit> = api.updatePetWithForm(petId!!, name!!, status!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -137,8 +137,8 @@ class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun uploadFileTest() {
|
||||
val petId:Long? = null
|
||||
val additionalMetadata:String? = null
|
||||
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!!)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class StoreApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun deleteOrderTest() {
|
||||
val orderId:String? = null
|
||||
val orderId:kotlin.String? = null
|
||||
val response: ResponseEntity<Unit> = api.deleteOrder(orderId!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -37,7 +37,7 @@ class StoreApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun getInventoryTest() {
|
||||
val response: ResponseEntity<Map<String, Int>> = api.getInventory()
|
||||
val response: ResponseEntity<Map<String, kotlin.Int>> = api.getInventory()
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class StoreApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun getOrderByIdTest() {
|
||||
val orderId:Long? = null
|
||||
val orderId:kotlin.Long? = null
|
||||
val response: ResponseEntity<Order> = api.getOrderById(orderId!!)
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
@@ -37,7 +37,7 @@ class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun createUsersWithArrayInputTest() {
|
||||
val body:List<User>? = null
|
||||
val body:kotlin.collections.List<User>? = null
|
||||
val response: ResponseEntity<Unit> = api.createUsersWithArrayInput(body!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -53,7 +53,7 @@ class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun createUsersWithListInputTest() {
|
||||
val body:List<User>? = null
|
||||
val body:kotlin.collections.List<User>? = null
|
||||
val response: ResponseEntity<Unit> = api.createUsersWithListInput(body!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -69,7 +69,7 @@ class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun deleteUserTest() {
|
||||
val username:String? = null
|
||||
val username:kotlin.String? = null
|
||||
val response: ResponseEntity<Unit> = api.deleteUser(username!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -85,7 +85,7 @@ class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun getUserByNameTest() {
|
||||
val username:String? = null
|
||||
val username:kotlin.String? = null
|
||||
val response: ResponseEntity<User> = api.getUserByName(username!!)
|
||||
|
||||
// TODO: test validations
|
||||
@@ -101,9 +101,9 @@ class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun loginUserTest() {
|
||||
val username:String? = null
|
||||
val password:String? = null
|
||||
val response: ResponseEntity<String> = api.loginUser(username!!, password!!)
|
||||
val username:kotlin.String? = null
|
||||
val password:kotlin.String? = null
|
||||
val response: ResponseEntity<kotlin.String> = api.loginUser(username!!, password!!)
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -133,7 +133,7 @@ class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
fun updateUserTest() {
|
||||
val username:String? = null
|
||||
val username:kotlin.String? = null
|
||||
val body:User? = null
|
||||
val response: ResponseEntity<Unit> = api.updateUser(username!!, body!!)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user