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?
Since the SDK only supports
DataSpecificationIEC61360, the spec is unambiguous:EmbeddedDataSpecification/dataSpecificationmust be anExternalReferencepointing 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:
ModelReferenceviaconstruct_external_referenceinconstruct_embedded_data_specification.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?