krakenjs / swaggerize-routes

Swagger document driven route builder.
Other
58 stars 57 forks source link

is-my-json-valid as json schema validator #30

Closed vh closed 4 years ago

vh commented 9 years ago

It seems is-my-json-valid can be good alternative to enjoi. It is superfast in comparison with the others validators (https://github.com/Muscula/json-schema-benchmark). What do you think about this?

vh commented 9 years ago

Just added benchmark https://github.com/tlivings/enjoi/pull/4

tlivings commented 9 years ago

Have you seen the results for themis?

tlivings commented 9 years ago

It's not just raw performance I was going for with enjoi, but rather hapi compatibility.

That being said, I'll likely switch out non hapi code to use more traditional json-schema validation unless I knock out 100% compatibility soon.

tlivings commented 9 years ago

Although looking at it - it seems quite fast.

vh commented 9 years ago

Ahh, ok. You mean that it is needed to implement some missing enjoi keywords support to be able to switch out?

tlivings commented 9 years ago

No, enjoi is missing json-schema keywords - it doesn't yet do a perfect conversion from json-schena to Joi.

But the reason I wrote enjoi was to provide not only fast (at the time I had used tv4 which felt slow) validation, but schemas that were compatible with Hapi (which uses Joi for validation).

tlivings commented 9 years ago

For this to be more acceptable, I will need to consider writing custom validator function from swaggerize-hapi instead of using joi schemas. That might be fine, but I'll need to play with it some first.