FasterXML / FasterXML/jackson-annotations
'Bundled' @JsonView annotations should merge
- Langage dominant
- Java
- Étoiles
- 1.1k
- Forks
- 342
- Merge moyen
- 8 h 53 min
- PR mergées (30 j)
- 2
Description
I have created two annotation bundles:
```
...
@JsonView(view1.class)
@JacksonAnnotationsInside
...
public @interface bundle1 {
...
```
and
```
...
@JsonView(view2.class)
@JacksonAnnotationsInside
...
public @interface bundle2 {
...
```
Then I apply the annotations to properties, like this:
```
@bundle1
String prop1
@bundle2
int prop2
@bundle1
@bundle2
boolean prop3
```
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.