-
Please clarify: Are values like JSON schema allows values like
"without a fraction or exponent part" - does that mean that the number is not allowed to have a fraction part at all, e.g. Are the rules the same for JSON parameters and for query parameters? For example, consider this OpenAPI specification:
Are these requests valid?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
It looks like you're referencing OpenAPI 3.0 which uses JSON Schema draft-6/draft-0. That version of JSON Schema does not have an Draft 06 does have some additional information about mathematical integers, and suggest not using a decimal point for integer values, even though it is technically supported. Long story short, the fractional part is not allowed. |
Beta Was this translation helpful? Give feedback.
-
Answered, closing. |
Beta Was this translation helpful? Give feedback.
It looks like you're referencing OpenAPI 3.0 which uses JSON Schema draft-6/draft-0. That version of JSON Schema does not have an
integer
data type. The definition was added since we moved from draft 4, which did have an integer definition, though otherwise the draft versions are pretty much identical.Draft 06 does have some additional information about mathematical integers, and suggest not using a decimal point for integer values, even though it is technically supported.
Long story short, the fractional part is not allowed.