basyx-python-sdk
basyx-python-sdk copied to clipboard
XML/JSON inconsistency: `EmbeddedDataSpecification/dataSpecification` reference type
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
ModelReferenceviaconstruct_external_referenceinconstruct_embedded_data_specification. - JSON: silently accepts
ModelReferencebecause_amend_abstract_attributescalls_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?