oasdiff

command module
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

codecov CircleCI Go Report Card GoDoc

OpenAPI Spec Diff

A diff tool for OpenAPI Spec 3 written in Go.

Unique features vs. other OAS3 diff tools

  • go module
  • deep diff into paths, parameters, responses, schemas, enums etc.

Build

git clone https://github.com/Tufin/oasdiff.git
cd oasdiff
go build

Running from the command-line

./oasdiff -base data/openapi-test1.yaml -revision data/openapi-test2.yaml

Help

./oasdiff --help

Embedding into your Go program

diff.Get(&diff.Config{}, spec1, spec2)

See full example: main.go

Notes

  1. oasdiff expects OpenAPI References to be resolved.
    You can resolve refs using this function from the openapi3 package.

  2. oasdiff ignores changes to Examples and Extensions by default. You can change this behavior through configuration.

Work in progress

While most objects of OpenAPI Spec are already supported by this diff tool, some are still missing, notably: Examples, ExternalDocs, Security, Links, Variables and a couple more.
Pull requests are welcome!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package diff provides a diff function for OpenAPI Spec 3.
Package diff provides a diff function for OpenAPI Spec 3.
Package load provides a function to load an OpenAPI spec from a URL or a Path
Package load provides a function to load an OpenAPI spec from a URL or a Path

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL