Open
Description
For a data class defined as follows,
import io.swagger.v3.oas.annotations.Parameter
import io.swagger.v3.oas.annotations.media.Schema
// ...
@Schema(description = "Test DateWrapper Description")
data class DateWrapper(
@Parameter(description = "test description")
val startDate: LocalDate,
val endDate: LocalDate? = null,
)
the output of the json is as follows.
"DateWrapper": {
"description": "Test DateWrapper Description",
"type": "object",
"properties": {
"endDate": {
"format": "date",
"type": "string"
},
"startDate": {
"format": "date",
"type": "string"
},
}
},
I am trying to provide a description for the Property (startDate
) in the Schema. Could you provide some guidance on how to do achieve this? I am looking for an output as follows:
"DateWrapper": {
"description": "Test DateWrapper Description",
"type": "object",
"properties": {
"endDate": {
"format": "date",
"type": "string"
},
"startDate": {
"format": "date",
"type": "string",
"description" : "test description"
},
}
},
Metadata
Metadata
Assignees
Labels
No labels