Eugene Malihins
01/31/2023, 3:46 PMswagger-mock-validator
output? What confuses me is comparison of mock response body to value: [ [Object], [Object] ]
. It's not clear what is incompatible. I've omitted a bunch of fields in the mock for brevity.
1 error(s)
response.body.incompatible: 1
0 warning(s)
{
warnings: [],
errors: [
{
code: 'response.body.incompatible',
message: 'Response body is incompatible with the response body schema in the spec file: should match exactly one schema in oneOf',
mockDetails: {
interactionDescription: '6cee5dad-fe47-4ab7-9384-d53d5260427a',
interactionState: '[none]',
location: '[root].interactions[27].response.body',
mockFile: './msw_generated_pacts/dashboard-web-api-1675179158185.json',
value: {
createdAt: '2022-10-30T00:00:00Z',
"...": "...",
status: 'DRAFT',
}
},
source: 'spec-mock-validation',
specDetails: {
location: '[root].paths./api/invoices/{id}/payment-status.put.responses.200.content.application/json.schema.oneOf',
pathMethod: 'put',
pathName: '/api/invoices/{id}/payment-status',
specFile: 'dereferencedSchema.json',
value: [ [Object], [Object] ]
},
type: 'error'
}
]
}
Candy Goodison
01/31/2023, 10:36 PMCandy Goodison
01/31/2023, 10:37 PMEugene Malihins
02/01/2023, 9:01 AMEugene Malihins
02/01/2023, 10:33 AMCandy Goodison
02/01/2023, 10:31 PM