-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Comments
madeleine-a
added a commit
to madeleine-a/swagger-core
that referenced
this issue
Jan 19, 2022
We also have this same issue I should say, and would be very happy if this could be fixed in next release. |
Hi @frantuma This one didn't go into release 2.1.13. Why not? Do you need anything from me? |
frantuma
added a commit
that referenced
this issue
Apr 4, 2022
frantuma
added a commit
that referenced
this issue
Apr 4, 2022
fixed in #4157 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In ModelResolver there is a check for @JsonIgnore annotation, but the value is ignored:
swagger-core/modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ModelResolver.java
Lines 995 to 997 in 2f81363
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.
The text was updated successfully, but these errors were encountered: