Validate JSON data with schemas, types, required fields, formats, composition, and API contracts.
Lessons
Require whole numbers with the integer type.
Integers is easiest to learn by reading the example, changing it, and observing the result.
{
"type": "object",
"properties": {
"age": { "type": "integer", "minimum": 0, "maximum": 120 },
"page": { "type": "integer", "minimum": 1 }
}
}Practice the Integers example in a small scratch file, then explain what changed and why.