{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://spf-dkim-dmarc-bimi.com/api/check.schema.json",
  "title": "MailAuthCheckerLite check result",
  "type": "object",
  "required": ["domain", "checkedAt", "spf", "dmarc", "bimi"],
  "properties": {
    "domain": { "type": "string", "description": "Normalized domain that was checked." },
    "checkedAt": { "type": "string", "format": "date-time" },
    "spf": { "$ref": "#/$defs/checkItem" },
    "dmarc": {
      "allOf": [{ "$ref": "#/$defs/checkItem" }],
      "properties": {
        "inheritedFrom": { "type": ["string", "null"] }
      }
    },
    "bimi": { "$ref": "#/$defs/checkItem" }
  },
  "$defs": {
    "checkItem": {
      "type": "object",
      "required": ["status", "records"],
      "properties": {
        "status": {
          "type": "string",
          "enum": ["ok", "none", "multiple", "danger", "inherited", "unknown"]
        },
        "records": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    }
  }
}
