inveniosoftware / invenio-records-rest

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

loaders: add nested parents fields to errors #282

Closed equadon closed 4 years ago

equadon commented 5 years ago

If there are nested fields and there is an error in one of the nested subfields, the field returned in the error is just the name of the leaf field.

What this does is store the parents of a nested field so if you had a nested schema like this:

document -> author -> name.Str() the field returned in the error would just be name, losing the information about its parents. This PR would also add parents=['document', 'author']

slint commented 4 years ago

Also, guilty as charged, we already did something similar in Zenodo :see_no_evil:

ntarocco commented 4 years ago

@equadon let's discuss it quickly next week to align on the changes

slint commented 4 years ago

@ntarocco Do you need a release as well on this one?