Repository navigation
5.24.0
This release adds a test client for APIs built with openapi-backend, available from openapi-backend/testing.
Added
createTestClient()inopenapi-backend/testingbuilds requests from your API definition, with one method peroperationId, plusclient.call()andclient.with()for raw requests and request defaults. It can build requests from examples in the definition, with overrides merged in. It can send requests to Express, Koa or Node listeners, Fastify or Hapiinject(), fetch apps, AWS Lambda handlers, running servers or custom adapters. Responses are checked against the definition and throwResponseValidationErroron a mismatch. Operation methods throwRoutingErrorif the request they build is routed to a different operation.res.contextexposes the context openapi-backend built, and security stubs can replace security handler results per request (#1048)OpenAPIValidator.compileSchema()is now public (#1048)
Dependencies
Full changelog: 5.23.0...5.24.0
npm: https://www.npmjs.com/package/openapi-backend/v/5.24.0
The CycloneDX SBOMs, license listings and third-party notices for this release are attached below. To check that the npm package was built from this tag, see Verifying a release.