{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dns-coffee/json-schema/dns-coffee-records-overview-schema.json",
  "title": "RecordsOverview",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dns-coffee-records-api-openapi.yml#/components/schemas/RecordsOverview",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "srv_services": {
      "description": "Top SRV service labels, largest first.",
      "items": {
        "$ref": "#/$defs/SRVServiceCount"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "total": {
      "description": "Total number of active catch-all records (the sum of the type breakdown).",
      "format": "int64",
      "type": "integer"
    },
    "types": {
      "description": "Record-type breakdown, largest first.",
      "items": {
        "$ref": "#/$defs/RecordTypeCount"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "zones": {
      "description": "Zones with the most records, largest first.",
      "items": {
        "$ref": "#/$defs/RecordZoneCount"
      },
      "type": [
        "array",
        "null"
      ]
    }
  },
  "required": [
    "total",
    "types",
    "srv_services",
    "zones"
  ],
  "type": "object",
  "$defs": {
    "RecordTypeCount": {
      "additionalProperties": false,
      "properties": {
        "count": {
          "description": "Number of active records of this type.",
          "format": "int64",
          "type": "integer"
        },
        "type": {
          "description": "Numeric RR type.",
          "format": "int64",
          "type": "integer"
        },
        "type_name": {
          "description": "RR type mnemonic, or the RFC 3597 TYPE<n> form.",
          "type": "string"
        }
      },
      "required": [
        "type",
        "type_name",
        "count"
      ],
      "type": "object"
    },
    "RecordZoneCount": {
      "additionalProperties": false,
      "properties": {
        "count": {
          "description": "Number of active records in the zone.",
          "format": "int64",
          "type": "integer"
        },
        "last_import": {
          "description": "Date of the zone's most recent import. Its records are counted as active as of this date.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "stale": {
          "description": "True when we have not received a zone file for the zone in over six months (the stale flag on /zones), so its records may no longer match the zone as currently published.",
          "type": "boolean"
        },
        "zone": {
          "description": "Zone name.",
          "type": "string"
        }
      },
      "required": [
        "zone",
        "count",
        "last_import",
        "stale"
      ],
      "type": "object"
    },
    "SRVServiceCount": {
      "additionalProperties": false,
      "properties": {
        "count": {
          "description": "Number of active SRV records for the service.",
          "format": "int64",
          "type": "integer"
        },
        "service": {
          "description": "The SRV service label (the leading _service._proto component of the owner name).",
          "type": "string"
        }
      },
      "required": [
        "service",
        "count"
      ],
      "type": "object"
    }
  }
}