Skip to main content
Any Framework

OpenApi Specification v3 comparator. Command line tool able to detect API differences between 2 versions of a specification in version 3.

Published
Jan 9, 2023
3y ago
Total Downloads
30.3K
30,291

Install

dotnet add package Criteo.OpenApi.Comparator.Cli --version 0.7.0

No framework information available.

README

Open API Comparator

An OpenAPI tool to compare OpenAPI Specifications.

C# Library

The tool is available as a nuget package, directly usable into your C# application.

To install it run the command:

dotnet add package Criteo.OpenApi.Comparator

Here is an example of how to use the Comparator:

var differences = OpenApiComparator.Compare(
    oldOpenApiSpec,
    newOpenApiSpec
);

Command line tool

The comparator is also available as a command line tool.

To install it, run the command:

dotnet tool install -g Criteo.OpenApi.Comparator.Cli

You can then use the tool through the openapi-compare command:

openapi-compare -o new_oas.json -n old_oas.json -f Json

Available options:

Option Small Required Description
--old -o true Path to old OpenAPI Specification
--new -n true Path to new OpenAPI Specification
--outputFormat -f false Specifies in which format the differences should be displayed (default Json). Possible values: Json | Text.
--help -h false Log available options

Comparison rules

Each comparison rule is documented in the documentation section.

Contributing

Any contribution is more than welcomed. For now, no specific rule must be applied to contribute, just create an Issue or a Pull Request and we'll try to handle it ASAP.

License

OpenApi Comparator is an Open Source software released under the Apache 2.0 license.

Changes from Previous Version

No structural changes between v0.6.0 and v0.7.0.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.