Properly handle uploaded content constraints with duplicated codes in a repeated concept - SDMXRI-2028
As turned out during the dotstatsuite-core-transfer#445 (closed) tests, there is no validation for the duplicate codes in the content constraint when the same concept is repeated several times.
The attached file with an erroneous content constraint that has duplicates codes (repeated values for REF_SECTOR and COUNTERPART_SECTOR) is uploaded as such without any validation. The NSI should either raise an error or auto-correct the content (and optimally provide a warning).
File content
<com:KeyValue id="REF_SECTOR">
<com:Value>S1</com:Value>
</com:KeyValue>
<com:KeyValue id="COUNTERPART_SECTOR">
<com:Value>S1</com:Value>
</com:KeyValue>
<com:KeyValue id="REF_SECTOR">
<com:Value>S1</com:Value>
</com:KeyValue>
<com:KeyValue id="COUNTERPART_SECTOR">
<com:Value>S1</com:Value>
</com:KeyValue>
NSI WS response
<common:KeyValue id="REF_SECTOR">
<common:Value>S1</common:Value>
<common:Value>S1</common:Value>
</common:KeyValue>
<common:KeyValue id="COUNTERPART_SECTOR">
<common:Value>S1</common:Value>
<common:Value>S1</common:Value>
</common:KeyValue>
Underlying Eurostat ticket: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/SDMXRI-2028
Edited by Jens Dossé