{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tuqo-ru/json-schema/tuqo-ru-domain-schema.json",
  "title": "Domain",
  "description": "Custom domain of a site (`shared::model::Domain`).",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tuqo-ru-openapi.json#/components/schemas/Domain",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "site_id": {
      "type": "string",
      "format": "uuid"
    },
    "domain": {
      "type": "string",
      "description": "FQDN in lowercase."
    },
    "verified": {
      "type": "boolean",
      "description": "Ownership verified by the TXT record."
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the domain is served."
    },
    "redirect_enabled": {
      "type": "boolean"
    },
    "redirect_to": {
      "type": [
        "string",
        "null"
      ]
    },
    "verification_token": {
      "type": "string",
      "description": "Value of the `_tuqo-verify.<domain>` TXT record."
    },
    "ssl_status": {
      "type": "string",
      "enum": [
        "active",
        "pending",
        "failed"
      ],
      "description": "Certificate status from the last probe."
    },
    "ssl_checked_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "a_record_ok": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "A record diagnostics: true — points to the serving IPs; false — missing or points elsewhere; null — not checked. Does not affect `verified`."
    },
    "a_record_found": {
      "type": [
        "string",
        "null"
      ],
      "description": "Found A records, comma-separated."
    },
    "a_checked_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "verified_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "site_id",
    "domain",
    "verified",
    "enabled",
    "redirect_enabled",
    "redirect_to",
    "verification_token",
    "ssl_status",
    "ssl_checked_at",
    "a_record_ok",
    "a_record_found",
    "a_checked_at",
    "created_at",
    "verified_at"
  ]
}