{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tune.toys/schemas/platform/platform-matrix.schema.json",
  "title": "PlatformMatrix",
  "description": "Per-version platform matrix: one entry per target profile. included means an artifact exists, supported is a creator claim, tested requires evidence.",
  "type": "array",
  "items": {
    "$ref": "#/$defs/VersionTargetEntry"
  },
  "maxItems": 13,
  "$defs": {
    "VersionTargetEntry": {
      "title": "VersionTargetEntry",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "targetProfile": {
          "$ref": "enums.schema.json#/$defs/TargetProfile"
        },
        "included": {
          "type": "boolean"
        },
        "supported": {
          "type": "boolean"
        },
        "tested": {
          "type": "boolean"
        },
        "notes": {
          "type": "string",
          "maxLength": 500
        },
        "evidenceReportId": {
          "anyOf": [
            {
              "$ref": "common.schema.json#/$defs/EntityId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "targetProfile",
        "included",
        "supported",
        "tested",
        "notes",
        "evidenceReportId"
      ],
      "if": {
        "properties": {
          "tested": {
            "const": true
          }
        }
      },
      "then": {
        "properties": {
          "included": {
            "const": true
          },
          "evidenceReportId": {
            "$ref": "common.schema.json#/$defs/EntityId"
          }
        }
      }
    }
  }
}
