{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/rancher/refs/heads/main/json-schema/rancher-node.json",
  "title": "Rancher Node",
  "description": "Schema describing a node registered with a Rancher-managed cluster.",
  "type": "object",
  "properties": {
    "id": { "type": "string" },
    "clusterId": { "type": "string" },
    "hostname": { "type": "string" },
    "ipAddress": { "type": "string" },
    "state": { "type": "string", "enum": ["registering", "active", "cordoned", "draining", "error", "removing"] },
    "roles": {
      "type": "array",
      "items": { "type": "string", "enum": ["controlplane", "etcd", "worker"] }
    },
    "info": { "type": "object" }
  },
  "required": ["id", "clusterId"]
}
