Implement request validation

Implemented using JSON schema and AJV (https://ajv.js.org).