Skip to content

Commit

Permalink
use deprecated instead of old/new (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reuven Harrison authored May 27, 2023
1 parent 94a44bd commit f997b20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions BREAKING-CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ For more information, see [this guide](CUSTOMIZING-CHECKS.md) and this example o
[Here are some examples of breaking and non-breaking changes that oasdiff supports](BREAKING-CHANGES-EXAMPLES.md).
This document is automatically generated from oasdiff unit tests.

## Old Breaking-Changes Method
The original implementation with the `-breaking-only` flag is still supported but the new method with `check-breaking` will eventually replace it.
## Check-Breaking vs. Breaking-Only
The original breaking-changes implementation with the `-breaking-only` flag is still supported but the new method with `-check-breaking` will eventually replace it.


### Advantages of the New Breaking Changes Method
### Advantages of the Check-Breking Method
- output is human readable
- supports localization for error messages and ignored changes
- checks can be customized by developers
Expand All @@ -101,7 +100,7 @@ The original implementation with the `-breaking-only` flag is still supported bu
- easier to extend and customize
- will continue to be improved

### Limitations of the New Breaking Changes Method
### Limitations of the Check-Breking Method
- no checks for `context` instead of `schema` for request parameters
- no checks for `callback`s

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Copy binaries from [latest release](https://github.com/Tufin/oasdiff/releases/)
-base string
path or URL (or a glob in Composed mode) of original OpenAPI spec in YAML or JSON format
-breaking-only
display breaking changes only (old method)
display breaking changes only (deprecated, use 'check-breaking' instead)
-check-breaking
check for breaking changes (new method)
check for breaking changes
-composed
work in 'composed' mode, compare paths in all specs matching base and revision globs
-deprecation-days int
Expand Down
4 changes: 2 additions & 2 deletions internal/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func parseFlags(args []string, stdout io.Writer) (*InputFlags, *ReturnError) {
flags.BoolVar(&inputFlags.excludeExamples, "exclude-examples", false, "ignore changes to examples (deprecated, use '-exclude-elements examples' instead)")
flags.BoolVar(&inputFlags.excludeDescription, "exclude-description", false, "ignore changes to descriptions (deprecated, use '-exclude-elements description' instead)")
flags.BoolVar(&inputFlags.summary, "summary", false, "display a summary of the changes instead of the full diff")
flags.BoolVar(&inputFlags.breakingOnly, "breaking-only", false, "display breaking changes only (old method)")
flags.BoolVar(&inputFlags.checkBreaking, "check-breaking", false, "check for breaking changes (new method)")
flags.BoolVar(&inputFlags.breakingOnly, "breaking-only", false, "display breaking changes only (deprecated, use 'check-breaking' instead)")
flags.BoolVar(&inputFlags.checkBreaking, "check-breaking", false, "check for breaking changes")
flags.StringVar(&inputFlags.warnIgnoreFile, "warn-ignore", "", "the configuration file for ignoring warnings with '-check-breaking'")
flags.StringVar(&inputFlags.errIgnoreFile, "err-ignore", "", "the configuration file for ignoring errors with '-check-breaking'")
flags.IntVar(&inputFlags.deprecationDays, "deprecation-days", 0, "minimal number of days required between deprecating a resource and removing it without being considered 'breaking'")
Expand Down

0 comments on commit f997b20

Please sign in to comment.