use Classes not functions in the schemas, for improved validation failure messages