{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://comparatifs.com/downloads/schema-resultat-test.json",
  "title": "Résultat de test Comparatifs.com",
  "description": "Structure minimale exigée avant de présenter une tâche comme testée. Ce fichier ne contient aucun résultat.",
  "type": "object",
  "required": [
    "campaignId",
    "testedAt",
    "tool",
    "product",
    "plan",
    "prompt",
    "trials",
    "humanCorrections",
    "limitations"
  ],
  "properties": {
    "campaignId": {
      "type": "string"
    },
    "testedAt": {
      "type": "string",
      "format": "date-time"
    },
    "tool": {
      "type": "string"
    },
    "product": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "modelDisplayed": {
      "type": [
        "string",
        "null"
      ]
    },
    "options": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "prompt": {
      "type": "string"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "sha256"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          }
        }
      }
    },
    "trials": {
      "type": "array",
      "minItems": 3,
      "maxItems": 3,
      "items": {
        "type": "object",
        "required": [
          "durationSeconds",
          "retries",
          "errors",
          "outputReference"
        ],
        "properties": {
          "durationSeconds": {
            "type": "number"
          },
          "retries": {
            "type": "integer"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "outputReference": {
            "type": "string"
          }
        }
      }
    },
    "humanCorrections": {
      "type": "object"
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sourceTermsChecked": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    }
  }
}
