You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
### Added
6
6
7
+
-`bundle(schema)` / `async_bundle(schema)` / `ValidationOptions::bundle`: produce a self-contained schema document with external `$ref` targets embedded in a draft-appropriate container (`definitions` for Draft 4/6/7, `$defs` for Draft 2019-09/2020-12) while preserving `$ref` values. [#791](https://github.com/Stranger6667/jsonschema/issues/791).
8
+
-**CLI**: `jsonschema validate` and `jsonschema bundle` subcommands. Flat invocation (`jsonschema schema.json -i …`) is deprecated — use `jsonschema validate` instead. [#791](https://github.com/Stranger6667/jsonschema/issues/791).
7
9
-`ValidationError::absolute_keyword_location()` to get the absolute keyword location URI of the schema node that produced the error. [#737](https://github.com/Stranger6667/jsonschema/issues/737).
tar xzf jsonschema-cli-x86_64-unknown-linux-gnu.tar.gz
37
-
38
-
# Move to a directory in your PATH
39
36
sudo mv jsonschema-cli /usr/local/bin/
40
37
```
41
38
@@ -48,63 +45,103 @@ cargo install jsonschema-cli
48
45
## Usage
49
46
50
47
```
51
-
jsonschema [OPTIONS] <SCHEMA>
48
+
jsonschema <COMMAND>
52
49
```
53
50
54
-
**NOTE**: It only supports valid JSON as input.
51
+
Two subcommands are available: `validate` and `bundle` (inline external refs).
52
+
53
+
> ⚠️ **Deprecation notice:** The flat invocation `jsonschema schema.json -i instance.json` still works but is deprecated. Migrate to `jsonschema validate schema.json -i instance.json`.
54
+
55
+
---
56
+
57
+
## `jsonschema validate` — validate instances
58
+
59
+
```
60
+
jsonschema validate [OPTIONS] <SCHEMA>
61
+
```
55
62
56
63
### Options
57
64
58
-
-`-i, --instance <FILE>`: JSON instance(s) to validate (can be used multiple times)
59
-
-`--output <text|flag|list|hierarchical>`: Select output style (default: `text`). `text` prints the human-friendly summary, while the structured modes emit newline-delimited JSON (`ndjson`) records with `schema`, `instance`, and JSON Schema Output v1 payloads.
60
-
-`-v, --version`: Show version information
61
-
-`--help`: Display help information
65
+
| Flag | Description |
66
+
|---|---|
67
+
|`-i, --instance <FILE>`| Instance(s) to validate (repeatable) |
68
+
|`-d, --draft <DRAFT>`| Enforce a specific draft (`4`, `6`, `7`, `2019`, `2020`) |
0 commit comments