kotlin-openapi3-dsl icon indicating copy to clipboard operation
kotlin-openapi3-dsl copied to clipboard

[Feature] Configure required properties based on Kotlin null safety.

Open jpuerto opened this issue 2 years ago • 0 comments

I am currently using the following to define required properties from Kotlin data classes:

data class CarView(
    @field:Schema(required = true) val label: String,
    val description: String?,
    )

It should be great if we can avoid all this boilerplate by expressing the requirement with Kotlin Null Safety. So in previous code we do not need to annotate every field.

I think it could be expressed in the function findSchema

jpuerto avatar Nov 17 '23 12:11 jpuerto