---
source: crates/jsonschema-cli/tests/cli.rs
expression: "String::from_utf8_lossy(&output.stdout)"
---
Validate JSON instances against a JSON Schema
Usage: jsonschema-cli validate [OPTIONS] [SCHEMA]
Arguments:
[SCHEMA] The JSON Schema to validate with (e.g. schema.json). When omitted, each instance's own `$schema` property names the schema to validate it against
Options:
-i, --instance <FILE>... A path to a JSON instance (e.g. filename.json) to validate. May be specified multiple times or with multiple values after a single flag (e.g. `-i a.json b.json`)
-d, --draft <DRAFT> Enforce a specific JSON Schema draft [possible values: 4, 6, 7, 2019, 2020]
--assert-format Turn ON format validation
--no-assert-format Turn OFF format validation
--vocabulary <URI> Declare support for a vocabulary required by the meta-schema (may be repeated)
--output <OUTPUT> Output style [default: text] [possible values: text, flag, list, hierarchical]
--errors-only Only show validation errors
--connect-timeout <SECONDS> Timeout for establishing connections (in seconds)
--timeout <SECONDS> Total timeout for HTTP requests (in seconds)
-k, --insecure Skip TLS certificate verification (dangerous!)
--cacert <FILE> Path to a custom CA certificate file (PEM format)
--offline Refuse to fetch remote references
-h, --help Print help