-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[java] Polymorphic deserialization not working for sub-subtype #827
Comments
Thank you a lot for this detailed issue. The code that creates the code is here: openapi-generator/modules/openapi-generator/src/main/resources/Java/JSON.mustache Lines 61 to 76 in 1c6ab3f
But I think that the problem is that for the moment the Codegen layer (*) do not consider that I can help you to file a PR if you want. If you need additional pointers, please let me know. (*) after the openapi-spec is parsed, the Codegen layer is an other model that contains all the values that the templates will use. |
Description
Cannot deserialize an object when using its super-supertype.
openapi-generator version
3.2.1 Not a regression. Same issue when using Swagger 2.
OpenAPI declaration file content or url
Command line used for generation
Using the maven plugin with hideGenerationTimestamp=true
Using the default okhttp-gson client
Steps to reproduce
These two tests fail but I expected them to work:
Stack trace:
Suggest a fix/enhancement
Didn't have time to setup yet (just started using openapi generator). I could fix it but will need guidance.
The current generated code in JSON.java:
but I would expect exactly this:
The text was updated successfully, but these errors were encountered: