Skip to content

Lib, CLI and GitHub Action to compare two OpenAPI Specification files v3

License

Notifications You must be signed in to change notification settings

LimeFlight/openapi-diff

Repository files navigation

Contributors Forks Stargazers Issues MIT License

OpenAPI-Diff

Compares two OpenAPI documents!
Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

In order to identify any breaking API change of our B2B SaaS solution we created this project to outline the changes in the OpenAPI document. We are using this together with GitHub Actions (https://github.com/LimeFlight/openapi-diff-action) to highlight changes in every Pull Request.

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Coming soon.

Installation

Coming soon.

Usage

Coming soon.

CLI

Install globally:

dotnet tool install --global LimeFlight.OpenAPI.Diff.CLI --version 3.0.9

Invoke:

openapi-diff --help
Options:
  -o|--old <OLD_PATH>       Path to old OpenAPI Specification file
  -n|--new <NEW_PATH>       Path to new OpenAPI Specification file
  -e|--exit <EXIT_TYPE>     Define exit behavior. Default: Fail only if API changes broke backward compatibility
                            Allowed values are: PrintState, FailOnChanged.
  -m|--markdown <MARKDOWN>  Export diff as markdown in given file
  -c|--console              Export diff in console
  -h|--html <HTML>          Export diff as html in given file
  -?|--help                 Show help information.

Example:

directory="test/LimeFlight.OpenApi.Diff.Test/Resources";
openapi-diff -o $directory/petstore_v2_1.yaml -n $directory/security_diff_1.yaml -m difflog.md

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

LimeFlight - [email protected]

Project Link: https://github.com/LimeFlight/openapi-diff

Acknowledgements