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
Swagger does not respect Jackson @JsonIgnoreProperties annotation #2613
Comments
This is a known issue |
Hello, it seems the issue is still there (see also #113) Any plan of fixing it ? or any workarounds ? |
In some cases a workaround for this issue is overload the getter of parent property and use @JsonIgnore, i.e: @JsonIgnore
public Links getLinks() {
return super.getLinks();
} |
Hi, I currently have this problem on my project. This is insane, because some of my objects are linked to another objects, and so on. My scheme is completely wrong due to this problem... Is there any workaround for this ? Or, at least, a way to tell Springfox to do not go further than one or two "indirection" level ? |
@dilipkrish Could this issue be addressed at some moment in the 3.x line? I've run into this problem a lot of times in the last 5 years so it'd be great if it could be fixed. |
@Artheriom Thanks for the suggestion, but it won't help in my case. I need to ignore the
Since getSuppressed is final I can't override that method to place a
|
still no solution ? |
@Jojoooo1 will try and see if I can fix |
is this issue Fixed ? any updates on this ? |
Tried with 3.0.0 release but not working. |
Use <templateResourcePath> option in the configuration. {{/jackson}} |
When I used @JsonIgnoreProperties annotation to ignore some redundant properties from the super classes, it has completely no effect on Swagger. The consequence is the API document and the real Json objects have inconsistent structure. Does anyone know how we can solve this problem?
@JsonIgnoreProperties(value = {"houseNo","coNo","coName","reviewer","latelyMonthLookTimes"
,"reviewTime"})
public class SecondHouseBrokerInVo extends SecondHouseVo {
}
The text was updated successfully, but these errors were encountered: