[BUG] [Java] Bean Validation for min/max incorrect when exclusive set
Created by: GynnRickerbyNZPost
When a field has a minimum/maximum specified, with the exclusive parameter set, e.g.
aNumber:
type: number
minimum: 2
exclusiveMinimum: true
The generated Java Bean Validation code isn't correct. E.g. Current incorrect code:
@Valid
@DecimalMin("2")
public BigDecimal getANumber() {
Expected code:
@Valid
@DecimalMin(value="2",inclusive=false)
public BigDecimal getANumber() {
Tested with Spring Generator (both spring-boot and spring-cloud libraries), but I believe all Java libraries are using the same validation generation code.