{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ironman.rhino.nrw/docs/schema/state.schema.json",
  "title": "Technology Discovery – Zwischenstand",
  "type": "object",
  "required": ["version", "meta", "answers", "profiles"],
  "properties": {
    "version": { "type": "string" },
    "meta": { "type": "object", "properties": { "project": { "type": "string" }, "interviewer": { "type": "string" }, "itContact": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } },
    "answers": { "type": "object", "additionalProperties": { "$ref": "#/$defs/answer" } },
    "profiles": { "type": "array", "items": { "$ref": "client-profile.schema.json" } }
  },
  "$defs": {
    "answer": {
      "type": "object",
      "properties": {
        "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] },
        "note": { "type": "string" },
        "evidence": { "type": "string", "description": "Nachweis: Konsolenausgabe, Screenshot-Referenz, Ticket" },
        "status": { "type": "string", "enum": ["confirmed", "open", "na", "forbidden"], "description": "bestätigt / ungeklärt / nicht verfügbar / organisatorisch verboten" },
        "itConfirmed": { "type": "boolean" },
        "later": { "type": "boolean" },
        "updatedAt": { "type": ["string", "null"] }
      }
    }
  }
}
