{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zh-ch/json-schema/zh-ch-collector-cfg-schema.json",
  "title": "CollectorCfg",
  "description": "Collector configuration.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zh-ch-traffic-counts-openapi.yml#/components/schemas/CollectorCfg",
  "type": "object",
  "properties": {
    "uID": {
      "$ref": "#/$defs/UniqueID"
    },
    "name": {
      "type": "string",
      "description": "The name of the collector."
    },
    "collectorStatus": {
      "type": "string",
      "description": "The status of the collector."
    },
    "detectors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DetectorCfg"
      }
    },
    "uid": {
      "$ref": "#/$defs/UniqueID"
    }
  },
  "$defs": {
    "DetectorCfg": {
      "type": "object",
      "properties": {
        "uID": {
          "$ref": "#/$defs/UniqueID"
        },
        "name": {
          "type": "string",
          "description": "The name of the detector."
        },
        "uid": {
          "$ref": "#/$defs/UniqueID"
        }
      },
      "description": "Detector configuration."
    },
    "UniqueID": {
      "required": [
        "id"
      ],
      "type": "object",
      "properties": {
        "id": {
          "pattern": "^[^#/]+$",
          "type": "string"
        },
        "sub": {
          "$ref": "#/$defs/UniqueID"
        }
      }
    }
  }
}