added model validations, conversion of params to request body (untested), and conversion of errors to json fromat