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

[BUG] [Java] [RestClient] Custmized ObjectMapper is Ignored #20111

Closed
6 tasks
antechrestos opened this issue Nov 15, 2024 · 0 comments
Closed
6 tasks

[BUG] [Java] [RestClient] Custmized ObjectMapper is Ignored #20111

antechrestos opened this issue Nov 15, 2024 · 0 comments

Comments

@antechrestos
Copy link
Contributor

antechrestos commented Nov 15, 2024

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Currently with code generated, we are not able to provide a customized objectMapper used during serialization. Indeed, RestClient.Builder builds a default list of converters and then calls the consumer that currently adds the MappingJackson2HttpMessageConverter with the customized ObjectMapper at the end.

openapi-generator version

7.9.0

OpenAPI declaration file content or url

Any one.

Generation Details
Steps to reproduce

Generate any ApiClient with RestClient by providing the ObjectMapper. By breakpoint you can see that the MappingJackson2HttpMessageConverter used during serialization is the one built by default and not the one built by the generated stub.

Suggestion

See MR #20112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant