Closed ufoscout closed 8 years ago
Sounds reasonable, this could go in 2.7. Would just need addition of the annotation, a discovery method in AnnotationIntrospector
(of jackson-databind
), and schema generator to use it.
Added annotation, need to add support in jackson-databind
as well.
With version 2.3 the new @JsonPropertyDescription annotation has been introduced to define a human readable description for a logical property. It would be good to have an equivalent annotation at class level to add a description to be used by the JSON schema generator. Today the only way of providing a class level description is setting it manually to the JsonSchema object during the schema generation, e.g.:
The real drawback of the current solution is that the description itself cannot be saved with the class itself. The use of a @JsonClassDescription annotation would permit to have the description embedded within the class in a more coherent way.