Skip to content
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

Allow customization of netty http client mapper #647

Open
yawkat opened this issue Jul 19, 2023 · 0 comments · Fixed by #768
Open

Allow customization of netty http client mapper #647

yawkat opened this issue Jul 19, 2023 · 0 comments · Fixed by #768
Labels
type: improvement A minor improvement to an existing feature

Comments

@yawkat
Copy link
Member

yawkat commented Jul 19, 2023

Issue description

Right now it is impossible to customize the serializer used by the netty http client. It is a static field in OciSdkMicronautSerializer without any config options.

There's this TODO:

Additionally, NettyHttpResponse needs to be adjusted to use the proper mapper.

One option would be to use the JsonMapper from the context. It is already injected in ManagedNettyHttpProvider. This would also restore compatibility with jackson-databind (needs testing though). One potential issue is that global configuration of the mapper would impact the oci sdk, which might not be intended. As of serde 2.0 (time serialization changes), it should work fine with defaults, however.

An alternative would be to use a separate mapper, but allow configuration in the context.

@alvarosanchez alvarosanchez added the type: improvement A minor improvement to an existing feature label Jul 19, 2023
yawkat added a commit that referenced this issue Jan 10, 2024
Use the new serde clone API to use the ObjectMapper from the BeanContext for ManagedNettyHttpProvider. This allows adding custom serdes to the mapper.

Jackson remains unsupported for now, because there is no central cloneWithConfiguration API atm.

Fixes #647
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants