added middleware to parse JSON Schema