{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nestor.mathislambert.fr/schemas/satellite/1/manifest.json",
  "title": "Satellite manifest",
  "x-protocol": "nestor.satellite/1",
  "type": "object",
  "properties": {
    "protocol": {
      "const": "nestor.satellite/1"
    },
    "device": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
        },
        "model": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "room": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
        },
        "brand": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
        }
      },
      "required": ["id", "model", "room"],
      "additionalProperties": false
    },
    "sdk": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      },
      "required": ["name", "version"],
      "additionalProperties": false
    },
    "capabilities": {
      "type": "array",
      "maxItems": 32,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"
          }
        },
        "required": ["name"]
      }
    }
  },
  "required": ["protocol", "device"],
  "additionalProperties": false
}
