Middleware that validates a request's route params, query and/or body
against JSON Schemas (AJV, with ajv-formats and ajv-errors). On failure it
answers status (400) with the errors by field; on success the handler reads
the data from c.get("validated"). A JSON Schema does not carry a
TypeScript type, so give the validated shapes as type parameters:
Middleware that validates a request's route params, query and/or body against JSON Schemas (AJV, with ajv-formats and ajv-errors). On failure it answers
status(400) with the errors by field; on success the handler reads the data fromc.get("validated"). A JSON Schema does not carry a TypeScript type, so give the validated shapes as type parameters: