forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin' into 7.0.x
This commit is contained in:
@@ -15,6 +15,7 @@ import springfox.documentation.spring.web.plugins.Docket
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2
|
||||
import javax.servlet.ServletContext
|
||||
|
||||
|
||||
@jakarta.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"])
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
|
||||
@@ -18,15 +18,8 @@ import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.context.request.NativeWebRequest
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
|
||||
import kotlin.collections.List
|
||||
import kotlin.collections.Map
|
||||
|
||||
@@ -17,15 +17,8 @@ import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.context.request.NativeWebRequest
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
|
||||
import kotlin.collections.List
|
||||
import kotlin.collections.Map
|
||||
@@ -74,7 +67,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic
|
||||
@ApiOperation(
|
||||
value = "Find purchase order by ID",
|
||||
nickname = "getOrderById",
|
||||
notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
|
||||
notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions",
|
||||
response = Order::class)
|
||||
@ApiResponses(
|
||||
value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")])
|
||||
|
||||
@@ -26,7 +26,7 @@ interface StoreApiService {
|
||||
|
||||
/**
|
||||
* GET /store/order/{orderId} : Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
*
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return successful operation (status code 200)
|
||||
|
||||
@@ -17,15 +17,8 @@ import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.context.request.NativeWebRequest
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
|
||||
import kotlin.collections.List
|
||||
import kotlin.collections.Map
|
||||
|
||||
@@ -2,14 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
@@ -21,10 +14,10 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Category(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("name") val name: kotlin.String? = null
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -2,14 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
@@ -22,13 +15,13 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class ModelApiResponse(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("code") val code: kotlin.Int? = null,
|
||||
@get:JsonProperty("code") val code: kotlin.Int? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("type") val type: kotlin.String? = null,
|
||||
@get:JsonProperty("type") val type: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("message") val message: kotlin.String? = null
|
||||
@get:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -3,14 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
@@ -26,22 +19,22 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Order(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("petId") val petId: kotlin.Long? = null,
|
||||
@get:JsonProperty("petId") val petId: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("quantity") val quantity: kotlin.Int? = null,
|
||||
@get:JsonProperty("quantity") val quantity: kotlin.Int? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null,
|
||||
@get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Order Status")
|
||||
@field:JsonProperty("status") val status: Order.Status? = null,
|
||||
@get:JsonProperty("status") val status: Order.Status? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
) {
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,14 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
@@ -28,24 +21,24 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Pet(
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
@field:JsonProperty("name", required = true) val name: kotlin.String,
|
||||
@get:JsonProperty("name", required = true) val name: kotlin.String,
|
||||
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
@get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@field:Valid
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("category") val category: Category? = null,
|
||||
@get:JsonProperty("category") val category: Category? = null,
|
||||
|
||||
@field:Valid
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null,
|
||||
@get:JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "pet status in the store")
|
||||
@field:JsonProperty("status") val status: Pet.Status? = null
|
||||
@get:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,14 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
@@ -21,10 +14,10 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Tag(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("name") val name: kotlin.String? = null
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -2,14 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
import javax.validation.constraints.Max
|
||||
import javax.validation.constraints.Min
|
||||
import javax.validation.constraints.NotNull
|
||||
import javax.validation.constraints.Pattern
|
||||
import javax.validation.constraints.Size
|
||||
import javax.validation.constraints.*
|
||||
import javax.validation.Valid
|
||||
import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
@@ -27,28 +20,28 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class User(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("username") val username: kotlin.String? = null,
|
||||
@get:JsonProperty("username") val username: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("firstName") val firstName: kotlin.String? = null,
|
||||
@get:JsonProperty("firstName") val firstName: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("lastName") val lastName: kotlin.String? = null,
|
||||
@get:JsonProperty("lastName") val lastName: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("email") val email: kotlin.String? = null,
|
||||
@get:JsonProperty("email") val email: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("password") val password: kotlin.String? = null,
|
||||
@get:JsonProperty("password") val password: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@field:JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
@get:JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "User Status")
|
||||
@field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ paths:
|
||||
- store
|
||||
get:
|
||||
description: For valid response try integer IDs with value <= 5 or > 10. Other
|
||||
values will generated exceptions
|
||||
values will generate exceptions
|
||||
operationId: getOrderById
|
||||
parameters:
|
||||
- description: ID of pet that needs to be fetched
|
||||
|
||||
Reference in New Issue
Block a user