Skip to content

GitHub action for comparing and detect breaking changes in OpenAPI specs

License

Notifications You must be signed in to change notification settings

promeris/oasdiff-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oasdiff-action

CI

GitHub actions for comparing OpenAPI specs and detect breaking changes, based on oasdiff tool

How to use?

Depends on your use case:

Generate a diff report

Copy and paste the following snippet into your build .yml file:

- name: Running OpenAPI Spec diff action
  id: test_ete
  uses: oasdiff/oasdiff-action/diff@main
  with:
    base: 'specs/base.yaml'
    revision: 'specs/revision.yaml'
    format: 'text'
    fail-on-diff: false

Check for breaking API changes, and fail if any are found

Copy and paste the following snippet into your build .yml file:

- name: Running OpenAPI Spec diff action
  id: test_ete
  uses: oasdiff/oasdiff-action/check-breaking@main
  with:
    base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml
    revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml
    fail-on-diff: true

Include optional breaking change checks

In order to ensure even stricter breaking policies, oasdiff provides with a few optional checks. Complete list can be found here.

These checks can be added by filling the include-checks argument in the action like the following:

- name: Running OpenAPI Spec diff action
  id: test_ete
  uses: oasdiff/oasdiff-action/check-breaking@main
  with:
    base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml
    revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml
    fail-on-diff: true
    include-checks: "response-non-success-status-removed,api-operation-id-removed"

Generate a changelog

Copy and paste the following snippet into your build .yml file:

- name: Running OpenAPI Spec diff action
  id: test_ete
  uses: oasdiff/oasdiff-action/changelog@main
  with:
    base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml
    revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml

About

GitHub action for comparing and detect breaking changes in OpenAPI specs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 79.9%
  • Dockerfile 20.1%