-
Bug
-
Resolution: Unresolved
-
Major
-
3.20.0.GA
-
None
-
None
-
False
-
-
False
-
-
-
-
Important
-
0
The POJOs generated with OpenAPI contract fails validation.
Steps to reproduce:
- Use the openapi-contract-first as the base project.
https://github.com/apache/camel-quarkus-examples/tree/main/openapi-contract-first
- Enable bean validation in application.properties:
quarkus.camel.openapi.codegen.use-bean-validation=true
- Add min/max to any of the properties in the schema:
"components": { "schemas": { "Order": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 787878787878, "example": 787878787878 }
- Now, the project fails compilation:
[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /test/api/src/main/java/io/swagger/client/api/StoreApi.java:[667,68] integer number too large [ERROR] /test/api/src/main/java/io/swagger/client/model/Order.java:[109,15] integer number too large [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE
Upstream Issue:
https://github.com/swagger-api/swagger-codegen-generators/issues/1370