-
- Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Is your feature request related to a problem? Please describe.
Our current java code cannot differentiate between these two use cases:
# int32 integer type: integer format: int32 # integer of unbounded size type: integer
in classes that implement IJsonSchemaValidationProperties.
- codegenProperty
- codegenModel
- codegenParameter
- codegenResponse
Both schemas define this property as codegenProperty.isInteger
so we have no way of differentiating between the two above use cases.
Describe the solution you'd like
I would like two booleans to describe each of these use cases:
- isUnboundedInteger
- isShortInteger
We can keep the existing isInteger property for existing generators.
This way the addition will be a non-breaking change.
Describe alternatives you've considered
One could use isInteger as isUnboundedInteger but that would be a bad way to do it because our current code is using it for both isUnboundedInteger + isShortInteger
Better to make two new boolean fields which fully represent these formats.
These two new fields should be added to https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
Additional context
This came up when working on imposing format constraints in
#8325