Enums generated without @Serdable annotations #407
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#407
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 am using the generator version 4.2.0 and faced the following problem:
Enum classes are generated without the @Serdable annotation, which is why the Jackson annotations (@JsonCreator and @JsonValue) do not work.
This is a known problem - https://github.com/micronaut-projects/micronaut-serialization/issues/780.
As a solution, it is recommended to add the @Serdable annotation, but I did not find such an opportunity in the generator configuration and in the modelEnum.mustache file.
To illustrate, I made an example with tests -
github.com/alButusov/micronaut-openapi-codegen@30bffacea3(simple example from https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/ for allOff).Does this require a modification of the generator or am I doing something wrong?
Hi @alButusov , thanks for this issue. This was a bug, can you check #411 ? If this pr fixes yoor issue i will create a release. br
see 4.3.1