{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ironman.rhino.nrw/docs/schema/client-profile.schema.json",
  "title": "Client Capability Test – Profil",
  "type": "object",
  "required": ["name", "results"],
  "properties": {
    "schema": { "const": "cct-profile/1.0" },
    "id": { "type": "string" }, "name": { "type": "string", "minLength": 1 },
    "deviceType": { "type": "string" }, "os": { "type": "string" }, "osVersion": { "type": "string" },
    "browser": { "type": "string" }, "mdm": { "type": "string" }, "mdmVersion": { "type": "string" },
    "accessPath": { "type": "string" }, "userGroup": { "type": "string" },
    "mandatory": { "type": "boolean", "description": "Pflichtclient – zählt für den kleinsten gemeinsamen Nenner" },
    "ua": { "type": "string" }, "auto": { "type": "object" },
    "probeBase": { "type": "string" }, "probeAvailable": { "type": ["boolean", "null"] },
    "results": { "type": "object", "additionalProperties": { "$ref": "#/$defs/result" } },
    "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }
  },
  "$defs": {
    "result": {
      "type": "object",
      "required": ["ok"],
      "properties": {
        "ok": { "type": ["boolean", "null"], "description": "true = Erfolg, false = Fehler, null = Unbekannt" },
        "detail": { "type": "string", "description": "technische Meldung" },
        "note": { "type": "string" },
        "manual": { "type": "boolean" },
        "autoOk": { "type": ["boolean", "null"] },
        "ts": { "type": "string" }
      }
    }
  }
}
