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

Enums generated without @Serdable annotations #407

Closed
alButusov opened this issue Aug 26, 2024 · 2 comments
Closed

Enums generated without @Serdable annotations #407

alButusov opened this issue Aug 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@alButusov
Copy link

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 - micronaut-projects/micronaut-serialization#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 - alButusov@30bffac (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?

sschnabe added a commit that referenced this issue Sep 10, 2024
sschnabe added a commit that referenced this issue Sep 10, 2024
@sschnabe
Copy link
Member

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

@sschnabe sschnabe self-assigned this Sep 10, 2024
@sschnabe sschnabe added the bug Something isn't working label Sep 10, 2024
sschnabe added a commit that referenced this issue Sep 18, 2024
sschnabe added a commit that referenced this issue Sep 18, 2024
@sschnabe
Copy link
Member

see 4.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants
@sschnabe @alButusov and others