mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 05:06:09 +00:00
add use-site target field for JsonProperty annotation in kotlin data classes (#6186)
This commit is contained in:
@@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Category(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("name") val name: kotlin.String? = null
|
||||
@field: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: kotlin.Int? = null,
|
||||
@field:JsonProperty("code") val code: kotlin.Int? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("type") val type: kotlin.String? = null,
|
||||
@field:JsonProperty("type") val type: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("message") val message: kotlin.String? = null
|
||||
@field:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -24,22 +24,22 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Order(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("petId") val petId: kotlin.Long? = null,
|
||||
@field:JsonProperty("petId") val petId: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("quantity") val quantity: kotlin.Int? = null,
|
||||
@field:JsonProperty("quantity") val quantity: kotlin.Int? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null,
|
||||
@field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Order Status")
|
||||
@JsonProperty("status") val status: Order.Status? = null,
|
||||
@field:JsonProperty("status") val status: Order.Status? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("complete") val complete: kotlin.Boolean? = null
|
||||
@field:JsonProperty("complete") val complete: kotlin.Boolean? = null
|
||||
) {
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,23 +27,23 @@ data class Pet(
|
||||
|
||||
@get:NotNull
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
@JsonProperty("name") val name: kotlin.String,
|
||||
@field:JsonProperty("name") val name: kotlin.String,
|
||||
|
||||
@get:NotNull
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
@field:JsonProperty("photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("category") val category: Category? = null,
|
||||
@field:JsonProperty("category") val category: Category? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null,
|
||||
@field: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
|
||||
@field:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty
|
||||
data class Tag(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("name") val name: kotlin.String? = null
|
||||
@field: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: kotlin.Long? = null,
|
||||
@field:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("username") val username: kotlin.String? = null,
|
||||
@field:JsonProperty("username") val username: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("firstName") val firstName: kotlin.String? = null,
|
||||
@field:JsonProperty("firstName") val firstName: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("lastName") val lastName: kotlin.String? = null,
|
||||
@field:JsonProperty("lastName") val lastName: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("email") val email: kotlin.String? = null,
|
||||
@field:JsonProperty("email") val email: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("password") val password: kotlin.String? = null,
|
||||
@field:JsonProperty("password") val password: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
@field:JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
|
||||
@ApiModelProperty(example = "null", value = "User Status")
|
||||
@JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
@field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user