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

XML/JSON inconsistency: `EmbeddedDataSpecification/dataSpecification` reference type

Open s-heppner opened this issue 5 months ago • 0 comments

Since the SDK only supports DataSpecificationIEC61360, the spec is unambiguous: EmbeddedDataSpecification/dataSpecification must be an ExternalReference pointing to the template IRI (constraint AASc-3a-050; "an external global reference" per the embedded data specifications section of IDTA-01001).

Currently the two deserializers are inconsistent:

  • XML: correctly rejects ModelReference via construct_external_reference in construct_embedded_data_specification.
  • JSON: silently accepts ModelReference because _amend_abstract_attributes calls _construct_reference() instead of _construct_external_reference().

The upstream schemas (AAS.xsd / aas.json) currently permit both reference types for this field (see aas-core-works/aas-core-meta#394).

Should we tighten the JSON deserializer to match the spec and the XML deserializer, or loosen the XML deserializer to match the (too permissive) schemas until the upstream fix lands?

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