GitHub action for comparing OpenAPI specs, based on oasdiff tool
Copy and paste the following snippet into your build .yml file:
- name: Running OpenAPI Spec diff action
id: test_breaking_changes
uses: Tufin/oasdiff-action@v2
with:
base: 'specs/base.yaml'
revision: 'specs/revision-breaking-changes.yaml'
format: 'text'
breaking-only: true
fail-on-diff: true
Required path of original OpenAPI spec in YAML or JSON format
Required path of revised OpenAPI spec in YAML or JSON format
Optional output format: yaml, text or html (default "yaml")
Optional display breaking changes only
Optional fail with exit code 1 if a difference is found