Skip to content
New issue

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

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

Already on GitHub? # to your account

Ignoring fields from documentation (only) #983

Closed
vghero opened this issue Sep 3, 2019 · 6 comments
Closed

Ignoring fields from documentation (only) #983

vghero opened this issue Sep 3, 2019 · 6 comments
Labels
Milestone

Comments

@vghero
Copy link

vghero commented Sep 3, 2019

We have a REST API where we want to rename fields. To be able to be backwards compatible, we simply introduced the new field and keep support for the old one as well. Since it might be confusing in the docs, we would like to just exclude the old fields from the documentation (only) - so new clients will directly use the new field. But not from the JSON payload using @JsonIgnore. It would be nice, if that would be supported.

@panchenko
Copy link
Contributor

@vghero have you tried the com.webcohesion.enunciate.metadata.Ignore annotation?

@stoicflame
Copy link
Owner

Or the @ignore JavaDoc.

@stoicflame stoicflame added this to the 2.13.0 milestone Sep 3, 2019
@vghero
Copy link
Author

vghero commented Sep 4, 2019

Works like a charm! Although one has to take care with the javadoc version. @Ignore != @ignore :). Thanks guys!

@vghero
Copy link
Author

vghero commented Sep 5, 2019

Ah, just forgot to mention, that the wiki page only mentions that those can be put on a class. Not on other places like fields, methods etc. Thanks again anyway!

@stoicflame
Copy link
Owner

Fix has been included in Enunciate 2.12.1.

@vghero
Copy link
Author

vghero commented Oct 15, 2019

Sweet, thx!

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

No branches or pull requests

3 participants