json.integer
Randomly generates integer values, or generates successive values if step is specified.
Attributes
minimumoptionalThe minimum value (inclusive) to be generated. Corresponds to the minimum JSON schema keyword. The default value is -9,223,372,036,854,775,808.
maximumoptionalThe maximum value (inclusive) to be generated. Corresponds to the maximum JSON schema keyword. The default value is 9,223,372,036,854,775,807.
stepoptionalUsed to order the output — must be a non-zero integer.
When positive, the first value will be minimum, and subsequent values will increase by the specified amount.
When negative, the first value will be maximum, and subsequent values will decrease by the specified amount.
Note that if a positive step is specified along with maximum, or a negativestep is specified along with aminimum, the stream may produce an error if a future value exceeds the boundary.
Examples
Unbounded:
{
"type": "integer"
}Bounded:
{
"type": "integer",
"minimum": 0,
"maximum": 100
}Increasing:
{
"type": "integer",
"minimum": 1,
"step": 1
}Potential error:
{
"type": "integer",
"minimum": 1,
"maximum": 10,
"step": 1
}