Closed pjaydev closed 3 months ago
Hi @pjaydev,
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 idShorts or such optional strings from the serialization.
According to the spec, the
idShort
attribute is an optional attribute for submodel elements. Nevertheless, after anidShort
value has once been set, it can no longer be deleted. When just blanking the input field, still an empty string value will be stored for theidShort
property on the generated JSON output.In my use case, this caused two specific problems:
SubmodelElementList
shall not have set anidShort
. If an idShort was accidentally set, you will have to delete the whole element (tree) to restore conformity.idShort
, if the field is defined. Hence the schema validator refuses a SubmodelElement object containing anidShort
attribute with an empty string as value, as generated by the PackageExplorer.EDIT: In fact the described problem does not only relate to
ìdShort
attributes, but rather more to each optional string-typed attribute you can find within the AAS schema. Further examples are all three string fieldsversion
,revision
andtemplateId
in theSubmodel.administration
field or thevalue
attribute of aProperty
and possibly there are many more. I adjusted the issue title accordingly.Thanks in advance.