{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://prc-trypcell-atlas.com/schema/dataset-registry.schema.json",
  "title": "TrypCell Atlas dataset registry",
  "description": "Validation schema for the versioned TrypCell Atlas research registry response.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "schemaVersion",
    "registryVersion",
    "releasedAt",
    "scope",
    "alignedWith",
    "totals",
    "portalDerivedAnalysis",
    "records",
    "interpretation"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "schemaVersion": {
      "const": "1.1.0"
    },
    "registryVersion": {
      "type": "string",
      "pattern": "^[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]+$"
    },
    "releasedAt": {
      "type": "string",
      "format": "date"
    },
    "scope": {
      "type": "string",
      "minLength": 1
    },
    "alignedWith": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "url",
          "status"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string"
          }
        }
      }
    },
    "totals": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "studies",
        "catalogueCellEntries"
      ],
      "properties": {
        "studies": {
          "type": "integer",
          "minimum": 0
        },
        "catalogueCellEntries": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "portalDerivedAnalysis": {
      "type": "object"
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "https://prc-trypcell-atlas.com/schema/dataset-record.schema.json"
      }
    },
    "interpretation": {
      "type": "object"
    }
  }
}
