{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "EarthCode Product",
  "allOf": [
    {
      "$ref": "https://ogcincubator.github.io/bblocks-openscience/build/annotated/osc/geodcat-stac-earthcode/common/schema.json"
    },
    {
      "anyOf": [
        {
          "$ref": "https://ogcincubator.github.io/bblock-prov-schema/build/annotated/ogc-utils/prov-entity/schema.json"
        },
        {
          "not": {
            "required": [
              "provType"
            ]
          }
        }
      ]
    },
    {
      "anyOf": [
        {
          "$ref": "https://ogcincubator.github.io/bblocks-stac/build/annotated/contrib/stac/extensions/cf/schema.json"
        },
        {
          "not": {
            "properties": {
              "stac_extensions": {
                "type": "array",
                "contains": {
                  "const": "https://stac-extensions.github.io/cf/v0.2.0/schema.json"
                }
              }
            }
          }
        }
      ]
    }
  ],
  "properties": {
    "osc:type": {
      "type": "string",
      "enum": [
        "product"
      ]
    },
    "type": {
      "const": "Collection"
    }
  }
}