Add JSON-schema validation and basic validation middleware