Skip to content

CICD-330 · API backward compatibility ​

Encyclopedia · Advanced networking and API testing · All snippets

Previous · CICD-329 · Next · CICD-331

1. Where it fits ​

  • Placement CI run step.
  • Prerequisites authorized test service, known endpoint or local fixture and the named test CLI.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
git show origin/main:openapi.yaml > previous.yaml
oasdiff breaking previous.yaml openapi.yaml --fail-on ERR

3. How it works ​

The tool compares the old and new OpenAPI contracts and fails on changes that match the selected breaking-change policy.

4. Verify the result ​

Fetch main first. Verify a known breaking fixture is rejected by the chosen rule set.

Validation syntax-validated (Bash parse). Status definitions.