What problem does it solve?
Prevents integration regressions and API mismatches by validating request and response contracts so frontend, backend, and third-party services remain compatible and predictable.
Core Features & Use Cases
- Runtime schema validation: Validate incoming requests and outgoing responses at API boundaries using Zod or OpenAPI validators to surface clear validation errors.
- Consumer-driven contract testing: Author Pact consumer tests and verify provider implementations to ensure agreed expectations between clients and services.
- OpenAPI and GraphQL validation: Generate types from OpenAPI, validate responses against the spec, and test GraphQL schema contracts to avoid spec drift.
- Schema evolution & compatibility: Test backward compatibility, enforce versioning for breaking changes, and add optional fields safely to prevent deploy-time failures.
- Use Case: Ensure a frontend POST /api/users integration remains stable by sharing Zod types, running consumer Pact tests, and verifying the provider against generated pacts before deployment.
Quick Start
Validate the POST /api/users contract by asserting request and response schemas with shared Zod types and running a Pact consumer test against the backend provider.