Skip to content

A VSTS build task for Swagger Schema Diff / Comparison

Notifications You must be signed in to change notification settings

knom/vsts-swagger-tasks

Repository files navigation

OpenAPI Contract Diff

Version Visual Studio Marketplace Downloads GitHub License Build Status

A build/release task for comparing OpenAPI Contracts.

Pass in URLs or Paths of OpenAPI (3.0) or Swagger (2.0) Contracts.

The task will compare the two contracts "left-side" and "right-side".

It will output any differences as info, warning, errors depending on the configuration.

You can use the task for making sure a certain Swagger contract still is in compliance with a specification.

If an ERROR occurs, the task will per default STOP the build or release pipeline. Hence it can act as a quality gate for e.g. a release

Note: The task is using the following libraries...

Usage

Configure the schema version of the contract (both have to have the same version)

  • OpenAPI (3.0)
  • Swagger (2.0)

Add left- and right-side contract, which can be

  • a file on the build agent
  • a publicly accessible URL

Usage

Output

Sample output of diff-comparison of two OpenAPI v3 contracts

Result1

Note: Right now OpenAPI DIFF is way less detailed than Swagger one is. This is back to the output of the underlying libraries.

Sample output of diff-comparison of two Swagger v2 contracts

Result2

About

A VSTS build task for Swagger Schema Diff / Comparison

Resources

Stars

Watchers

Forks

Packages

No packages published