Add support for asserting against open API schema
After this release, you will be able to register the open API schemas and assert API responses against it. Here's a small example.
const config = {
openApi: {
schemas: [join(__dirname, '..', 'api-spec.json')],
},
}
configure({
plugins: [assert(config)],
})Validate response as follows.
test('get users', ({ assert }) => {
const response = await supertest(baseUrl).get('/users')
assert.isValidateApiResponse(response)
})