Skip to content

Commit adec687

Browse files
authored
doc: Make the purpose more clear in README (#12)
1 parent 908e6ab commit adec687

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,26 @@ This crate is used with draft-07 but even that is work in progress.
1313
## Usage via CLI
1414

1515
```bash
16+
cat schema-old.json schema-new.json
17+
# {"type": "string"}
18+
# {"type": "boolean"}
19+
1620
cargo run --features=build-binary -- \
1721
schema-old.json \
1822
schema-new.json
23+
# {"path":"","change":{"TypeRemove":{"removed":"string"}},"is_breaking":true}
24+
# {"path":"","change":{"TypeAdd":{"added":"boolean"}},"is_breaking":false}
1925
```
2026

27+
Sentry uses this tool in
28+
[`sentry-kafka-schemas`](https://github.com/getsentry/sentry-kafka-schemas) to
29+
annotate pull requests with breaking changes made to schema definitions. It
30+
invokes the CLI tool on the schema from master vs the schema in the PR, and
31+
post-processes the output using a Python script for human consumption.
32+
33+
`is_breaking` is just a suggestion. You may choose to ignore it entirely and
34+
instead define which kinds of changes are breaking to you in wrapper scripts.
35+
2136
## Usage as library
2237

2338
```rust

0 commit comments

Comments
 (0)