{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Schema for OGCAPI records profile and STAC profile used by EarthCODE",
  "anyOf": [
    {
      "allOf": [
        {
          "anyOf": [
            {
              "$ref": "https://ogcincubator.github.io/geodcat-ogcapi-records/build/annotated/geo/geodcat/stac/geodcat-stac-item/schema.json"
            },
            {
              "$ref": "https://ogcincubator.github.io/geodcat-ogcapi-records/build/annotated/geo/geodcat/stac/geodcat-stac-collection/schema.json"
            }
          ]
        },
        {
          "$ref": "https://ogcincubator.github.io/bblocks-stac/build/annotated/contrib/stac/extensions/themes/schema.json"
        },
        {
          "$ref": "https://ogcincubator.github.io/bblocks-stac/build/annotated/contrib/stac/extensions/osc/schema.json"
        }
      ]
    },
    {
      "$ref": "https://ogcincubator.github.io/geodcat-ogcapi-records/build/annotated/geo/geodcat/geodcat-records/schema.json"
    }
  ],
  "$defs": {
    "osc:workflow": {
      "title": "Workflow",
      "type": "string",
      "format": "osc-workflow",
      "minLength": 1
    },
    "via_links": {
      "title": "Via Link",
      "properties": {
        "type": {
          "enum": [
            "application/json",
            "application/pdf",
            "application/zip",
            "text/html",
            "text/plain"
          ],
          "options": {
            "enum_titles": [
              "JSON",
              "PDF",
              "ZIP",
              "HTML",
              "Text"
            ]
          }
        },
        "rel": {
          "enum": [
            "via"
          ]
        }
      }
    },
    "osc:project": {
      "title": "Project",
      "type": "string",
      "format": "osc-project",
      "minLength": 1
    }
  }
}