HUB
Sign inSign up

kjjuno/swagger-compare

By kjjuno

•Updated almost 8 years ago

compare two versions of a swagger document to detect newly deprecated endpoints

Image
0

1.0K

kjjuno/swagger-compare repository overview

⁠swagger-compare

Provides a concise summary of api changes by making use of x-replaced-by⁠ and x-remove-on⁠

PlatformBadges
LicenseGitHub license
Circle CICircleCI
Code CoverageCode Coverage
DocumantationDocumentation Status
NPMnpm version npm downloads
DockerDocker Size Docker Pulls

⁠Installation

⁠npm
npm install -g swagger-compare
⁠Docker
docker pull kjjuno/swagger-compare

⁠Usage

swagger-compare [options] <baseline> <new>
{version}

arguments:
  baseline         path or url to baseline swagger document
  new              path or url to new swagger document

options:
  -f,--format      default: yaml. Must be on of [yaml|json]
  --help           display this help page
  --version        display the version of swagger-compare

Any paths marked as deprecated that show up only in the <new>
document will be included in the report.

⁠Example

swagger-compare https://raw.githubusercontent.com/kjjuno/swagger-compare/master/test/petstore.yaml https://raw.githubusercontent.com/kjjuno/swagger-compare/master/test/petstore-new.yaml
version: 1.0.0
deprecated:
  paths:
    /v1/pet:
      post:
        x-replaced-by:
          path: /v2/pet
          verb: post
        x-remove-on: undefined
      put:
        x-replaced-by: undefined
        x-remove-on: 3/4/2019
    /v2/pet:
      post:
        x-replaced-by:
          path: /v3/pet
          verb: post
        x-remove-on: 2/13/2019

Tag summary

Content type

Image

Digest

Size

31.6 MB

Last updated

almost 8 years ago

docker pull kjjuno/swagger-compare