-
Notifications
You must be signed in to change notification settings - Fork 4
Description
In the metadata article, the DCMI terms are referenced in multiple places and the user is pointed to the dc schema.json file. When we get to specifying relations between deposits, the user is pointed to the zenodo schema which lumps all the dcmi terms into "related_identifiers".
From following the metadata article, I thought that each relationship type (hasPart, isPartOf, etc) would be listed in the metadata as a separate attribute but it seems like for a zenodo deposit, a user must chose one valid dcmi relationship type and put all related items into that slot.
Expected this to work:
creators = list(list(name = "P.S. Reynolds"))
dcmi_date_time <- function(x){
sprintf("%sT00:00:00",x)
}
time_created <- lubridate::today() |> dcmi_date_time()
isPartOf = list(
list (
identifier = "10.5281/zenodo.15426216",
relation = "isDerivedFrom",
resource_type = "software"
),
list (
identifier = "110.1128/mbio.02985-21",
relation = "isDescribedBy",
resource_type = "publication"
),
)
requires = list(
list(
identifier = "ark:/13960/t0mt2n370",
relation = "cites"
)
)
metadata <- list(
title = "My Title",
description = "Cool description",
creator = creators,
isPartOf = isPartOf,
created = time_created,
requires = requires
)
cli <- depositsClient$new(service = "zenodo",sandbox = TRUE ,metadata = metadata)
error:
instancePath schemaPath keyword type message
1 /metadata/related_identifiers #/properties/metadata/properties/related_identifiers/type type array must be array
looking at the JSON for those items, they look fine - arrays of objects
"isPartOf": [
{
"identifier": "10.5281/zenodo.15426216",
"relation": "isDerivedFrom",
"resource_type": "software"
},
{
"identifier": "110.1128/mbio.02985-21",
"relation": "isDescribedBy",
"resource_type": "publication"
}
],
"requires": [
{
"identifier": "ark:/13960/t0mt2n370",
"relation": "cites"
}
]
Dropping either isPartOf or requires passes validation. Combining them into a single list also passes validation.
If I place everything under "hasPart" it gets uploaded properly.
