bean validations are no longer generated on Pojo's starting 0.17.5 generator: boat-spring having open-api property definition ``` state: maxLength: 50 minLength: 1 type: string ``` 0.17.4 generates ``` @lombok.Getter @lombok.Setter @lombok.EqualsAndHashCode.Include @lombok.ToString.Include @NotNull @Size(min = 1, max = 50) private String externalStateId; ``` 0.17.5 generates ``` @lombok.Getter @lombok.Setter @lombok.EqualsAndHashCode.Include @lombok.ToString.Include private String externalStateId; ``` 0.17.16 is still broken
Activity
walaniam commentedon Sep 14, 2023
@jjjasper I've noticed that those contstraints are added on getters.
For such definition https://github.com/Backbase/backbase-openapi-tools/blob/main/boat-scaffold/src/test/resources/boat-spring/openapi.yaml#L201 there is following code being generated:
Above code is tested here (with real validator) https://github.com/Backbase/backbase-openapi-tools/blob/main/boat-scaffold/src/test/java/com/backbase/oss/codegen/java/BoatSpringCodeGenTests.java#L219
jjjasper commentedon Sep 14, 2023
If the annotations were generated on the getters, that did not work for me in a real service.
This change fixes the behaviour for me.