In fast-paced development environments, a seemingly minor modification—such as renaming a parameter, changing a data type, or removing an endpoint in an ASP.NET Core project—can silently break mobile apps, frontend web clients, and third-party integrations.
API Contract Guardian acts as a real-time bodyguard inside Visual Studio. It continuously monitors your API contracts, compares them against previous versions or OpenAPI specifications, and alerts you immediately before changes are committed or deployed to production.
✨ Key Features
🔍 Cross-Version API Diffing: Accurately track all modifications made to your API compared to a previous stable release.
🚫 Deleted Endpoint Detection: Instant alerts when an active Controller route or Action endpoint is removed or altered.
🏷️ Parameter Name Monitoring: Detects any renaming of Route, Query, Header, or Body parameters.
🧬 Data Type Inspection: Catches changes in primitive or complex types (e.g., changing int to string or modifying DTO properties).
🔄 Swagger / OpenAPI Comparison: Full support for comparing local or remote swagger.json and openapi.yaml files against your live codebase.
⚠️ Breaking Change Classification: Intelligently distinguishes between safe, non-breaking additions (like optional fields) and dangerous breaking changes.
📊 Detailed Impact Reports: Generates a clean, structured report inside a dedicated Visual Studio tool window detailing the location, severity, and impact of each change.
👀 Pre-Commit & Pre-Deploy Preview: Review all contract modifications in an intuitive visual diff UI before finalizing your work.
🛡️ Killer Feature: Pre-Publish Protection
Prevents developers from publishing any update that breaks client applications relying on the API.
Whenever you trigger a Publish profile or build in Release mode, the extension automatically runs a comprehensive contract verification check:
🛑 Halt & Warn: If Breaking Changes are detected, the publish pipeline is halted, and a detailed warning dialog is presented.
⚡ Control & Override: Developers can inspect and resolve the breaking changes immediately, or explicitly acknowledge and override the block if the change is intentional for a new major API version.