Child class cannot be deserialized #356
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
renovate
renovate-manager
cargo
renovate-manager
dockerfile
renovate-manager
git-submodules
renovate-manager
gomod
renovate-manager
kustomize
renovate-manager
kustomize
renovate-manager
maven
renovate-manager
maven
renovate-manager
npm
renovate-manager
pip_requirements
renovate-manager
regex
renovate-manager
renovate-config-presets
renovate-manager
woodpecker
renovate-type
bump
renovate-type
digest
renovate-type
lockFileMaintenance
renovate-type
major
renovate-type
minor
renovate-type
patch
renovate-type
pin
renovate-type
pinDigest
renovate-type
replacement
renovate-type
rollback
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
kokuwaio/micronaut-openapi-codegen#356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi! I use the latest generator and have schemas like this:
The following files are generated:
The problem with this annotation:
When we receive Child's json, Jackson fails to build deserializer, because Child class is not subclass of ParentDefault.
So we have an error:
I tried to register custom deserializer, but Jackson prioritize JsonDeserialize annotation on deserializer lookup.
We tried
x-is-one-of-interfaceextension to fix this issue and it works. But our specification is used by other services with different generators (plain java with feign library) and this extension breaks their codegen.On branch issue-356 i tried to reproduce your issue. But the ModelTest works for me. Please tell me the difference to your setup.
Hi, @sschnabe, sorry for the late response. I uploaded a little example of our way of serialization/desrialization - https://github.com/vgsub/micronaut-codegen-example/tree/main. We compared your test and our example and found out that the problem is that we do not use micronaut-serde-jackson module and generator's 'serde' property is disabled.
Seems like we have to migrate our apps to micronaut-serde-jackson, so I will close this issue. Thanks for your support!