You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now these are the storage of some json schema numeric constraints for this library's Java parsing:
BigDecimal maximum/minimum
BigDecimal exclusiveMaximum/exclusiveMinimum
Integer minLength/maxLength
Integer minProperties/maxProperties
Integer minItems/maxItems
BigDecimal multipleOf
And these are the definitions per the 2020-12 json schema draft:
maximum/minimum (defined as number)
exclusiveMaximum/exclusiveMinimum (defined as number)
minLength/maxLength (defined as non-neg integer)
minProperties/maxProperties (defined as non-neg integer)
minItems/maxItems (defined as non-neg integer)
multipleOf (defined as number > 0)
the josn schema spec does not define any allowed maxes, so json specifications are the only limit on number and integer sizes here
So the range defined is
Keywords
Spec Definition
Current Java Definition
Proposed Java
exclusiveMaximum/exclusiveMinimum
defined as number
BigDecimal
BigDecimal or Number
minLength/maxLength
defined as non-neg integer
Integer
Long or BigInteger
minProperties/maxProperties
defined as non-neg integer
Integer
Long or BigInteger
minItems/maxItems
defined as non-neg integer
Integer
Long or BigInteger
multipleOf
defined as number > 0
BigDecimal
BigDecimal or Number
I am aware that ArrayList size and String size is integer (32 bit) in Java and your parser is used to generate code in many languages in openapi-generator and other projects. Those languages have different constraints.
In python for example list size + string size is limited by your architecture and can be 32 bit or 64 bit maximums.
For this reason, can the below keywords be changed to Long or BigInteger?
minLength/maxLength
minProperties/maxProperties
minItems/maxItems
The text was updated successfully, but these errors were encountered:
spacether
changed the title
[REQ] request to adjust storage of numeric constraints
[REQ] request to adjust storage of numeric json schema constraints
Nov 28, 2023
Right now these are the storage of some json schema numeric constraints for this library's Java parsing:
BigDecimal maximum/minimum
BigDecimal exclusiveMaximum/exclusiveMinimum
Integer minLength/maxLength
Integer minProperties/maxProperties
Integer minItems/maxItems
BigDecimal multipleOf
And these are the definitions per the 2020-12 json schema draft:
maximum/minimum (defined as number)
exclusiveMaximum/exclusiveMinimum (defined as number)
minLength/maxLength (defined as non-neg integer)
minProperties/maxProperties (defined as non-neg integer)
minItems/maxItems (defined as non-neg integer)
multipleOf (defined as number > 0)
the josn schema spec does not define any allowed maxes, so json specifications are the only limit on number and integer sizes here
So the range defined is
I am aware that ArrayList size and String size is integer (32 bit) in Java and your parser is used to generate code in many languages in openapi-generator and other projects. Those languages have different constraints.
In python for example list size + string size is limited by your architecture and can be 32 bit or 64 bit maximums.
For this reason, can the below keywords be changed to Long or BigInteger?
The text was updated successfully, but these errors were encountered: