Closed mkurapov closed 3 months ago
Latest commit: a6151c543d8237e5fc3a7acb41f36981367efdf5
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Name | Link |
---|---|
Latest commit | a6151c543d8237e5fc3a7acb41f36981367efdf5 |
Latest deploy log | https://app.netlify.com/sites/openpayments-preview/deploys/6601f043dc0d39000891f5a9 |
Changes proposed in this pull request
Changes to the
createValidatorMiddleware
behaviour inpackages/openapi
:OpenAPIValidatorMiddlewareError
instead of directly using Koa'sctx.throw
function. This error class hasmessage
andstatus
properties that describe the exact validation error as well as the status code that should be thrown.validationOptions
argument that determines whether to validate just the request, the response or both. By default, both are validated, and the middleware no longer usesprocess.env.NODE_ENV
to determine whether to validate the response or not.Context
Fixes #445