{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://interchange.stellarview.net/schemas/alert_route.schema.json",
  "title": "A route: for each role, the channel an alert goes out on",
  "type": "object",
  "required": ["id", "by_role"],
  "additionalProperties": false,
  "properties": {
    "id": { "type": "string" },
    "about": { "type": "string" },
    "by_role": {
      "type": "object",
      "minProperties": 1,
      "additionalProperties": {
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "object",
          "required": ["channel", "address"],
          "additionalProperties": false,
          "properties": {
            "channel": { "type": "string", "description": "A channel adapter id (stub-email, stub-sms, stub-chat, jira)." },
            "address": { "type": "string", "description": "A role address. Never a person's real address in this repo." }
          }
        }
      }
    }
  }
}
