Compatibility checker for OpenAPI
Go to file
mniip 958a653cfc
Refactor categorizing issues (#111)
* Behaviour -> Behavior (consistency)

* Introduce more issue kinds

* typo

* Add equivalence relations on issues

* Refactor issue segregation in the report
2021-07-23 13:57:36 +03:00
.github/workflows Added styling to HTML output (#84) 2021-06-22 17:15:57 +03:00
app Refined CLI and added options (#114) 2021-07-23 12:49:52 +03:00
awsm-css@ad03dcf22f Added styling to HTML output (#84) 2021-06-22 17:15:57 +03:00
benchmarks Added preliminary report example (#105) 2021-07-15 09:30:01 +03:00
src Refactor categorizing issues (#111) 2021-07-23 13:57:36 +03:00
test Refactor categorizing issues (#111) 2021-07-23 13:57:36 +03:00
.gitignore Added JSON Path jets (#75) 2021-06-08 17:57:13 +03:00
.gitmodules Added styling to HTML output (#84) 2021-06-22 17:15:57 +03:00
.hlint.yaml Added server checking (#42) 2021-05-07 17:54:54 +03:00
CHANGELOG.md rename 2021-02-25 16:25:50 +05:00
fourmolu.yaml Fixed ProdCons value pairs in report (#112) 2021-07-23 12:19:22 +03:00
LICENSE init 2021-02-24 11:44:45 +05:00
openapi-diff.cabal Add disjointness heuristic with the help of partitioning (#107) 2021-07-16 15:39:22 +03:00
README.md Refined CLI and added options (#114) 2021-07-23 12:49:52 +03:00
stack.yaml Splitting (#104) 2021-07-15 18:03:19 +03:00
stack.yaml.lock Splitting (#104) 2021-07-15 18:03:19 +03:00

openapi-diff

Hackage Stackage Lts Stackage Nightly MIT license

Compatibility checker for OpenAPI

Usage: openapi-diff (-c|--client ARG) (-s|--server ARG)
                    [--silent | --only-breaking | --all] [-o|--output ARG]
                    [--folding-block-quotes-style | --header-style]
                    [--signal-exit-code]
  A tool to check compatibility between two OpenApi specifications.

  Usage examples

      Compare files old.yaml with new.yaml and output the resulting report to
      stdout:

          openapi-diff -c old.yaml -s new.yaml

      Only output breaking changes and write a styled HTML report to file
      report.html:

          openapi-diff -c old.yaml -s new.yaml --only-breaking -o report

      Don't output anything, only fail if there are breaking changes:

          openapi-diff -c old.json -s new.json --silent

      Write full report suitable for embedding into a GitHub comment to
      report.html:

          openapi-diff -c old.json -s new.json --folding-block-quotes-style -o report.html

Available options:
  -h,--help                Show this help text
  -c,--client ARG          A path to the file containing the specification that
                           will be used for the client of the API. Can be either
                           a YAML or JSON file.
  -s,--server ARG          A path to the file containing the specification that
                           will be used for the server of the API. Can be either
                           a YAML or JSON file.
  --silent                 Silence all output. Only makes sense in combination
                           with --signal-exit-code.
  --only-breaking          Only report breaking changes in the output.
  --all                    Report both incompatible and compatible changes.
                           Compatible changes will not trigger a failure exit
                           code.
  -o,--output ARG          The file path where the output should be written. If
                           the option is omitted the result will be written to
                           stdout.

                           The file extension is used to determine the type of
                           the output file.

                           Supports many formats such as markdown, html, rtf,
                           doc, txt, rst, and many more.

                           Leave out the extension to produce a self-contained
                           HTML report with styling.
  --folding-block-quotes-style
                           The report tree is structured using summary/detail
                           HTML elements and indented using block quotes. This
                           style renders well on GitHub.Intended for HTML output
                           format. Markdown has rendering bugs on GitHub.
  --header-style           The report tree is structured using increasing levels
                           of headers.
  --signal-exit-code       Signal API compatibility with the exit code.

                           Exit with 0 if there are no breaking changes.
                           Exit with 1 if there are breaking changes.
                           Exit with 2 if could not determine compatibility.