Skip to content

Typo in $id for item-spec common.json #1363

@omad

Description

@omad

Background

While implementing automatic validation of STAC documents in ODC Explorer I discovered that the $id in item-spec/json-schema/common.json has a typo. It's missing a dot.

"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/commonjson",
"title": "STAC Common Metadata",

By my reading of the JSON Schema specification, this should have broken usage of the schema. Since sub-schemas should be stored and referenced by their declared $id.

Fortunately/unfortunately, most validators instead use the URL the sub-schema can be downloaded from and carry on happily.

Fix/Release/Version

It's a simple fix to make, however, I'm unsure whether it:

  • Should just be patched in to the current spec version. Most validators seem to ignore it, but, there's a chance it might break something somewhere that has it stored by $id.
  • Or, include the fix in the next version release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions