Skip to content

[BUG] Kotlin generator: CustomTypeAdapterFactory not registered with generateOneOfAnyOfWrappers #20216

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

Closed
2 of 6 tasks
Djaler opened this issue Dec 1, 2024 · 0 comments · Fixed by #20217
Closed
2 of 6 tasks

Comments

@Djaler
Copy link
Contributor

Djaler commented Dec 1, 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

When generateOneOfAnyOfWrappers option used in kotlin generator and gson serialization library, model classes contains CustomTypeAdapterFactory, which should be used to correctly serialize/deserialize oneOf/anyOf parameters. But this factories are not used out of the box.

openapi-generator version

7.10.0

Suggest a fix

We should just generate this factories registration in Serializer.kt, like in jvm-retrofit2 ApiClient

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