Mandatory `given-names` field missing in Person object but still passes cffconvert's validation check
The documentation on the CFF format mentions that family-names and given-names are mandatory for a Person object.
Link to docs: https://citation-file-format.github.io/assets/pdf/cff-specifications-1.0.3.pdf
However, it passes the validation check from cffconvert --validate.
Expected behaviour: It fails the validation check due to a mandatory field missing
Hi @timothy22000, and welcome to the project. The errors you get are dependent on which version of the Citation File Format is being used (CITATION.cff record this as key cff-version).
The screenshot you attached seems to be of version 1.0.3, for which the following is valid:
cff-version: 1.0.3
authors:
- given-names: Given Name
family-names: Family Names
title: my title
message: my message
date-released: 2002-01-01
version: '0.1'
Later versions of the Citation File Format are a bit more forgiving, for example, under the current version 1.2.0 the following is valid:
cff-version: 1.2.0
title: my title
message: my message
type: software
authors:
- given-names: Given Names
family-names: Family Names
In fact, even
cff-version: 1.2.0
title: x
message: y
type: software
authors:
- {}
would be valid under 1.2.0 (but maybe not a good idea).
The current version of cffconvert (2.0.0) prints what version the CITATION.cff is validated against, for example I'm getting
$ cffconvert --validate
Citation metadata are valid according to schema version 1.0.3.
and
$ cffconvert --validate
Citation metadata are valid according to schema version 1.2.0.
and
$ cffconvert --validate
Citation metadata are valid according to schema version 1.2.0.
respectively for the snippets above.
So I guess what's happening with:
However, it passes the validation check from
cffconvert --validate.
is that you are using a CITATION.cff file whose cff-version is set to 1.2.0
Not sure if this is still relevant for what you;re trying to accomplish, but from the question raised here https://github.com/alan-turing-institute/the-turing-way/pull/2424#issuecomment-1143496513, know that you can use not only Person authors but also Entity authors, for example when you want to include a whole team, or the project, or something like that. For Entity authors, only name is a required field, e.g.:
cff-version: 1.2.0
title: x
message: y
type: software
authors:
- name: The Team
You can mix and match as needed:
cff-version: 1.2.0
title: x
message: y
type: software
authors:
- given-names: First
family-names: Author
- name: Everybody else
Finally, the current 1.2.0 schema is documented in the schema-guide: https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md
Hope this clears things up!