FasterXML / jackson-annotations

Core annotations (annotations that only depend on jackson-core) for Jackson data processor
https://github.com/FasterXML/jackson
Apache License 2.0
1.03k stars 330 forks source link

Human readable description support #13

Closed theon closed 11 years ago

theon commented 11 years ago

See: https://github.com/FasterXML/jackson-module-jsonSchema/issues/12

JSON Schema (v3 and v4) allows a human readable description to be associated with each field: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22

It would be good to have an annotation for defining a description for each property, which the JSON Schema Jackson module can respect.

efuquen commented 11 years ago

Any update on this feature, will it be merged?

cowtowncoder commented 11 years ago

Oh. Hmmh. Sorry, this must have slipped as I did not realize it was open.

I am bit torn here -- on one hand, I want set of Jackson core annotations to be minimalistic. But it is just one annotation, and relatively useful.

If this is to be added, it should also get support from databind (AnnotationIntrospector), which is something I can do.

I'll have to think about this; I'll send a note on dev list first.

Thank you for reminding me.

christophercurrie commented 11 years ago

A possible trade-off of the additional annotation would be to add a description attribute to @JsonProperty, though I suppose that could have unwanted impacts on data-binding.

ghost commented 11 years ago

Any reason why I'm not finding this JsonPropertyDescription in any of the recent releases 2.2.x? BTW howdy @cowtowncoder ... it's been a long time. Hope you're well.

cowtowncoder commented 11 years ago

As with all additions or changes to public API, it'll go into next minor release (2.3.0), not in a patch release. So you can see it in 2.3.0-SNAPSHOT.

theon commented 11 years ago

Great! Thanks!

janhrncir commented 10 years ago

Is the annotation @JsonPropertyDescription supported by jackson-module-jsonSchema? I have tried to generate JSON schema with jackson-module-jsonSchema 2.3.3. However, it ignores @JsonPropertyDescription annotation. Where is the problem?

jesse8888 commented 10 years ago

What is the status of this issue?