Thomas
03/01/2023, 12:15 PMresponses:
error-400-bad-request:
description: ''
content:
application/vnd.api+json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
properties:
source:
type: object
properties:
parameter:
type: string
pointer:
type: string
code:
type: string
enum:
- BAD_REQUEST
- UNPROCESSABLE_ENTITY
status:
type: string
enum:
- '400'
- '422'
details:
type: string
required:
- code
- status
required:
- errors
examples:
Example 1:
value:
errors:
- source:
parameter: id
detail: is in invalid format
code: BAD_REQUEST
status: '400'
Example:
{
"errors": [
{
"source": {
"parameter": "id"
},
"detail": "is in invalid format",
"code": "BAD_REQUEST",
"status": "400"
}
]
}
The client/consumer used the following mocked response body:
{
errors: [
{
status: "400",
code: "INVALID_QUERY_PARAMETER",
source: {
params: "foobar"
}
}
]
}
It expected the undefined params
instead of parameters
, but pactflow didn't detect an error.Thomas
03/01/2023, 3:07 PMBeth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)