-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: cs01
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
Resolution:
Received thru the DSS-X public comments list from Neil Crossley on the 2019-08-23:
The transformation of XML-Choice loses information
In the XML-Schema, SignatureObjectType consists of a compulsory XML-Choice (elements Base64Signature and SignaturePtr) und two optional elements (SchemaRefs and WhichDoc). In the JSON-Schema, dss2-SignatureObjectType declares four properties and otherwise only requires the existance of at least one property. That means a JSON object with only 'schemaRefs' or 'whichDoc' will satisfy this definition, which does not correspond to the XML-schema. This problem does not appear where the XML-Choice is the sole child element of a complex type, such as UseVerificationTimeType, AdditionalKeyInfoType, KeySelectorType. The JSON-definition of the following types containing choices are also transformed with information loss:
SignaturePlacementType, Base64DataType.
I can imagine that one solution would be to introduce a dedicated type that only contains the respective choice, and to use it.