Currently, XSD_TYPE_NAMES in basyx/aas/model/datatypes.py contains a typo and a missing entry:
UnsignedInt is mapped to "unsignedByte" instead of "unsignedInt"
UnsignedByte has no entry at all
Because XSD_TYPE_CLASSES is generated as the inverse of XSD_TYPE_NAMES, this produces three concrete failures:
XSD_TYPE_CLASSES["xs:unsignedInt"] is absent → deserializing any Extension, Property, Qualifier, etc. with valueType: xs:unsignedInt raises a KeyError
XSD_TYPE_CLASSES["xs:unsignedByte"] returns UnsignedInt instead of UnsignedByte → silent wrong-class deserialization
XSD_TYPE_NAMES[UnsignedByte] raises a KeyError → serialization of UnsignedByte values is also broken
Both the JSON adapter (json_deserialization.py) and XML adapter (xml_deserialization.py) look up valueType strings through XSD_TYPE_CLASSES, so both serialization formats are affected.
The AAS spec (IDTA-01001), aas.json, and AAS.xsd all define xs:unsignedInt (32-bit, 0–4 294 967 295) and xs:unsignedByte (8-bit, 0–255) as distinct, valid data types.
Fix: in basyx/aas/model/datatypes.py, replace:
UnsignedInt: "unsignedByte",
Currently,
XSD_TYPE_NAMESinbasyx/aas/model/datatypes.pycontains a typo and a missing entry:UnsignedIntis mapped to"unsignedByte"instead of"unsignedInt"UnsignedBytehas no entry at allBecause
XSD_TYPE_CLASSESis generated as the inverse ofXSD_TYPE_NAMES, this produces three concrete failures:XSD_TYPE_CLASSES["xs:unsignedInt"]is absent → deserializing anyExtension,Property,Qualifier, etc. withvalueType: xs:unsignedIntraises aKeyErrorXSD_TYPE_CLASSES["xs:unsignedByte"]returnsUnsignedIntinstead ofUnsignedByte→ silent wrong-class deserializationXSD_TYPE_NAMES[UnsignedByte]raises aKeyError→ serialization ofUnsignedBytevalues is also brokenBoth the JSON adapter (
json_deserialization.py) and XML adapter (xml_deserialization.py) look upvalueTypestrings throughXSD_TYPE_CLASSES, so both serialization formats are affected.The AAS spec (IDTA-01001),
aas.json, andAAS.xsdall definexs:unsignedInt(32-bit, 0–4 294 967 295) andxs:unsignedByte(8-bit, 0–255) as distinct, valid data types.Fix: in
basyx/aas/model/datatypes.py, replace: