Open mcollina opened 10 years ago
I've seen this before and find it useful. You specify a schema in your micro service, and it can run validation on the message before reaching the micro service. To make it compatible with graft-http you validate against GET or POST vars.
Yes. I think it should be generic and configurable, so that it's not completely HTTP-specific.
I find json-schema is pretty good for this kind of thing.
I recommend tv4 as the best of the validators i have used.
@mcollina any reason for joi specifically?
I think we might want to provide a validation-as-a-microservice module, based around Joi.
What do you think? I'm placing it here just because it's a place...
It should be kind-of compatible with https://github.com/GraftJS/graft-http/issues/1.