How to configure ObjectMapper only for http server #5690
Unanswered
tchiotludo
asked this question in
Q&A
Replies: 1 comment
-
UP, somebody has found a solution 🙏 ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I need to configure the
ObjectMapper
with this optionsobjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
but only for the webserver.My use case is that if the user submit invalid data (unknown properties), I want that the webserver refuse the body with
@Valid
annotation.I can use this configuration :
that do the job, but all the micronaut client will inherit this configuration.
But I need to keep the configuration of Http Client since there is some issue with OIDC that return custom properties :
Also I have some raw http client usage so I can't use the
@JacksonFeatures
to customize these http clients.Thanks
Beta Was this translation helpful? Give feedback.
All reactions