-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
'Bundled' @JsonView annotations should merge #38
Comments
Interesting. Yes, I could see why it would make sense. Similar merging would make sense for some other annotations, like:
and probably others I can't think of now. For others it may be necessary to simply take one of the lists, as there is no meaningful way to merge values contained. I'll have to figure out how feasible this is to do; if all goes well, it could get added in 2.5 (I expect some changes to internal APIs are needed). |
That would be great if it works out. Also, it is great how quickly you respond to issues. It is very appreciated. |
@davideanderson I have noticed that it is better to try to respond quickly; otherwise it's easy to forget. And it's also self-reinforcing process, I appreciate when submitter follows up on issue too. Quick progress will halt for a bit (I'll be off for 20 day vacation now :) ), but hopefully we'll get this resolved in July. Thank you again for good suggestion; use case makes sense but I hadn't thought about it. One of those things that are obvious in hindsight. |
Enjoy the vacation.. 20 days sounds great! |
Just a quick note: have not been able to figure out how to do this yet, will not be part of 2.6. |
I have created two annotation bundles:
and
Then I apply the annotations to properties, like this:
I would like it if the @JSONVIEW annotations be merged for prop3 (becoming the equivalent of @JSONVIEW({view1.class, view2.class})). Right now it appears that one of the them overwrites the other one.
Alternatively, if there is another way of doing what I am trying, I would appreciate that. I know I could create a 3rd annotation named bundle1and2, but that is a bit ugly and I end up with duplicate code. I know I can also remove the @JSONVIEW from the bundles and separate it out and use @JSONVIEW({view1.class, view2.class}), but I don't want to do that either as I would prefer the views to be encapsulated in the bundles.
The text was updated successfully, but these errors were encountered: