Closed Christian-Block closed 5 months ago
This does also happen with Qualifiers as well as with OperationVariables. With the latest update of AAS4J, it should be able to handle these AASX - but nevertheless, it would be better if this was fixed.
Here is a further example of empty elements
In this case a AAS API for ConceptDescriptions (according Open API Spec.) is refusing the JSON and the CD can't be imported into a CD Repository.
This is a major bug and should be adressed a.s.a.p.
Hi All,
"Empty Lists", especially in case of optional elements is a known issue of the package explorer. Also, there has been found inconsistency between specifications and schema. An issue for the inconsisteny can be found at https://github.com/admin-shell-io/aas-specs/issues/418.
Just for reference. Here's the excerpt from https://github.com/admin-shell-io/aas-specs/tree/master/schemas/json#uml-properties-to-json-properties:
Aggregations, i.e., the properties with the cardinality 0.., 1.. etc., are modeled as JSON arrays.
We explicitly forbid empty JSON arrays to avoid confusion about properties which have cardinality 0..*. Namely, an empty array is semantically equal to an omitted attribute (according to the meta-model). Thus, the JSON property representing an aggregation attribute must be omitted if the aggregation is empty.
Hi @Christian-Block,
Thank you for raising the issue !
We have developed a new feature "Fix and Finalize" which removes/fixes the issue with empty lists and empty strings. In additional to this, we are also working on more hints in such violations.
Meanwhile, I would like to request you to use this "Fix and Finalize" option to remove empty
Please see Issue 273 in AAS4J repository.
The XML generated by AASP creates empty
<supplementalSemanticIds />
elements.supplementalSemanticIds is specified in IDTA 01001-3-0 and is included in XSD. Both define supplementalSemanticIds as optional.
However, it seems, that the AASP does not follow the XML optional-properties rule.
It seems to make a difference if you have created supplementalSemanticIds (case 1)
or not (case 2)
In case 1 an empty element is not exported.
In case 2 an empty element is exported.
Tested Version: v2024-02-27