eclipse-aaspe / package-explorer

AASX Package Explorer
Other
55 stars 20 forks source link

User can enter version and revision numbers outside of specification #24

Open WelliSolutions opened 7 months ago

WelliSolutions commented 7 months ago

Describe the bug The administrative information has a version and revision field. The user can enter invalid values.

To Reproduce Steps to reproduce the behavior:

  1. Open or create an AAS
  2. Create or select a Submodel
  3. Create administrative information image
  4. Enter invalid information image

Expected behavior Version is limited to a length of 4 (see contraint AASd-135). Revision is limited to a length of 4 (see contraint AASd-136). Revision should be disabled as long as version is not filled (see contraint AASd-005). The 4 characters should probably not contain a dot. Otherwise version could be 1.2 and revision could be 3.4, resulting in a 4-digit version number. Unfortunately I could not find the definition of RevisionType in the spec.

Screenshots See before.

Desktop (please complete the following information):

Smartphone (please complete the following information): None

Additional context PE Version 2023-11-17

WelliSolutions commented 7 months ago

Version and revision are limited to numbers:

      <xs:element name="version" minOccurs="0" maxOccurs="1">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="(0|[1-9][0-9]*)"/>
            <xs:minLength value="1"/>
            <xs:maxLength value="4"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="revision" minOccurs="0" maxOccurs="1">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="(0|[1-9][0-9]*)"/>
            <xs:minLength value="1"/>
            <xs:maxLength value="4"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>

Source: https://github.com/admin-shell-io/aas-specs/blob/master/schemas/xml/AAS.xsd