We noticed that the functionality provided by the removed of items: property does not actually get replaced by the uniqueItems and uniqueEntries fields.
items: allowed for a single 'column' of a TSV to be validated that everything was unique, independent of any other column.
uniqueItems: forces all columns to be unique, not particular ones
uniqueEntries requires specific combinations of columns to be unique together (not a single column).
We can almost get around this with placing a allOf field at the top level of the schema, and listing each column that should be independently validated with uniqueEntries, such as:
However if _any_ of those columns violate uniqueness, the error message reports all of the columns being non-unique in independent errors (and still saying 'combinations'
```
* --input (test_duplicate_id.csv): Validation of file failed:
-> Entry 2: Detected non-unique combination of the following fields: [id]
-> Entry 2: Detected non-unique combination of the following fields: [fastq_dna]
-> Entry 2: Detected non-unique combination of the following fields: [fastq_aa]
-> Value does not match against the schemas at indexes [0, 1, 2]
```
We noticed that the functionality provided by the removed of
items:
property does not actually get replaced by theuniqueItems
anduniqueEntries
fields.items:
allowed for a single 'column' of a TSV to be validated that everything was unique, independent of any other column.uniqueItems
: forces all columns to be unique, not particular onesuniqueEntries
requires specific combinations of columns to be unique together (not a single column).We can almost get around this with placing a
allOf
field at the top level of the schema, and listing each column that should be independently validated withuniqueEntries
, such as:Example schema:
Example broken csv:
Where there is one duplicate in
id
and one duplicate infasta_aa