{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/evaluator-manifest.schema.json",
  "title": "EvalDossier evaluator manifest 0.1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "protocolVersion",
    "schemaVersion",
    "manifestId",
    "evaluatorId",
    "evaluatorType",
    "issuedAt",
    "expiresAt",
    "operator",
    "signingKeyId",
    "keys",
    "profiles",
    "software",
    "dataPractices",
    "signatureContext",
    "proof"
  ],
  "properties": {
    "protocolVersion": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/protocolVersion" },
    "schemaVersion": { "const": "evaldossier.evaluator-manifest/0.1" },
    "manifestId": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/identifier" },
    "evaluatorId": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/identifier" },
    "evaluatorType": { "enum": ["NATIVE", "ADAPTER", "HYBRID"] },
    "issuedAt": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/timestamp" },
    "expiresAt": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/timestamp" },
    "operator": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "displayName", "relationship"],
      "properties": {
        "id": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/identifier" },
        "displayName": { "type": "string", "minLength": 1, "maxLength": 120 },
        "relationship": {
          "enum": ["INTERNAL_REFERENCE_OPERATOR", "EXTERNAL_DECLARED_OPERATOR"]
        }
      }
    },
    "signingKeyId": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/keyId" },
    "keys": {
      "type": "array",
      "minItems": 1,
      "maxItems": 8,
      "items": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/publicJwk" }
    },
    "profiles": {
      "type": "array",
      "minItems": 1,
      "maxItems": 32,
      "items": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/profileRef" }
    },
    "software": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "version", "sourceVisibility"],
      "properties": {
        "name": { "type": "string", "minLength": 1, "maxLength": 120 },
        "version": { "type": "string", "minLength": 1, "maxLength": 64 },
        "sourceVisibility": { "enum": ["OPEN_SOURCE", "SOURCE_AVAILABLE", "CLOSED"] }
      }
    },
    "dataPractices": {
      "type": "object",
      "additionalProperties": false,
      "required": ["acceptedClassifications", "trainingUse", "networkUse"],
      "properties": {
        "acceptedClassifications": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": { "enum": ["PUBLIC_SYNTHETIC", "PUBLIC_CAPTURE_SANITIZED"] }
        },
        "trainingUse": { "const": false },
        "networkUse": { "const": false }
      }
    },
    "signatureContext": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/signatureContext" },
    "proof": { "$ref": "https://raw.githubusercontent.com/miguel-herrero-systems/evaldossier/v0.1.0/schemas/common.schema.json#/$defs/proof" }
  }
}
