You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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
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:
micronaut-oracle-cloud/oraclecloud-httpclient-netty/src/main/java/io/micronaut/oraclecloud/httpclient/netty/ManagedNettyHttpProvider.java
Line 63 in 651474f
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.
The text was updated successfully, but these errors were encountered: