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

Add @Documented to @JsonPropertyDescription - Feature request #64

Closed
zoliszel opened this issue Jul 9, 2015 · 4 comments
Closed

Add @Documented to @JsonPropertyDescription - Feature request #64

zoliszel opened this issue Jul 9, 2015 · 4 comments
Milestone

Comments

@zoliszel
Copy link

zoliszel commented Jul 9, 2015

Hi,

we are planning on using @JsonPropertyDescription to carry additional description into our generated schemas. Currently this annotation is not annotated with @<a href=http://docs.oracle.com/javase/7/docs/api/java/lang/annotation/Documented.html">Documented so the content is not visible in JavaDoc. We are currently using our custom one to come over this but I think this would be generally usefull to have (i.e. not duplicating comments). What do you think?
Regards,
Zoltan

@cowtowncoder
Copy link
Member

Looks like @Documented is Java7 addition, unfortunately. I have no other objections, but unfortunately this one is problematic until we upgrade baseline JDK requirement.

I have been thinking of proposing Jackson 2.7 to move to Java 7, for what that is worth. The only question is whether we'd leave jackson-core (streaming) and perhaps jackson-annotations out; but that may not have many benefits.

@zoliszel
Copy link
Author

If I am not mistaken it is available since 1.5: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/Documented.html (the link I posted was from 1.7 indeed :) )

@cowtowncoder
Copy link
Member

Ah. I should have double-checked, javadocs indeed suggest 1.5.

If so, no objections, I can add it.

Do you think any other Jackson annotations should use this meta-annotation?

@cowtowncoder cowtowncoder added this to the 2.6.0 milestone Jul 10, 2015
@zoliszel
Copy link
Author

All other Jackson annotations are related to controlling the way serialization/de-serialization works which I do not think necessarily needs to be part of the JavaDoc for a class (unless explicitly added) - this is also in-line with JAXB annotations, they are not documented either.

JsonPropertyDescription some what special as it conveys documentation by definition and as such I do not see any compeling reason to add @Documented to anything but that one.

Thanks for adding this in.

Regards,
Zoltan

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

No branches or pull requests

2 participants