midas-isg / digital-commons

The MIDAS Digital Commons
http://epimodels.org/apps/mdc
GNU General Public License v3.0
2 stars 1 forks source link

Should authors element of Publication type have a min occurs of 1? #246

Closed jeffstazer closed 6 years ago

jeffstazer commented 6 years ago

According to the publication_schema.json, the minimum number of items for authors is 1. The minOccurs in the dats.xsd for the element authors of type Publication is 0. The publication_schema.json does not indicate it is required at the bottom of the page.

"authors" : {
  "description": "The person(s) and/or organisation(s) responsible for the publication.",
  "type" : "array",
  "items" : {
    "oneOf": [
      {"$ref" : "person_schema.json#"},
      {"$ref" : "organization_schema.json#"}
    ]
  },
  "minItems" : 1
},

<complexType name="Publication">
    <sequence>
        <element name="identifier" type="tns:Identifier" minOccurs="0" maxOccurs="1"/>
        <element name="alternateIdentifiers" type="tns:Identifier" minOccurs="0" maxOccurs="unbounded"/>
        <element name="title" type="tns:nonZeroLengthString" maxOccurs="1" minOccurs="0"/>
        <element name="type" type="tns:Annotation" minOccurs="0" maxOccurs="1"/>
        <element name="publicationVenue" type="tns:nonZeroLengthString" maxOccurs="1" minOccurs="0"/>
        <element name="dates" type="tns:Date" minOccurs="0" maxOccurs="unbounded"/>
        <element name="authors" type="tns:Person" minOccurs="0" maxOccurs="unbounded"/>
        <element name="acknowledges" type="tns:Grant" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
</complexType>
JohnLevander commented 6 years ago

I agree. This will be fixed in the next commit.