Replies: 2 comments 3 replies
-
Imho not failing on deserialization of unknown enum values is a key behavior for backward compatibility. Clients will not fail directly but may fail on the |
Beta Was this translation helpful? Give feedback.
-
My impression also was that the configuration is a manifestation of the "tolerant reader" pattern. Nevertheless you can get backwards compatibility by marking enums as deprecated AFAIK. This would be in sync with changing other parts of the API. With the current configuration it's probably not possible to show a 422 result in case the client sends a wrong value for an enum, right? |
Beta Was this translation helpful? Give feedback.
-
Hi folks and especially @SDA-SE/sda-commons-maintainer ,
as stated in Jackson Bundle Readme, the object mapper is currently mapped for maximum fault tolerance. But is this the right configuration for deserialization of REST JSON?
Currently, there is an discussion to change the default values for the object mapper in the service as follows:
Reason:
The two additional object mappers maps the error to the default SDA error structure.
If you think we should change this default behavior, I would be happy to create the PR.
Thanks for your opinions.
André
Beta Was this translation helpful? Give feedback.
All reactions