| Crates.io | scheval |
| lib.rs | scheval |
| version | 0.1.2 |
| created_at | 2024-12-23 15:12:15.807815+00 |
| updated_at | 2025-01-03 04:35:14.593932+00 |
| description | A fast and *smart* command-line tool for JSON Schema validation, powered by the `jsonschema` crate. |
| homepage | |
| repository | https://github.com/PRO-2684/scheval |
| max_upload_size | |
| id | 1493138 |
| size | 67,402 |
A fast and smart command-line tool for JSON Schema validation, powered by the jsonschema crate. Currently still in development.
If you have cargo-binstall, you can install this tool by running:
$ cargo binstall scheval
Otherwise, you can install it from source:
$ cargo install scheval
vscode: Respect json.schemas field at .vscode/settings.json if presentsuffix: Validate <filename>.json with <filename>.schema.json under working directoryTBD
scheval can be run without any arguments. It will automatically use all available features.
$ scheval
Alternatively, you can specify a list of smart including features to use:
$ scheval --include vscode # Uses only `vscode`
$ scheval --include suffix # Uses only `suffix`
$ scheval --include vscode --include suffix # Uses both `vscode` and `suffix`
$ # Shorthands provided by `clap`
$ scheval -i vscode -i suffix
$ scheval -ivscode -isuffix
$ scheval --help
A fast and *smart* command-line tool for JSON Schema validation, powered by the `jsonschema` crate.
Usage: scheval [OPTIONS]
Options:
-i, --include <INCLUDE>
What smart including features to use. Available: `vscode`, `suffix`. Default to all
- `vscode`: Respect `json.schemas` field at `.vscode/settings.json` if present
- `suffix`: Validate `<filename>.json` with `<filename>.schema.json` under working directory
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
This project uses globwalk for pattern matching, which might be buggy. Notably in fileMatch field:
./ is not supported (I've included a quick fix by removing the prefix, but have not considered other cases, like ././ or !./)../ is not supported (A warning will be shown, and the pattern will be ignored)If you have a good alternative which supports VSCode's fileMatch syntax, please let me know.
Possible alternatives:
vscode auto detection
fileMatch
url
schema (Inline schema)main.rs--verbose for increased verbositycargo-binstall)