What problem does it solve?
This Skill prevents FastAPI/REST APIs from silently breaking clients by validating that routes, response schemas, status codes, and OpenAPI output remain consistent with expectations.
Core Features & Use Cases
- Pydantic response schema validation: Enforces exact response shapes (including forbidding extra fields) to detect schema drift and unintended field changes.
- OpenAPI snapshot drift detection: Detects unintended additions/removals and method changes by comparing current
/openapi.json against a committed snapshot.
- Contract-style happy/error path coverage: Standardizes verification of correct status codes for auth, missing resources, and invalid credentials, beyond simple 200 OK smoke checks.
- Route existence checks to stop “case 20” regressions: Fails fast when expected method/path routes are not registered after refactors or integration changes.
Quick Start
Copy the template tests into your project, update APP_IMPORT/EXPECTED_ROUTES/ResponseSchema to match your API, then run your contract test suite with pytest.