Added simple Chai support for asserting that HTTP responses satisfy an OpenAPI spec. Specifically, added the expect(res).to.have.status(200).and.satisfyApiSpec
assertion.
Features
- Validates the status and body of HTTP responses against an OpenAPI spec
- Easily load your OpenAPI spec just once in your tests
- Supports OpenAPI 2 and 3
- Supports OpenAPI specs in YAML and JSON formats
- Supports
$ref
in response schemas (i.e.$ref: '#/definitions/ComponentType/ComponentName'
) - Informs you if your OpenAPI spec is invalid