Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-6915

Add the possibility to make elements in an array of scalar non nullable

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.3.0
    • Component/s: Schemas
    • Tags:
    • Backlog priority:
      700
    • Story Points:
      3

      Description

      Nuxeo Platform has two kinds of multi-valued fields, the list and the array.

      The lists are defined such as below:

        <xs:element name="listOfStrings">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="role" minOccurs="0" maxOccurs="unbounded">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[a-zA-Z0-9]+"></xs:pattern>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      

      The arrays are defined such as below:

        <xs:element name="arrayOfStrings">
          <xs:simpleType>
            <xs:list>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:pattern value="[a-zA-Z0-9]*"></xs:pattern>
                </xs:restriction>
              </xs:simpleType>
            </xs:list>
          </xs:simpleType>
        </xs:element>
      

      For the lists we can declare the container and the elements non nullable by adding nillable="false" nxsv:nillable="false" on the xs:element of the container or the elements.
      But for the arrays we can only declare the container non nullable.

      Since NXP-31918, we added the possibility to put nxsv:nillable="false" on the xs:list in order to force the elements to be non null.

      Studio should be able to put this new attribute when the user choose to make their elements non nullable/required.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: