Both those fields are checked programmatically using system fields. This means, that when creating a record, it will check that the funder exists, and the award exists.
In the web UI, we filter awards by funder so the data sent would always be consistent. However, in the REST API it is up to the user and the following would be a valid (but it shouldn't) input data:
When the award is created (vocabulary item) it checks the existence of the funder, and it does
When the record is created it checks that funding.funder is valid and that funding.award is valid, but it does not check that they are valid between each other
This would require some customization in the system field to support dependencies between sysfield.
Funders and Awards are contrib vocabularies, thus they have a different data model. Specifically Awards are linked to funders:
In RMD-Records, both are joined in the
funding
attribute. A dummy representation would be:Both those fields are checked programmatically using system fields. This means, that when creating a record, it will check that the funder exists, and the award exists.
In the web UI, we filter awards by funder so the data sent would always be consistent. However, in the REST API it is up to the user and the following would be a valid (but it shouldn't) input data:
Why?
funding.funder
is valid and thatfunding.award
is valid, but it does not check that they are valid between each otherThis would require some customization in the system field to support dependencies between sysfield.
Extra: should use https://github.com/inveniosoftware/invenio-vocabularies/blob/master/invenio_vocabularies/contrib/awards/schema.py#L107 rather than
FundingSchema