{
  "$comment": "generated by canon-docs, do not edit",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://beyond10x.github.io/canon/schemas/authority-1.schema.json",
  "title": "canon-authority/1",
  "description": "A list of `AuthorityDecision` entries. One entry of a `canon-authority/1` document: a capability and whether it is granted. A capability decided twice is refused, whatever the decision; the JSON Schema cannot express that, and refuses only an entry repeated exactly.",
  "type": "array",
  "items": {
    "$ref": "#/$defs/AuthorityDecision"
  },
  "uniqueItems": true,
  "$defs": {
    "Identifier": {
      "description": "A well-formed identifier is not empty, and without whitespace, control characters or Unicode format characters (general category Cf). The pattern checks only for whitespace; Canon also refuses control and Unicode format characters.",
      "type": "string",
      "minLength": 1,
      "pattern": "^\\S+$"
    },
    "AuthorityDecision": {
      "description": "One entry of a `canon-authority/1` document: a capability and whether it is granted.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "capability": {
          "description": "The capability decided, an identifier an action's `requires` may name.",
          "$ref": "#/$defs/Identifier"
        },
        "decision": {
          "description": "Whether it is granted.",
          "$ref": "#/$defs/Grant"
        }
      },
      "required": [
        "capability",
        "decision"
      ]
    },
    "Grant": {
      "description": "An authority decision on one capability. With its precondition `true`, an action is `admissible` when every capability it requires is granted, `blocked` when one is denied, and `approval-required` when none is denied and one is not decided.",
      "enum": [
        "granted",
        "denied"
      ]
    }
  }
}
