Releases: studio-design/openapi-contract-testing
Releases · studio-design/openapi-contract-testing
v0.9.0
v0.8.0
What's New
Features
maxErrorsparameter — Limit the number of validation errors reported byOpenApiResponseValidator(#26)- Laravel integration — Added
max_errorsconfig option and support for string values from environment variables
Bug Fixes
- Handle string
max_errorsvalues from environment variables in Laravel config
Documentation
- Added
maxErrorsparameter documentation to README
v0.7.0
What's Changed
Features
- Content negotiation support —
OpenApiResponseValidator::validate()now accepts an optionalresponseContentTypeparameter. When provided, non-JSON content types (e.g.,text/html,application/xml) are verified for spec presence only, while JSON-compatible types proceed to full schema validation. The Laravel trait passes the responseContent-Typeautomatically. (#23)
Bug Fixes
- Non-JSON content types no longer fail validation — When a spec defines non-JSON content types and no
responseContentTypeis provided, validation now skips body validation and succeeds instead of returning an error. (#21) matchedPathpreserved on failure —OpenApiValidationResult::failure()now includes the matched path, ensuring coverage is still tracked even when body validation fails.
Documentation
- Updated README with content negotiation feature,
responseContentTypeparameter usage examples, and API Reference. (#24)
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
- Support JSON-compatible content types —
application/problem+json,application/vnd.api+jsonなど+jsonstructured syntax suffix (RFC 6838) を持つ Content-Type に対応。マッチングは case-insensitive。 - README 更新 — Features セクションに JSON-compatible content type サポートを明記。
Full Changelog: v0.5.2...v0.6.0
v0.5.2
What's Changed
Bug Fixes
- Check Content-Type before parsing response as JSON (#16)
- Prevent JSON parse errors when API returns non-JSON responses (e.g., HTML error pages)
- Improved error messages and edge case handling
Maintenance
- Add Renovate configuration for automated dependency updates (#17)
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
Documentation
- Update README Laravel integration section for config-based default spec (#14)
- Add
vendor:publishcommand and config file explanation - Simplify basic example (no
openApiSpec()override needed with config) - Add per-class override example for using a different spec
- Add
Full Changelog: v0.5.0...v0.5.1
v0.5.0
What's Changed
New Features
- Config-based default spec for Laravel — Added
OpenApiContractTestingServiceProviderand config file (openapi-contract-testing.default_spec) so the default spec name can be set via Laravel config instead of overridingopenApiSpec()in every test class (#13)
Bug Fixes
- Address PR review feedback for config-based default spec (#13)
Tests
- Add tests for config-based default
openApiSpec()behavior
Full Changelog: v0.4.0...v0.5.0
v0.4.0
Breaking Changes
- Replace
openApiSpecproperty with abstract method — The$openApiSpecproperty on theValidatesOpenApiSchematrait has been replaced with an abstractopenApiSpec(): stringmethod. Update your test classes to define this method instead of setting the property. (#11)
Bug Fixes
- Prevent crash on empty body responses —
assertResponseMatchesOpenApiSchema()no longer crashes when the response body is empty. (#10) - Guard against empty string from
openApiSpec()— Added validation to prevent misconfiguration whenopenApiSpec()returns an empty string. (#11)
Documentation
- Add
--dereferencedflag to Redocly CLI bundle command in README. (#12)
v0.3.0
What's Changed
Breaking Changes
- Package renamed:
wadakatu/openapi-contract-testing→studio-design/openapi-contract-testing - Namespace renamed:
Wadakatu\OpenApiContractTesting→Studio\OpenApiContractTesting
New Features
- Add CI-friendly Markdown output to
OpenApiCoverageExtension(#4)- New
output_fileparameter to write Markdown coverage report to a file - Automatic
GITHUB_STEP_SUMMARYintegration when running in GitHub Actions - New
MarkdownCoverageRendererclass for Markdown report generation
- New
Migration
Update composer.json:
composer remove wadakatu/openapi-contract-testing
composer require --dev studio-design/openapi-contract-testingUpdate namespace references in your code:
-use Wadakatu\OpenApiContractTesting\...;
+use Studio\OpenApiContractTesting\...;Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
New Features
- Add PHP 8.4 and PHPUnit 13 support (#3, #2)
phpunit/phpunitconstraint now accepts^13.0- CI matrix expanded with PHP 8.4 + PHPUnit 11 / 12 / 13 combinations
Bug Fixes
- Remove incompatible PHP 8.2 / PHPUnit 12 combination from CI matrix (#1)
Docs
- Add
CLAUDE.mdfor Claude Code project guidance
Full Changelog: v0.1.0...v0.2.0