Skip to content

v0.1.0

Choose a tag to compare

@wadakatu wadakatu released this 19 Feb 03:50
· 666 commits to main since this release

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 ValidatesOpenApiSchema trait for seamless integration with Laravel's TestResponse

Requirements

  • PHP 8.2+
  • PHPUnit 11 or 12

Installation

composer require --dev wadakatu/openapi-contract-testing

See README for setup and usage instructions.