Array validation

Hi Dominique,

It came to my mind that in the validator, when an array is expected, you 
validate that at least one element is present.
If it is only one element, does it have to be inside an array? In 
schema.org, as many are always possible, if you need only one, then you 
do not use an array.

For instance, for adataset you can have multiple distributions:
"distribution": [

{

"@type": "DataDownload",

"name": "UniParc XML",

"fileFormat": "xml",

"contentURL": 
"ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/uniparc/uniparc_all.xml.gz" 


},

{

"@type": "DataDownload",

"name": "UniParc FASTA",

"fileFormat": "fasta",

"contentURL": 
"ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/uniparc/uniparc_active.fasta.gz" 


}

],

Or you can have only one:
"distribution":

{

"@type": "DataDownload",

"name": "UniParc XML",

"fileFormat": "xml",

"contentURL": 
"ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/uniparc/uniparc_all.xml.gz" 


},


And both are valid in Bioschemas. Will both of them become as valid in 
your validator?

Regards,

Received on Monday, 16 October 2017 15:46:32 UTC