radiantearth / stac-spec

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

JSON Schema version #1193

Open m-mohr opened 1 year ago

m-mohr commented 1 year ago

At some point we should update the JSON Schemas from the 2018 draft-7 to a more recent version (so the successor of 2020-12). Great benefit we'd get from the upcoming version, which supports object-based contains (see https://github.com/json-schema-org/json-schema-spec/issues/1077 ) which would be very useful to validate assets.

Once available, we'd need to update and extend all schemas (major work) and also wait for tooling support in the JSON Schema libraries.

philvarner commented 1 year ago

Related to this is

Why do all of the $id fields have an empty anchor at the end?

"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json#",
m-mohr commented 1 year ago

For no specific reason, I guess. Maybe because the $schema also has it? Must probably also be changed for all extensions? PRs are welcome...

philvarner commented 1 year ago

It looks like newer versions of the JSON Schema spec have dropped the trailing # in their $id value.

Do you think changing this would require a v1.0.1 release of the core specs? It doesn't actually change anything about the specs and the URL resolves the same in practice, so I'm not certain it would.

m-mohr commented 1 year ago

As it's allowed in draft-7 I don't think we are in a rush and can just update it in the next release, right?

philvarner commented 1 year ago

I was planning ahead in case it wasn't or jsonschema decides not to support in >=1.18.x