Skip to content

5.24.0

Choose a tag to compare

@github-actions github-actions released this 09 Nov 16:24
· 19 commits to main since this release

This release adds a test client for APIs built with openapi-backend, available from openapi-backend/testing.

Added

  • createTestClient() in openapi-backend/testing builds requests from your API definition, with one method per operationId, plus client.call() and client.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 Hapi inject(), fetch apps, AWS Lambda handlers, running servers or custom adapters. Responses are checked against the definition and throw ResponseValidationError on a mismatch. Operation methods throw RoutingError if the request they build is routed to a different operation. res.context exposes 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.