radiantearth / stac-spec

SpatioTemporal Asset Catalog specification - making geospatial assets openly searchable and crawlable
https://stacspec.org
Apache License 2.0
794 stars 178 forks source link

Object keys should be marked as unique in spec #1083

Closed l0b0 closed 3 years ago

l0b0 commented 3 years ago

https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md#collection-fields mentions that assets is a

Dictionary of asset objects that can be downloaded, each with a unique key.

Is that uniqueness constraint actually enforced by STAC? I can't seem to find any uniqueItems properties near the assets definition, but I'm a JSON schema newbie.

m-mohr commented 3 years ago

uniqueItems is for arrays, there's no equivalent for objects, I think.

Also, the spec talks about keys only, not unique objects. While I think the uniqueness is not part of the JSON spec, none of the JSON implementations I'm aware of supports multiple keys with the same name, including JSON Schema?!