JSON Validation

Hi.
How can I validate json schema of requests on server side in before hooks?

@salamdev can you show with code (or pseudo code) what you want to achieve with the JSON validation?

Something like this js library: https://github.com/hapijs/joi
or this lua library: https://github.com/bungle/lua-resty-validation

I don’t think using lua-resty-validation would be a problem. Have you tried to import it and had problems? Do you have an error message you can share?