Releases: Maks3w/SwaggerAssertions
Decouple SchemaManager from JsonSchema classes
Backward Incompatibility breaks
This release introduces an importan Backward Compatibility break.
$sm = SchemaManager::__construct(string $definitionUri)
has changed to $sm = SchemaManager::__construct(object $definition)
Previous behavior is available as $sm = SchemaManager::fromUri(string $definitionUri)
Other changes
- Provide workaround for json-schema v2.0.3
- Fix scenarios where the response does not have schema (HTTP 204, 304 codes)
Refactor for json-schema v2
This release raise the json-schema dependency to v2.
Request assertions
Request assertions
This release add assertions to request body, headers and media type.
Important note: malformed requests are considered valid if response status code represent a HTTP Client error (400 - 499)
List of changes:
- Add: [#8] assertions for request body, request media type (if body is not empty) and request headers
- [BC\Break]: [#8] Modify
assertResponseAndRequestMatch
for automatically use the new assertions.
If you prefer the previous behavior you should useassertResponseMatch
- Add: [#7] Trait for Symfony HTTP Foundation header and response. Thx @jessedc
- [BC\Break]: Decouple PHPUnit constraints from SchemaManager for better reusability (0901c2a)
- Add: Compatibility with PHPUnit v5
- [BC\Break]: Raise PHP minimum version to 5.5
- Add: Different improvements for make the release more narrow and more stable.
Allow PHPUnit v5 and future Zend\Http v3
v0.3.1 Allow PHPUnit v5 and future Zend\Http v3
Compare headers in a case insensitive way
- #5 Compare headers in a case insensitive way
Fix broken dependency
justinrainbow/json-schema: 1.5.0 break current implementation
Add trait for PSR-7 Interfaces
There is now a Psr7AssertsTrait for assert PSR-7 Responses like the current GuzzleAssertsTrait.
- Psr7AssertsTrait compatible with Guzzle v6
- GuzzleAssertsTrait compatible with Guzzle v5
Internal code changes
This release does not fix any issue neither add any feature.
Just remove some workarounds for external libraries issues.
Change uri-template dependencie
Following the issue fixed on v0.1.1 the upstream library already backport the fixes and there is no need to use the custom fork.
Fix issues with RFC3986 reserved characters
Underlying library wasn't handle RFC3986 URIs correctly. Changed to a custom fork with the proper fixes applied.