Validate JSON data with schemas, types, required fields, formats, composition, and API contracts.
Lessons
Restrict a value to a fixed set of options.
Enumerated Values (enum) is easiest to learn by reading the example, changing it, and observing the result.
{
"type": "object",
"properties": {
"level": {
"type": "string",
"enum": ["beginner", "intermediate", "advanced"]
}
}
}Practice the Enumerated Values (enum) example in a small scratch file, then explain what changed and why.