Replies: 2 comments 1 reply
-
Can't you create different objectmapper instances to handle different message types? Maybe Swagger team can add this feature to their libs. |
Beta Was this translation helpful? Give feedback.
-
No, I don't think there is a way to define such contextuality unfortunately. Although... you MIGHT be able to figure out a way to override lookup for |
Beta Was this translation helpful? Give feedback.
-
I have generated sources from openapi. I'd like to disable returning null/empty collections and maps.
I did following changes to the ObjectMapper
however this affects every class, which is not wanted. Can I somehow enable
NON_EMPTY
andNON_NULL
serialization but just for some packages (e.g.com.example.*.generated.*
)?Beta Was this translation helpful? Give feedback.
All reactions