{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dns-coffee/json-schema/dns-coffee-zone-dnssec-schema.json",
  "title": "ZoneDNSSEC",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dns-coffee-openapi.yml#/components/schemas/ZoneDNSSEC",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "archive_dnskey_count": {
      "description": "Number of DNSKEYs no longer present (retired keys).",
      "format": "int64",
      "type": "integer"
    },
    "as_of": {
      "description": "Date of the zone's most recent import, which its DNSKEY and signature data reflect. A date far in the past means the posture may be out of date. The parent's DS record reflects the parent zone's most recent import.",
      "format": "date-time",
      "type": "string"
    },
    "broken": {
      "description": "True when the zone is validation-broken: for some covered apex type (SOA or DNSKEY) it publishes at least one active signature but none that is unexpired. A zone carrying a valid signature for every covered type is not broken even if it also carries an expired one.",
      "type": "boolean"
    },
    "dnskeys": {
      "description": "The zone's currently active DNSKEYs, KSKs first.",
      "items": {
        "$ref": "#/$defs/ZoneDNSKEY"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "ds_count": {
      "description": "Number of DS records published in the zone, from the latest daily rollup.",
      "format": "int64",
      "type": "integer"
    },
    "ds_domain_count": {
      "description": "Number of distinct signed domains in the zone, from the latest daily rollup.",
      "format": "int64",
      "type": "integer"
    },
    "ds_history_date": {
      "description": "Date of the rollup the DS counts come from.",
      "format": "date-time",
      "type": "string"
    },
    "parent_ds": {
      "description": "Whether the zone's parent zone (the root, for a top-level domain) currently publishes a DS record for it. Always false when the parent zone is not imported.",
      "type": "boolean"
    },
    "rrsigs": {
      "description": "The zone's currently active apex signatures, over the SOA and DNSKEY RRsets.",
      "items": {
        "$ref": "#/$defs/ZoneRRSIG"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "signed": {
      "description": "Whether the zone is currently signed: it has an active apex DNSKEY, or its parent zone (the root, for a top-level domain) publishes an active DS record for it. A zone whose files omit the apex DNSKEY still reads as signed while that DS record remains.",
      "type": "boolean"
    },
    "signed_since": {
      "description": "Earliest date the zone was observed signed: the first apex DNSKEY, or the first DS record for it in its parent zone, whichever came first. Absent for a signed zone when it was already signed when record tracking began (see tracking_since), including by keys or DS records since retired.",
      "format": "date-time",
      "type": "string"
    },
    "tracking_since": {
      "description": "Date full-record indexing (DNSSEC, SOA, and other records) began for the zone; absent when unknown. A signed zone with no signed_since was already signed by this date.",
      "format": "date-time",
      "type": "string"
    },
    "zone": {
      "description": "Zone name.",
      "type": "string"
    }
  },
  "required": [
    "signed",
    "parent_ds",
    "archive_dnskey_count",
    "broken"
  ],
  "type": "object",
  "$defs": {
    "ZoneDNSKEY": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "description": "DNSSEC algorithm number.",
          "format": "int64",
          "type": "integer"
        },
        "algorithm_name": {
          "description": "IANA registry name for the algorithm.",
          "type": "string"
        },
        "first_seen": {
          "description": "Date the key was first observed. Absent when it predates record tracking for its zone.",
          "format": "date-time",
          "type": "string"
        },
        "flags": {
          "description": "The DNSKEY flags field.",
          "format": "int64",
          "type": "integer"
        },
        "last_seen": {
          "description": "Date the key was last observed. Absent while it is still active.",
          "format": "date-time",
          "type": "string"
        },
        "protocol": {
          "description": "The DNSKEY protocol field (always 3).",
          "format": "int64",
          "type": "integer"
        },
        "public_key": {
          "description": "Base64-encoded public key.",
          "type": "string"
        },
        "role": {
          "description": "The key's role derived from its flags: KSK or ZSK, with \" (revoked)\" appended when the revoke bit is set.",
          "type": "string"
        }
      },
      "required": [
        "flags",
        "role",
        "protocol",
        "algorithm",
        "public_key"
      ],
      "type": "object"
    },
    "ZoneRRSIG": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "description": "DNSSEC algorithm number.",
          "format": "int64",
          "type": "integer"
        },
        "algorithm_name": {
          "description": "IANA registry name for the algorithm.",
          "type": "string"
        },
        "expiration": {
          "description": "Signature expiration time (UTC).",
          "format": "date-time",
          "type": "string"
        },
        "expired": {
          "description": "Whether the signature can be considered expired. Set only when it had already expired when we first received the current version of the zone file (its expiration is before the start, in UTC, of the day that SOA serial first appeared), no signature of the same covered type that we have recorded for the zone, from any version of its file, is valid now, and the zone's data is neither stale nor dead. A signature whose expiration passed only after that version arrived, or one a valid signature on record supersedes, is not flagged; its expiration is simply in the past.",
          "type": "boolean"
        },
        "first_seen": {
          "description": "Date the signature was first observed. Absent when it predates record tracking for its zone.",
          "format": "date-time",
          "type": "string"
        },
        "inception": {
          "description": "Signature inception time (UTC).",
          "format": "date-time",
          "type": "string"
        },
        "key_tag": {
          "description": "Key tag identifying the signing DNSKEY.",
          "format": "int64",
          "type": "integer"
        },
        "last_seen": {
          "description": "Date the signature was last observed. Absent while it is still active.",
          "format": "date-time",
          "type": "string"
        },
        "signer": {
          "description": "Signer name (the zone apex).",
          "type": "string"
        },
        "type_covered": {
          "description": "Mnemonic of the RR type the signature covers (SOA or DNSKEY), or the RFC 3597 TYPE<n> form for an unregistered type.",
          "type": "string"
        }
      },
      "required": [
        "type_covered",
        "algorithm",
        "key_tag",
        "signer",
        "inception",
        "expiration",
        "expired"
      ],
      "type": "object"
    }
  }
}