{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "urn:exploder-kit:keys:1",
 "title": "The keys plan",
 "description": "keys.json: every key binding with its context, group and action. A key means one thing in each context.",
 "type": "object",
 "required": [
  "version",
  "contexts",
  "groups",
  "bindings"
 ],
 "properties": {
  "version": {
   "type": "string"
  },
  "contexts": {
   "type": "array",
   "minItems": 1,
   "items": {
    "type": "object",
    "required": [
     "id",
     "name",
     "when"
    ],
    "properties": {
     "id": {
      "enum": [
       "validate",
       "round",
       "inside",
       "fly",
       "global",
       "assets"
      ]
     },
     "name": {
      "type": "string"
     },
     "when": {
      "type": "string"
     }
    }
   }
  },
  "groups": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "name"
    ]
   }
  },
  "bindings": {
   "type": "array",
   "minItems": 1,
   "items": {
    "type": "object",
    "required": [
     "key",
     "context",
     "group",
     "action",
     "label"
    ],
    "properties": {
     "key": {
      "type": "string"
     },
     "context": {
      "type": "string"
     },
     "group": {
      "type": "string"
     },
     "action": {
      "type": "string",
      "pattern": "^[a-zA-Z]+$"
     },
     "label": {
      "type": "string"
     }
    }
   }
  },
  "results": {
   "type": "object",
   "description": "the words a key shows when it acts (toasts)"
  }
 }
}