@comment-labs/schema-validator
v1.0.0-beta.0
Published
CLI for validating JSON, YAML, and TOML files against JSON Schema
Readme
@comment-labs/schema-validator
CLI tool for validating JSON, YAML, and TOML files against JSON Schema.
Installation
pnpm add -D @comment-labs/schema-validatorUsage
Validate files in your project:
npx schema-validator [files-or-folders...]If no paths are provided, the current working directory is used.
Options
--add-recommended- Save recommended schema hints into files that lack one--update-recommended- Replace existing schema hints with current recommendations--reporter <cli|github>- Output style (default: cli, auto-detects GitHub Actions)--github-actions- Shortcut for--reporter github-h, --help- Show help
GitHub Actions
The validator automatically detects GitHub Actions and outputs annotations:
- name: Validate schemas
run: npx schema-validator --github-actionsSupported File Types
- JSON (with JSONC support)
- YAML (.yaml, .yml)
- TOML (.toml)
