inveniosoftware / invenio-records-rest

Invenio records REST API module.
https://invenio-records-rest.readthedocs.io
MIT License
4 stars 62 forks source link

errors: adds jsonschema validation class with error message #139

Closed ioannistsanaktsidis closed 7 years ago

ioannistsanaktsidis commented 7 years ago

Signed-off-by: Ioannis Tsanaktsidis ioannis.tsanaktsidis@cern.ch

lnielsen commented 7 years ago

Looks good, but can you add a small test.

I think you can add the test in test_views_list_post.py. To trigger a schema validation error I think you can simply dump a simple schema directly in $schema instead of having to reference a URL.


record = {
    'title': 1,
    '$schema': {
        'properties': {
            'title': {'type': 'string'}
        }
    }
}
lnielsen commented 7 years ago

Regarding build errors see inveniosoftware/troubleshooting#9