Skip to main content

Detect breaking changes in OpenAPI specs before they reach production

Project description

ApiGuard — OpenAPI Breaking Change Detector

Detect breaking changes in your API specs before they reach production.

ApiGuard compares two OpenAPI 3.x specifications and identifies every breaking change, non-breaking change, and deprecation — with severity levels, rule IDs, and CI-ready output.

pip install kryptorious-apiguard

Quick Start

# Compare two specs
apiguard diff openapi-v1.yaml openapi-v2.yaml

# JSON output for CI pipelines
apiguard diff old.yaml new.yaml --format json

# Fail CI on any breaking change
apiguard diff old.yaml new.yaml --fail-on warning

What It Detects

Severity Category Examples
🔴 CRITICAL Removed endpoint, removed response status, removed required path param
🟠 HIGH Changed parameter type, added required param, removed required property
🟡 MEDIUM Removed enum value, changed response property type
⚠️ WARNING Deprecated endpoint, deprecated parameter
ℹ️ INFO Added endpoint, added optional param, added response field

30+ detection rules covering paths, parameters, responses, request bodies, and deprecations.

Output Formats

apiguard diff v1.yaml v2.yaml                    # Rich terminal table (default)
apiguard diff v1.yaml v2.yaml --format json      # Machine-readable JSON
apiguard diff v1.yaml v2.yaml --format markdown  # Markdown report
apiguard diff v1.yaml v2.yaml --format sarif     # SARIF (Premium)

CI/CD Integration

# .github/workflows/api-check.yml
name: API Breaking Change Check
on: [pull_request]
jobs:
  api-guard:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install kryptorious-apiguard
      - run: apiguard diff main-openapi.yaml pr-openapi.yaml --format json --fail-on error

Comparison

Feature ApiGuard openapi-diff Spectral
Native Python ❌ (Java) ✅ (JS)
Breaking change detection ✅ Full ❌ (linting only)
Severity levels ✅ 6 levels ✅ 3 levels
SARIF output ✅ Premium
$ref resolution ✅ Local ✅ Full
CI exit codes
Install size ~2MB ~50MB+ ~10MB

Premium

Upgrade to Premium ($9 lifetime) for:

  • SARIF output — GitHub Advanced Security integration
  • CI annotations — Inline PR comments on breaking changes
  • Custom rules — Define your own breaking change policies
  • Team dashboards — Track API stability over time
  • Priority support

Get Premium — $9 Lifetime

Requirements

  • Python 3.9+
  • Handles OpenAPI 3.0 and 3.1 specs
  • Supports JSON and YAML input

License

MIT — free for personal and commercial use. Premium features require a license.

Built by Kryptorious Quantum Biosciences.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kryptorious_apiguard-1.0.0-py3-none-any.whl (52.7 kB view details)

Uploaded Python 3

File details

Details for the file kryptorious_apiguard-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kryptorious_apiguard-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 796f98d6ac35e75e36699a300c35ad7b12d3b0e4dc2fedafa882b359cf33efd2
MD5 5c30a8fc5dbd8b029dcfda2fe6066d85
BLAKE2b-256 8e9e260a8f1d4881c0f9cb2069bfcc5876c8dc2da0a5b6f414c8d24bb49f724d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page