{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/academy-software-foundation/json-schema/academy-software-foundation-host-list-schema.json",
  "title": "HostList",
  "description": "List of hosts",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/academy-software-foundation-hosts-api-openapi.yml#/components/schemas/HostList",
  "type": "object",
  "properties": {
    "hosts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Host"
      }
    }
  },
  "$defs": {
    "Host": {
      "type": "object",
      "description": "A render host machine",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique host identifier"
        },
        "name": {
          "type": "string",
          "description": "Hostname"
        },
        "state": {
          "type": "string",
          "description": "Host state",
          "enum": [
            "UP",
            "DOWN",
            "REPAIR"
          ]
        },
        "lock": {
          "type": "string",
          "description": "Host lock state",
          "enum": [
            "OPEN",
            "LOCKED",
            "NIMBY_LOCKED"
          ]
        },
        "totalCores": {
          "type": "integer",
          "description": "Total CPU cores on the host"
        },
        "idleCores": {
          "type": "integer",
          "description": "Currently idle CPU cores"
        },
        "totalMemory": {
          "type": "integer",
          "description": "Total memory in MB"
        },
        "idleMemory": {
          "type": "integer",
          "description": "Currently idle memory in MB"
        },
        "load": {
          "type": "integer",
          "description": "Current system load (percentage)"
        }
      }
    }
  }
}