This feature allows when an API returns errors in the pattern of RFC7807, in which the content-type returned is application/problem+json passes contract validation tests.
The reason for this feature is because it has an API following this pattern and when testing the tests with error, it returns
• Tests\Contract\States\StateContractTest > returns 500 for list states
ErrorException
Unable to map [application/problem+json] to schema type [object].
Failed asserting that true is false.
And when you add the content-type application/problem+json to the ResponseValidator in the body method, the test is accepted.
This feature allows when an API returns errors in the pattern of RFC7807, in which the content-type returned is
application/problem+json
passes contract validation tests.The reason for this feature is because it has an API following this pattern and when testing the tests with error, it returns
And when you add the content-type
application/problem+json
to the ResponseValidator in the body method, the test is accepted.