basyx-python-sdk icon indicating copy to clipboard operation
basyx-python-sdk copied to clipboard

model.base: `MultiLanguageNameType` limits values to 64 instead of 128

Open thammel opened this issue 5 months ago • 1 comments

MultiLanguageNameType constrains each of its values to a maximum length of 64 characters by using check_short_name_type (ShortNameType).

  • Expected behavior: Each value of a MultiLanguageNameType should be allowed up to 128 characters. In the AAS Part 1 Metamodel, the values of MultiLanguageNameType are of type LangStringNameType, whose text property has a maximum length of 128 characters (identical to NameType). This has been the case since Metamodel V3.0, and the SDK currently targets V3.1.2.

  • Actual behavior: A value with a length between 65 and 128 characters is rejected with a ValueError, e.g.: MultiLanguageNameType has a maximum length of 64! (length: 65). The SDK uses check_short_name_type (max length 64) instead of check_name_type (max length 128).

Suggested fix: have MultiLanguageNameType use check_name_type. The check_short_name_type and constrain_short_name_type helpers become unused and can be removed.

Reference: https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1.2/index.html

thammel avatar Jun 16 '26 13:06 thammel

I verfied, this is a bug in our SDK.

s-heppner avatar Jun 19 '26 11:06 s-heppner