I use springdoc for describing API. I have the this request body
class SearchRequest {
val fields: List<Field>? = null
var searchTerm: String? = null
@Parameter(description = "Page number")
var pageNumber: Int = 0
@Parameter(description = "Page size", schema = Schema(type = "integer", defaultValue = "20"))
var pageSize: Int = 20
}
which is used in Post method and annotated with @ParameterObject all fields displayed as inputs in swagger-ui, except List. Field is an interface which is implemened by other classes
interface Field {
@get:Schema(description = "Field name")
val name: String
@get:Schema(description = "Field value")
val value: Any
@get:Schema(description = "Field type")
val type: FieldType
}
I want to display name, value, type as separate input fields in swagger-ui(or may be better approach exists), how can I do that?