micronaut-openapi-codegen
micronaut-openapi-codegen copied to clipboard
Enums generated without @Serdable annotations
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 - https://github.com/alButusov/micronaut-openapi-codegen/commit/30bffacea388b9d57d972fbf9b60c47508b4bc5e (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?