{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/maddox/hubbo-profiles/main/docs/schema/v1/kinds.schema.json",
  "title": "Hubbo device kinds",
  "description": "The shape of kinds.json: each device kind's id, display label and the Harmony device types that map to it.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "kinds"],
  "properties": {
    "schema_version": { "const": 1 },
    "kinds": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "label", "harmony"],
        "properties": {
          "id": { "type": "string", "pattern": "^[a-z][a-z0-9_]{0,31}$" },
          "label": { "type": "string", "minLength": 1, "maxLength": 32 },
          "harmony": { "type": "array", "uniqueItems": true, "items": { "type": "integer" } }
        }
      }
    }
  }
}
