License field in Zenodo export violates schema
When converting CITATION.cff containing
license: MIT
to .zenodo.json, the resulting file contains
"license": {
"id": "MIT"
}
According to Zenodo documentation about the file:
-
The human-readable documentation says:
licensestring -
The linked JSON schema specifies:
"license": { "description": "License for embargoed/open access content.", "title": "License", "type": "string", "default": "CC-BY-4.0" }
According to both, it should be
"license": "MIT"
Hi @sim642
It looks like both are valid. If I test with zenodraft from npm (link),
# add access token for sandbox.zenodo.org to environment variables
source ~/tokens/sandbox.zenodo.org
# show version for future reference
zenodraft --version
0.12.0
# create new concept on Zenodo sandbox
zenodraft deposition create concept --sandbox
1092934
# prepare a dummy file to be uploaded
echo "some text" > file.txt
# upload the file
zenodraft file add --sandbox 1092934 file.txt
# I can see the deposition (requires login to Zenodo Sandbox as the deposition is unpublished)
# If I then make .zenodo-string.json and .zenodo-object.json with content:
cat .zenodo-string.json
{
"creators": [
{
"name": "Lastname, Firstname"
}
],
"title": "My deposition",
"license": "MIT"
}
cat .zenodo-object.json
{
"creators": [
{
"name": "Lastname, Firstname"
}
],
"title": "My deposition",
"license": {
"id": "MIT"
}
}
# I can update the metadata successfully with either of those metadata files:
zenodraft metadata update --sandbox 1092934 .zenodo-string.json
zenodraft metadata update --sandbox 1092934 .zenodo-object.json
I suppose that's why it was implemented as an object here, but it might not be wise to depend on some undocumented behavior.
In principle I agree but there is some discussion how (if) the published schemas are used, e.g.
https://github.com/zenodo/zenodo/issues/2294#issue-1148049228
And additionally some people start their metadata from downloading the JSON for an existing record, which shows e.g.:

So, a bit of a conundrum I guess