We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi.
openapi-request-validator is fast, because that use Ajv. Ajv compiles schemas into simple fast validation functions. This should be done once, but you create new OpenAPIRequestValidator object upon each request (https://github.com/cdimascio/express-openapi-validator/blob/master/src/middlewares/openapi.request.validator.ts#L65).
openapi-request-validator
Ajv
OpenAPIRequestValidator
You not only lost perfomance, but also made it worse. Cache OpenAPIRequestValidator when it is created.
The text was updated successfully, but these errors were encountered:
will fix this. thanks for the issue!
Sorry, something went wrong.
(fix) #10 performance issue - cache validator and coercer
c858dbc
This is fixed in v1.2.1.
cdimascio
No branches or pull requests
Hi.
openapi-request-validator
is fast, because that useAjv
.Ajv
compiles schemas into simple fast validation functions. This should be done once, but you create newOpenAPIRequestValidator
object upon each request (https://github.com/cdimascio/express-openapi-validator/blob/master/src/middlewares/openapi.request.validator.ts#L65).You not only lost perfomance, but also made it worse. Cache
OpenAPIRequestValidator
when it is created.The text was updated successfully, but these errors were encountered: