{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "Path": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Path is a location in the world: labels from a root organizer down, relative to the world."
    },
    "Permission": {
      "properties": {
        "kind": {
          "type": "string"
        },
        "path": {
          "$ref": "#/$defs/Path"
        }
      },
      "type": "object",
      "required": [
        "kind",
        "path"
      ],
      "description": "Permission is one grant a provisioning asks for: a kind on a subtree."
    }
  },
  "properties": {
    "operation_id": {
      "type": "string"
    },
    "project": {
      "type": "string"
    },
    "worker": {
      "type": "string"
    },
    "principal": {
      "type": "string"
    },
    "permissions": {
      "items": {
        "$ref": "#/$defs/Permission"
      },
      "type": "array"
    },
    "valid_until": {
      "type": "string"
    }
  },
  "type": "object",
  "required": [
    "operation_id",
    "project",
    "worker",
    "principal",
    "permissions",
    "valid_until"
  ],
  "title": "ProvisionWorkerRequest",
  "description": "ProvisionWorkerRequest creates a worker space under its project and issues its grants to a public key the provisioner generated into the workspace."
}
