Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human readable description support #13

Merged
merged 1 commit into from Jul 26, 2013
Merged

Human readable description support #13

merged 1 commit into from Jul 26, 2013

Conversation

theon
Copy link

@theon theon commented May 29, 2013

See: FasterXML/jackson-module-jsonSchema#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
Copy link

efuquen commented Jul 19, 2013

Any update on this feature, will it be merged?

@cowtowncoder
Copy link
Member

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.

import java.lang.annotation.Target;

/**
* Annotaion used to define a human readable description for a logical

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo -- "Annotation" is misspelled.

@christophercurrie
Copy link
Member

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.

cowtowncoder added a commit that referenced this pull request Jul 26, 2013
Human readable description support
@cowtowncoder cowtowncoder merged commit fa1fd92 into FasterXML:master Jul 26, 2013
cowtowncoder added a commit that referenced this pull request Jul 26, 2013
@ghost
Copy link

ghost commented Jul 30, 2013

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
Copy link
Member

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
Copy link
Author

theon commented Jul 31, 2013

Great! Thanks!

@janhrncir
Copy link

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
Copy link

What is the status of this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants