-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Model getters have same annotations as fields (breaks native) #6086
Conversation
29dee24
to
7111d31
Compare
Signed-off-by: Marc Nuri <[email protected]>
Signed-off-by: Marc Nuri <[email protected]>
Signed-off-by: Marc Nuri <[email protected]>
Quality Gate failedFailed conditions |
This is passing now. The new approach is to add the JsonInclude and JsonUnwrapped annotations to getter methods too so that they share the same configuration. If the issue in native mode was that there was divergent configuration for serialization properties and field configuration took precedence, then this should address it. Let me know if I should merge this and include it in 6.13.1 or defer it to a possible 6.13.2 or alternative workaround. |
I'm going to merge this since I don't think it causes any harm and might fix the downstream issue. I'll try and release 6.13.1 tomorrow with this included, if you think this shouldn't go in or we should revert, please let me know today. |
Hi @manusa , There are still some methods that are not annotated like in @JsonProperty("annotations")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, String> annotations = new LinkedHashMap<String, String>();
@JsonProperty("annotations")
public Map<String, String> getAnnotations() {
return annotations;
}
@JsonProperty("annotations")
public void setAnnotations(Map<String, String> annotations) {
this.annotations = annotations;
} |
🤦 😮💨 too much logic scattered around. I created another issue #6098 to fix this. |
Description
Fix #6085 annotate getters with same Jackson annotations as fields.
Type of change
test, version modification, documentation, etc.)
Checklist