Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Make the purpose more clear in README #12

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,26 @@ This crate is used with draft-07 but even that is work in progress.
## Usage via CLI

```bash
cat schema-old.json schema-new.json
# {"type": "string"}
# {"type": "boolean"}

cargo run --features=build-binary -- \
schema-old.json \
schema-new.json
# {"path":"","change":{"TypeRemove":{"removed":"string"}},"is_breaking":true}
# {"path":"","change":{"TypeAdd":{"added":"boolean"}},"is_breaking":false}
```

Sentry uses this tool in
[`sentry-kafka-schemas`](https://github.com/getsentry/sentry-kafka-schemas) to
annotate pull requests with breaking changes made to schema definitions. It
invokes the CLI tool on the schema from master vs the schema in the PR, and
post-processes the output using a Python script for human consumption.

`is_breaking` is just a suggestion. You may choose to ignore it entirely and
instead define which kinds of changes are breaking to you in wrapper scripts.

## Usage as library

```rust
Expand Down