{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Data Lab evaluation register",
  "type": "object",
  "required": [
    "schemaVersion",
    "released",
    "records"
  ],
  "properties": {
    "schemaVersion": {
      "const": "data-lab-evaluation/1"
    },
    "released": {
      "type": "string",
      "format": "date"
    },
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "study",
          "modelRelease",
          "population",
          "unit",
          "outcome",
          "exposure",
          "training",
          "evaluation",
          "priorUse",
          "overlap",
          "selection",
          "metrics",
          "uncertainty",
          "decision",
          "nextEvidence",
          "sources"
        ],
        "properties": {
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "sha256"
              ],
              "properties": {
                "path": {
                  "type": "string"
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            }
          }
        }
      }
    }
  }
}
