{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opentine.com/schemas/opentine-uplift-suite-1.schema.json",
  "title": "opentine.uplift-suite/1 claim",
  "description": "The claim of an attestation recording a versioned task suite (task list, lengths in minutes, scoring) and its digest. A claim convention, not an object kind.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "convention",
    "digest",
    "suite",
    "at"
  ],
  "properties": {
    "convention": {
      "const": "opentine.uplift-suite/1"
    },
    "digest": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "suite": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "version",
        "scoring",
        "tasks"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "scoring": {
          "type": "string"
        },
        "tasks": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "minutes"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.:-]{1,128}$"
              },
              "minutes": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,6})?$"
              }
            }
          }
        }
      }
    },
    "at": {
      "type": "string"
    }
  }
}
