JSON Schema required Keyword

The required keyword lists keys that must exist.

Syntax

{"type": "object", "required": ["name", "age"]}

Explanation

Validation fails when a required key is missing from the object.