model.base: Fix MultiLanguageNameType value length to 128#577
Open
thammel wants to merge 1 commit into
Open
Conversation
Until now, each value of a MultiLanguageNameType was constrained to a maximum length of 64 via check_short_name_type. This never matched the specification: LangStringNameType/text has had a maximum length of 128 characters since AAS Part 1 Metamodel V3.0, identical to NameType. MultiLanguageNameType now uses check_name_type instead. The now-unused check_short_name_type and constrain_short_name_type functions are removed accordingly.
s-heppner
requested changes
Jun 19, 2026
Comment on lines
111
to
115
| This is the type-independent alternative to :func:`~.check_content_type`, :func:`~.check_identifier`, etc. It is | ||
| used for the definition of the :class:`ConstrainedLangStringSets <basyx.aas.model.base.ConstrainedLangStringSet>`, | ||
| as a "Basic" constrained string type only exists for :class:`~basyx.aas.model.base.MultiLanguageNameType`, where all | ||
| values are :class:`ShortNames <basyx.aas.model.base.ShortNameType>`. All other | ||
| values are :class:`NameTypes <basyx.aas.model.base.NameType>`. All other | ||
| :class:`:class:`ConstrainedLangStringSets <basyx.aas.model.base.ConstrainedLangStringSet>` use custom constraints. |
Member
There was a problem hiding this comment.
I think the reference to ShortNameType or NameType here is more confusing than helpful in this docstring. I'd remove it completely, for example:
Returns a ``check_type`` function for the given constraints.
Use this instead of the named :func:`~.check_content_type`, :func:`~.check_identifier`, etc. when the
constraints do not correspond to a predefined constrained string type — for example, in
:class:`ConstrainedLangStringSets <basyx.aas.model.base.ConstrainedLangStringSet>` that define their own
length and pattern rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Until now, each value of a MultiLanguageNameType was constrained to a maximum length of 64 via check_short_name_type. This never matched the specification: LangStringNameType/text has had a maximum length of 128 characters since AAS Part 1 Metamodel V3.0, identical to NameType.
MultiLanguageNameType now uses check_name_type instead. The now-unused check_short_name_type and constrain_short_name_type functions are removed accordingly.
Fixs #576