
Api Contract Testing
Contract testing guide for consumer-driven Pact tests, OpenAPI and JSON Schema validation, and breaking-change prevention.
- skills.sh installs
- 933
- GitHub stars
- 387
- last updated
- Aug 21, 2026
What it does
- Covers consumer-driven contract testing between services, validating request and response formats, types, and error behavior without full integration tests
- Includes reference guides for Pact, OpenAPI and JSON Schema validation, REST Assured for Java, Postman contract tests, and Pact Broker sharing
- Provides a TypeScript Pact example with matchers such as
like,eachLike, andiso8601DateTimeWithMillisfor flexible structural checks - Designed for microservice teams that need to catch breaking API changes and contract violations in CI
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill api-contract-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
API Contract Testing
Table of Contents
Overview
Contract testing verifies that APIs honor their contracts between consumers and providers. It ensures that service changes don't break dependent consumers without requiring full integration tests. Contract tests validate request/response formats, data types, and API behavior independently.
When to Use
- Testing microservices communication
- Preventing breaking API changes
- Validating API versioning
- Testing consumer-provider contracts
- Ensuring backward compatibility
- Validating OpenAPI/Swagger specifications
- Testing third-party API integrations
- Catching contract violations in CI
Quick Start
Minimal working example:
// tests/pact/user-service.pact.test.ts
import { PactV3, MatchersV3 } from "@pact-foundation/pact";
import { UserService } from "../../src/services/UserService";
const { like, eachLike, iso8601DateTimeWithMillis } = MatchersV3;
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- Testing & QA, Backend & APIs
- First seen
- May 16, 2026
More from aj-geddes/useful-ai-prompts
All 258- Root Cause Analysis933
- Event Sourcing893
- Mobile First Design877
- Api Security Hardening872
- Mobile App Testing833
- Technical Specification815
- User Story Writing797
- Access Control Rbac769
- User Guide Creation764
- Kubernetes Deployment763
- Logging Best Practices744
- Visual Regression Testing741
- Flutter Development727
- E2e Testing Automation698
- Business Case Development687
- React Component Architecture686
- Docker Containerization683
- Agile Sprint Planning679
- Log Analysis678
- Security Compliance Audit676
- Project Estimation674
- Gitlab Cicd Pipeline673
- Websocket Implementation669
- Requirements Gathering666
Similar to Api Contract Testing
More Testing & QA
api-testing-patternsSkillproffesor-for-testing/agentic-qe615 installsComprehensive API test patterns covering contract, component, and integration levels with agent-assisted validation.
contract-testing-builderSkillpatricio0312rev/skills266 installsConsumer-driven contract testing with Pact and OpenAPI validation to catch breaking API changes early.
integration-testingSkillaj-geddes/useful-ai-prompts562 installsDesign integration tests that verify real API, database, and service interactions without mocking the data layer.
api-contract-reviewSkilldecebals/claude-code-java328 installsReview REST API contracts for HTTP semantics, versioning, compatibility, and response consistency before release.
k11 API Contract QAMCP serverk11-software-solutionsBreaking-change detection across REST, GraphQL, gRPC, AsyncAPI, and SOAP contracts, with consumer impact.