{
  "$id": "https://curveballjs.org/schemas/a12nserver/principal-patch-privilege.json",
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "additionalProperties": false,
  "description": "This object is a request body for patching a principal's ACL.",
  "properties": {
    "action": {
      "const": "add",
      "description": "Indicates that a privilege was added"
    },
    "privilege": {
      "description": "The name of the privilege, for example 'write' or 'read'",
      "type": "string"
    },
    "resource": {
      "description": "The resource on which the user is receiving the privilege for. This should be a URI or '*'",
      "oneOf": [
        {
          "const": "*"
        },
        {
          "format": "uri",
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "action",
    "privilege",
    "resource"
  ],
  "type": "object"
}