inveniosoftware / invenio-rdm-records

DataCite-based data model for InvenioRDM flavour.
https://invenio-rdm-records.readthedocs.io
MIT License
15 stars 87 forks source link

Fix json schema occurrences for creators #86

Closed fenekku closed 3 years ago

fenekku commented 4 years ago

From recent conversations and the Datamodel draft pdf (2020-01-20 Version 0.1), there can be 0 creators. The current schema is:

creators = fields.List(Nested(CreatorSchemaV1), required=True)

which seems to require creators.

... but that translates to only requiring "creators": [] in the API. That is, POST'ing a record json without the "creators" field returns a Validation Error, but should not. Passing "creators": [] is accepted. Passing "creators": [] and not passing it at all should be the same.

tmorrell commented 4 years ago

We're allowing 0 creators? That will break DataCite compatibility and mess up citations.

fenekku commented 4 years ago

This is what I thought originally, but Datacite allows an "Unknown" value to be passed in.

I am sorry the data model is very hard to communicate; there are a lot of layers and phases with a lot of details.

tmorrell commented 4 years ago

Yeah, technically. But I would handle that situation by putting Unknown in the the field (there is still a creator, just one called unknown). There are 10 special codes for unknown information in DataCite. I'd want a user to select why they aren't providing a creator, versus just leaving the field out and have the repository fill in a default.

fenekku commented 4 years ago

That's a good thing to know. I will move your comment to an issue at the deposit page level.

github-actions[bot] commented 3 years ago

This issue was automatically marked as stale.

fenekku commented 3 years ago

Made a new issue for this since code has changed so much since it was made + will bring more attention to it: https://github.com/inveniosoftware/invenio-rdm-records/issues/427