You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The link you reference has questionable benchmarks. When I ran my own benchmarks, which you can run by calling npm run bench in swagaerize-builder, joi validation is actually much faster. I suspect the benchmark run in that link was done without pre-building the joi schema, which I do.
In addition, I found I had better validation results with enjoi, since I resolved $ref up front.
Finally, since I also wrote a swaggerize-hapi module, hapi handles the input validation automatically if you provide it a joi schema, which was a really nice fit.
Rather than
tv4
, useenjoi
for input validation.Likely API schema validation will need to remain the same due to the broken Swagger 2.0 schema.
The text was updated successfully, but these errors were encountered: