Validate JSON data with schemas, types, required fields, formats, composition, and API contracts.
Lessons
Check files against a schema from the terminal.
Validating from the CLI is easiest to learn by reading the example, changing it, and observing the result.
# Validate a data file against a schema from the terminal
# npm install -g ajv-cli
ajv validate -s schema.json -d data.json
# Validate many files
ajv validate -s schema.json -d "data/*.json" --all-errorsPractice the Validating from the CLI example in a small scratch file, then explain what changed and why.