Skip to content

adapter: allow optional valueId in ValueReferencePair for JSON and XML#579

Merged
s-heppner merged 6 commits into
eclipse-basyx:developfrom
rwth-iat:fix-optional-value-id
Jun 29, 2026
Merged

adapter: allow optional valueId in ValueReferencePair for JSON and XML#579
s-heppner merged 6 commits into
eclipse-basyx:developfrom
rwth-iat:fix-optional-value-id

Conversation

@paul-gerber-svg

@paul-gerber-svg paul-gerber-svg commented Jun 18, 2026

Copy link
Copy Markdown

Previously, the JSON and XML deserializers raised a KeyError if a ValueReferencePair did not contain a valueId.

However, according to the IDTA specification, valueId is explicitly optional (cardinality 0..1).

Fixes #562

Currently, the JSON and XMOL deserializiers raise an error when parsing Blob or File submodels that do not include a contentType

The contentType attribute has a cardinality of 0..1 for both classes and should therefore be optional.
The implementation now aligns with this specification and defaults to None if the field is absent in the data.
@s-heppner

Copy link
Copy Markdown
Member

I think this depends on #572.

@s-heppner s-heppner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@s-heppner s-heppner merged commit 93c5f67 into eclipse-basyx:develop Jun 29, 2026
13 checks passed
@s-heppner s-heppner deleted the fix-optional-value-id branch June 29, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants