{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dnsdoctor-dev/json-schema/dnsdoctor-dev-domains-out-schema.json",
  "title": "DomainsOut",
  "description": "The `GET /v1/domains` response: the account's verified monitored domains.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dnsdoctor-dev-domains-api-openapi.yml#/components/schemas/DomainsOut",
  "properties": {
    "domains": {
      "items": {
        "$ref": "#/$defs/DomainOut"
      },
      "type": "array",
      "title": "Domains"
    }
  },
  "type": "object",
  "required": [
    "domains"
  ],
  "$defs": {
    "DomainCheck": {
      "properties": {
        "check": {
          "type": "string",
          "title": "Check"
        },
        "status": {
          "type": "string",
          "title": "Status"
        }
      },
      "type": "object",
      "required": [
        "check",
        "status"
      ],
      "title": "DomainCheck",
      "description": "One check of a domain's latest snapshot — name + status only.\n\nDeliberately NO letter grade: the A-F grade is `frontend/lib/grade.ts`, a\nversioned frontend contract. Recomputing it server-side would duplicate the\nrubric and drift; the API returns the raw per-check statuses instead."
    },
    "DomainOut": {
      "properties": {
        "domain": {
          "type": "string",
          "title": "Domain"
        },
        "scanned_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Scanned At"
        },
        "checks": {
          "items": {
            "$ref": "#/$defs/DomainCheck"
          },
          "type": "array",
          "title": "Checks"
        }
      },
      "type": "object",
      "required": [
        "domain",
        "scanned_at",
        "checks"
      ],
      "title": "DomainOut",
      "description": "A monitored domain with its latest scan snapshot's per-check statuses.\n\n`scanned_at` is null (and `checks` empty) when the domain is verified but has\nno snapshot yet — awaiting its first monitored scan, not an error."
    }
  }
}