Skip to main content
Use "type": "integer" when decimal values are not valid.

Common constraints

integer supports the same numeric bound keywords as number (minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf).

When to use

  • Use integer for counters, indexes, and IDs.
  • Use number when decimals are allowed.