[Kotlin-Spring] Fix required model property deserialization (#8337)

* Fix required model property deserialization

* Update samples
This commit is contained in:
Christophe Bornet
2021-01-07 09:18:21 +01:00
committed by GitHub
parent 4526ca2610
commit e73ae8c048
5 changed files with 11 additions and 19 deletions

View File

@@ -26,13 +26,11 @@ import io.swagger.annotations.ApiModelProperty
*/
data class Pet(
@get:NotNull
@ApiModelProperty(example = "doggie", required = true, value = "")
@field:JsonProperty("name") val name: kotlin.String,
@field:JsonProperty("name", required = true) val name: kotlin.String,
@get:NotNull
@ApiModelProperty(example = "null", required = true, value = "")
@field:JsonProperty("photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>,
@field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List<kotlin.String>,
@ApiModelProperty(example = "null", value = "")
@field:JsonProperty("id") val id: kotlin.Long? = null,