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

Check value of @JsonIgnore in ModelResolver #4059

Closed
cpene1 opened this issue Dec 3, 2021 · 3 comments
Closed

Check value of @JsonIgnore in ModelResolver #4059

cpene1 opened this issue Dec 3, 2021 · 3 comments
Assignees

Comments

@cpene1
Copy link

cpene1 commented Dec 3, 2021

In ModelResolver there is a check for @JsonIgnore annotation, but the value is ignored:

if (member.hasAnnotation(JsonIgnore.class)) {
return true;
}

However I think there should be an extra check on the value, since it can be annotated with @JsonIgnore(false). This can happen for example when you want to Override a @JsonIgnore annotation from a parent class. (I tested this locally and it gives the expected result)

So instead of returning true immediately, I would continue if the value is false.

madeleine-a added a commit to madeleine-a/swagger-core that referenced this issue Jan 19, 2022
@madeleine-a
Copy link

We also have this same issue I should say, and would be very happy if this could be fixed in next release.

@frantuma frantuma self-assigned this Jan 27, 2022
@madeleine-a
Copy link

Hi @frantuma This one didn't go into release 2.1.13. Why not? Do you need anything from me?

@frantuma
Copy link
Member

frantuma commented Apr 4, 2022

fixed in #4157

@frantuma frantuma closed this as completed Apr 4, 2022
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

3 participants