fideslang
fideslang copied to clipboard
`name` field in DatasetCollection and DatasetField should be unique
Bug Description
Right now you are able to add two DatasetCollections of the same name
to a Dataset. The name
field should be enforced to be unique, since databases wouldn't allow i.e. two schemas of the same name.
Steps to Reproduce
- Add two DatasetCollections of the same name
Expected behavior
There should be a validator that prevents the second DatasetCollection from being added
Additional context
More context for why this came up in https://github.com/ethyca/fides/pull/718#issuecomment-1148046497
I can think of a way to do DatasetCollection
, but DatasetField
is going to be more difficult. Fields are recursive so you can have a depth of n values, which makes the test more complex because they would need to be unique only at the same level.