{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dns-coffee/json-schema/dns-coffee-unreachable-glue-schema.json",
  "title": "UnreachableGlue",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dns-coffee-stats-api-openapi.yml#/components/schemas/UnreachableGlue",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "addresses": {
      "description": "The addresses, most live nameservers first.",
      "items": {
        "$ref": "#/$defs/UnreachableAddress"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "kinds": {
      "description": "One entry per kind of address that has current glue, most nameservers first.",
      "items": {
        "$ref": "#/$defs/UnreachableGlueKind"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "total": {
      "$ref": "#/$defs/UnreachableGlueKind",
      "description": "The sums over every kind. Its kind is \"total\"."
    }
  },
  "required": [
    "kinds",
    "total",
    "addresses"
  ],
  "type": "object",
  "$defs": {
    "UnreachableAddress": {
      "additionalProperties": false,
      "properties": {
        "first_seen": {
          "description": "Date the address was first observed in glue records. Absent when it was already present when tracking began.",
          "format": "date-time",
          "type": "string"
        },
        "ip": {
          "description": "IP address in canonical string form.",
          "type": "string"
        },
        "kind": {
          "description": "The kind of address: private, loopback, link-local, multicast or unspecified.",
          "type": "string"
        },
        "last_seen": {
          "description": "Date the address was last observed in glue records. Absent while it is still active.",
          "format": "date-time",
          "type": "string"
        },
        "ns_count": {
          "description": "Number of nameservers currently resolving to the address, leaving out zones we have not received in over six months (stale on /zones): the live count, which results are ranked by (most-used first).",
          "format": "int64",
          "type": "integer"
        },
        "stale_ns_count": {
          "description": "Number of nameservers resolving to the address in zones we have not received in over six months. They are left out of ns_count; ns_count + stale_ns_count is every current glue record.",
          "format": "int64",
          "type": "integer"
        },
        "version": {
          "description": "IP version: 4 or 6.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "ip",
        "version",
        "ns_count",
        "stale_ns_count"
      ],
      "type": "object"
    },
    "UnreachableGlueKind": {
      "additionalProperties": false,
      "properties": {
        "ipv4_addresses": {
          "description": "Number of IPv4 addresses of this kind with current glue.",
          "format": "int64",
          "type": "integer"
        },
        "ipv6_addresses": {
          "description": "Number of IPv6 addresses of this kind with current glue.",
          "format": "int64",
          "type": "integer"
        },
        "kind": {
          "description": "The kind of address: private, loopback, link-local, multicast or unspecified.",
          "type": "string"
        },
        "ns_count": {
          "description": "Nameservers resolving to these addresses, leaving out zones we have not received in over six months, summed over the addresses: a nameserver with two such addresses counts twice.",
          "format": "int64",
          "type": "integer"
        },
        "stale_ns_count": {
          "description": "Nameservers resolving to these addresses in zones we have not received in over six months, summed over the addresses.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "ipv4_addresses",
        "ipv6_addresses",
        "ns_count",
        "stale_ns_count"
      ],
      "type": "object"
    }
  }
}