We're using Java 11 with the following version of Swagger Codegen
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.35</version>
I have this in my OpenAPI 3 spec for a particular DTO field,
amount:
type: number
format: double
maximum: 99999999.99
multipleOf: 0.01
Upon running the plugin, the DTO is generated without the decimal places
/**
* Get amount
* maximum: 99999999
* @return amount
**/
@Schema(required = true, description = "")
@NotNull
@DecimalMax("99999999") public Double getAmount() {
return amount;
}
As a result, when I submit a value for my listed maximum, 99999999.99, I get this error
"errorMessage": "must be less than or equal to 99999999"
What's the proper way in the openAPI spec and Swagger code gen to have a maximum field with decimal places included afterwards?