[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:
Vincent Devos
2019-06-04 15:57:43 +02:00
committed by William Cheng
parent c6207c0a49
commit 57560d365f
38 changed files with 200 additions and 222 deletions

View File

@@ -95,48 +95,19 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
updateOption(CodegenConstants.ARTIFACT_ID, this.artifactId);
// Use lists instead of arrays
typeMapping.put("array", "List");
typeMapping.put("string", "String");
typeMapping.put("boolean", "Boolean");
typeMapping.put("integer", "Int");
typeMapping.put("float", "Float");
typeMapping.put("long", "Long");
typeMapping.put("double", "Double");
typeMapping.put("ByteArray", "ByteArray");
typeMapping.put("list", "List");
typeMapping.put("map", "Map");
typeMapping.put("object", "Any");
typeMapping.put("binary", "Array<kotlin.Byte>");
typeMapping.put("array", "kotlin.collections.List");
typeMapping.put("list", "kotlin.collections.List");
typeMapping.put("date", "java.time.LocalDate");
typeMapping.put("date-time", "java.time.OffsetDateTime");
typeMapping.put("Date", "java.time.LocalDate");
typeMapping.put("DateTime", "java.time.OffsetDateTime");
importMapping.put("Date", "java.time.LocalDate");
importMapping.put("DateTime", "java.time.OffsetDateTime");
// use resource for file handling
typeMapping.put("file", "org.springframework.core.io.Resource");
languageSpecificPrimitives.addAll(Arrays.asList(
"Any",
"Byte",
"ByteArray",
"Short",
"Int",
"Long",
"Float",
"Double",
"Boolean",
"Char",
"String",
"Array",
"List",
"Map",
"Set"
));
importMapping.put("Date", "java.time.LocalDate");
importMapping.put("DateTime", "java.time.OffsetDateTime");
addOption(TITLE, "server title name or client service name", title);
addOption(BASE_PACKAGE, "base package (invokerPackage) for generated code", basePackage);
@@ -543,16 +514,16 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
private void doDataTypeAssignment(final String returnType, DataTypeAssigner dataTypeAssigner) {
if (returnType == null) {
dataTypeAssigner.setReturnType("Unit");
} else if (returnType.startsWith("List")) {
} else if (returnType.startsWith("kotlin.collections.List")) {
int end = returnType.lastIndexOf(">");
if (end > 0) {
dataTypeAssigner.setReturnType(returnType.substring("List<".length(), end).trim());
dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.List<".length(), end).trim());
dataTypeAssigner.setReturnContainer("List");
}
} else if (returnType.startsWith("Map")) {
} else if (returnType.startsWith("kotlin.collections.Map")) {
int end = returnType.lastIndexOf(">");
if (end > 0) {
dataTypeAssigner.setReturnType(returnType.substring("Map<".length(), end).split(",")[1].trim());
dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.Map<".length(), end).split(",")[1].trim());
dataTypeAssigner.setReturnContainer("Map");
}
}

View File

@@ -41,6 +41,7 @@ dependencies {
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml")
compile("com.fasterxml.jackson.module:jackson-module-kotlin")
testCompile("org.jetbrains.kotlin:kotlin-test-junit5")
testCompile("org.springframework.boot:spring-boot-starter-test") {
exclude(module = "junit")
}

View File

@@ -107,6 +107,12 @@
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit5</artifactId>
<version>1.3.31</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>

View File

@@ -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.OK)
}
@@ -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.OK)
}
@@ -106,8 +106,8 @@ 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>
,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: Int?
fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List<kotlin.String>
,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: kotlin.Int?
): ResponseEntity<List<Pet>> {
return ResponseEntity(service.findPetsByTags(tags, maxCount), HttpStatus.OK)
}
@@ -124,7 +124,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.OK)
}
@@ -156,9 +156,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.OK)
}
@@ -176,8 +176,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.OK)

View File

@@ -6,17 +6,17 @@ interface PetApiService {
fun addPet(pet: 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>, maxCount: Int?): List<Pet>
fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>, maxCount: kotlin.Int?): List<Pet>
fun getPetById(petId: Long): Pet
fun getPetById(petId: kotlin.Long): Pet
fun updatePet(pet: 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
}

View File

@@ -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>, maxCount: Int?): List<Pet> {
override fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>, maxCount: kotlin.Int?): 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")
}
}

View File

@@ -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.OK)
}
@@ -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.OK)
}
@@ -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.OK)
}

View File

@@ -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(order: Order): Order
}

View File

@@ -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")
}

View File

@@ -69,7 +69,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
value = ["/user/createWithArray"],
consumes = ["application/json"],
method = [RequestMethod.POST])
fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List<User>
fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List<User>
): ResponseEntity<Unit> {
return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.OK)
}
@@ -85,7 +85,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
value = ["/user/createWithList"],
consumes = ["application/json"],
method = [RequestMethod.POST])
fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List<User>
fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List<User>
): ResponseEntity<Unit> {
return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.OK)
}
@@ -100,7 +100,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.OK)
}
@@ -116,7 +116,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.OK)
}
@@ -125,16 +125,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 @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @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 @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @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.OK)
}
@@ -163,7 +163,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService)
value = ["/user/{username}"],
consumes = ["application/json"],
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 user: User
): ResponseEntity<Unit> {
return ResponseEntity(service.updateUser(username, user), HttpStatus.OK)

View File

@@ -5,17 +5,17 @@ interface UserApiService {
fun createUser(user: User): Unit
fun createUsersWithArrayInput(user: List<User>): Unit
fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Unit
fun createUsersWithListInput(user: List<User>): Unit
fun createUsersWithListInput(user: 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, user: User): Unit
fun updateUser(username: kotlin.String, user: User): Unit
}

View File

@@ -9,23 +9,23 @@ class UserApiServiceImpl : UserApiService {
TODO("Implement me")
}
override fun createUsersWithArrayInput(user: List<User>): Unit {
override fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Unit {
TODO("Implement me")
}
override fun createUsersWithListInput(user: List<User>): Unit {
override fun createUsersWithListInput(user: 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, user: User): Unit {
override fun updateUser(username: kotlin.String, user: User): Unit {
TODO("Implement me")
}
}

View File

@@ -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,
@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
@ApiModelProperty(example = "null", value = "")
@JsonProperty("name") val name: String? = null
@JsonProperty("name") val name: kotlin.String? = null
) {
}

View File

@@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty
data class InlineObject (
@ApiModelProperty(example = "null", value = "Updated name of the pet")
@JsonProperty("name") val name: String? = null,
@JsonProperty("name") val name: kotlin.String? = null,
@ApiModelProperty(example = "null", value = "Updated status of the pet")
@JsonProperty("status") val status: String? = null
@JsonProperty("status") val status: kotlin.String? = null
) {
}

View File

@@ -19,7 +19,7 @@ import io.swagger.annotations.ApiModelProperty
data class InlineObject1 (
@ApiModelProperty(example = "null", value = "Additional data to pass to server")
@JsonProperty("additionalMetadata") val additionalMetadata: String? = null,
@JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null,
@ApiModelProperty(example = "null", value = "file to upload")
@JsonProperty("file") val file: org.springframework.core.io.Resource? = null

View File

@@ -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
) {
}

View File

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

View File

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

View File

@@ -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
) {
}

View File

@@ -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
) {
}

View File

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

View File

@@ -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
}

View File

@@ -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")
}
}

View File

@@ -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))
}

View File

@@ -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
}

View File

@@ -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")
}

View File

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

View File

@@ -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
}

View File

@@ -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")
}
}

View File

@@ -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
) {
}

View File

@@ -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
) {
}

View File

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

View File

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

View File

@@ -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
) {
}

View File

@@ -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
) {
}

View File

@@ -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!!)

View 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

View File

@@ -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!!)