{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/packetrove-com/json-schema/packetrove-com-cidr-cover-result-schema.json",
  "title": "CidrCoverResult",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/packetrove-com-openapi.json#/components/schemas/CidrCoverResult",
  "type": "object",
  "properties": {
    "family": {
      "type": "string",
      "enum": [
        "ipv4",
        "ipv6"
      ]
    },
    "normalizedInputs": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "minItems": 1,
      "maxItems": 1000,
      "description": "Canonical CIDRs in input order. Individual addresses become /32 or /128. Duplicates are retained here."
    },
    "cidr": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The smallest single canonical CIDR containing every input address."
    },
    "range": {
      "type": "object",
      "properties": {
        "first": {
          "type": "string",
          "minLength": 1
        },
        "last": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "first",
        "last"
      ],
      "additionalProperties": false
    },
    "inputAddressCount": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$",
      "description": "Number of distinct addresses in the union of the inputs."
    },
    "coveredAddressCount": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$",
      "description": "Number of all addresses in the resulting CIDR."
    },
    "additionalAddressCount": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$",
      "description": "Covered address count minus input address count."
    }
  },
  "required": [
    "family",
    "normalizedInputs",
    "cidr",
    "range",
    "inputAddressCount",
    "coveredAddressCount",
    "additionalAddressCount"
  ],
  "additionalProperties": false
}