JSON Schema Validation/Validate multiple files with Ajv

Validate a whole set of JSON documents.

Section: Schema validation workflows

Validate multiple files with Ajv

bash
bash
npx ajv-cli validate -s schema.json -d 'fixtures/*.json'
Explanation

Useful in CI or fixture validation pipelines.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Schema validation workflows
Validate with Ajv CLI
Validate a JSON file against a schema file.
OpenIn sheetbashsame section
Basic object schema
Require a string name and boolean active flag.
OpenIn sheetjson2 tag match
Enum restriction
Restrict a value to a known set of strings.
OpenIn sheetjson2 tag match
Array item validation
Validate every item in an array.
OpenIn sheetjson2 tag match