Repository navigation
v0.1.0
Initial Release
Framework-agnostic OpenAPI 3.0/3.1 contract testing for PHPUnit with endpoint coverage tracking.
Features
- Response validation — Validates API response bodies against OpenAPI schemas (JSON Schema Draft 07 via opis/json-schema)
- OpenAPI 3.0 & 3.1 support — Automatic version detection with appropriate schema conversion
- Endpoint coverage tracking — PHPUnit extension that reports which spec endpoints are covered by tests
- Path matching — Handles parameterized paths (
/pets/{petId}) with configurable prefix stripping - Laravel adapter — Optional
ValidatesOpenApiSchematrait for seamless integration with Laravel'sTestResponse
Requirements
- PHP 8.2+
- PHPUnit 11 or 12
Installation
composer require --dev wadakatu/openapi-contract-testingSee README for setup and usage instructions.