alertlogic/jesse — pull request #2 by alatnikov (2013-05-28 11:50:35+00:00)
Title: New feature: Format error messages uniformly

Every error message now contains a piece of JSON instance and a corresponding schema term with the brief description of an error in form of tuple or single atom.

```erlang
{ 'schema_invalid', Schema :: json_term(), error() } |
{ 'data_invalid', Schema :: json_term(), error(), Data :: json_term() }
-type error() = { 'missing_id_field', Field :: binary() }
| { 'missing_required_property', Name :: binary() }
| { 'missing_dependency', Name :: binary() }
| { 'no_match', Pattern :: binary() }
| 'no_extra_properties_allowed'
| 'no_extra_items_allowed'
| 'not_allowed'
| { 'not_unique', Value :: json_term() }
| 'not_in_range'
| 'not_divisible'
| 'wrong_type'
| { 'wrong_type_items', Items :: json_term() }
| { 'wrong_type_dependency', Dependency :: json_term() }
| 'wrong_size'
| 'wrong_length'
| 'wrong_format'
```