Command-line interface for Ajv, a fast JSON Schema validator. Stable version 5.0.0. Supports JSON, JSON5, and YAML data files. Allows validation, compilation, migration, and testing of JSON schemas across drafts (draft-07, 2019-09, 2020-12) and JSON Type Definition. Configurable error output formats and custom keywords. Integrates with ts-node for TypeScript custom modules. Differentiates via Ajv's speed and multi-format input.
npm install ajv-cliNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs ajv-cli globally, creates a JSON schema and data files, then validates data.
Upgrade to Node.js 14 or later.
Update to --spec=draft7 or later version.
Use quotes: ajv -s schema.json -d "data/*.json"
Include .json extension in globs: -d "data/*.json"
Install ts-node: npm install --global ts-node
Use -c ./my-keywords.js for local files.
Install ts-node: npm install -g ts-node
Wrap data in an object or adjust schema to accept array.
Remove extra properties from data or remove 'additionalProperties' from schema.
Provide correct path to schema file, or check current working directory.