What problem does it solve?
This Skill prevents breaking changes in microservice APIs that can cause production failures in distributed systems by validating that API providers fulfill the contracts expected by their consumers.
Core Features & Use Cases
- Consumer-Driven Contracts (Pact): Guides through defining consumer expectations and verifying provider adherence using the Pact framework.
- Schema Validation: Ensures API responses conform to defined JSON schemas, catching structural inconsistencies early.
- API Versioning Testing: Provides strategies for testing backward compatibility and managing deprecated fields across API versions.
- Use Case: For a
UserWebApp consuming a UserAPI, use Pact to define the expected user data structure. The UserAPI then verifies against this contract in its CI, preventing breaking changes before deployment.
Quick Start
Use the contract-testing skill to define a consumer-driven contract for the 'get user by ID' endpoint of your UserAPI, expecting specific fields and data types.