-
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
exampleSetFlag leaks in json output produced by ObjectMapper #3702
Comments
thanks for reporting this, please see this comment about using the correctly configured object mapper. closing ticket, please reopen if you're still experiencing issues |
thanks for pointing to this comment. As you suggested, I added a MixIn class to my ObjectMapper to ignore the new field in JSON serialization. |
The flag is excluded in default swagger object mapper. Fixes javalin#1079 - issues after updating to swagger 2.1.4
This is not enough solution, see #4381 |
If anyone else is having this issue make sure you have imported ObjectMapper from io.swagger.v3.core.util.Json and not from io.swagger.util.Json. Both have similar interfaces, but only io.swagger.v3.core.util.Json excludes exampleSetFlag |
Since 2.1.4, the field
exampleSetFlag
appears in json produced with ObjectMapper#writeValue(File, Object) when serializing an object of type OpenApi.Using swagger-core 2.1.3 (OK) :
Since swagger-core 2.1.4 (not OK):
It seems to me that the field exampleSetFlag is internal and should be ignored by jackson object mapper.
Could you update the class Schema to add annotation
@JsonIgnore
on fieldexampleSetFlag
, like it is already done for fieldname
?I can submit a PR if you're OK with it.
The text was updated successfully, but these errors were encountered: