{
  "$ref": "#/definitions/ui-request",
  "definitions": {
    "ui-request": {
      "type": "object",
      "properties": {
        "v": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+$"
        },
        "id": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "type": {
          "type": "string",
          "const": "ui.request"
        },
        "ts": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "sid": {
          "type": "string",
          "minLength": 16,
          "maxLength": 128
        },
        "replyTo": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "payload": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string",
              "minLength": 10,
              "maxLength": 64
            },
            "kind": {
              "type": "string",
              "enum": [
                "confirm",
                "choice",
                "notice"
              ]
            },
            "title": {
              "type": "string",
              "maxLength": 200
            },
            "body": {
              "type": "string",
              "maxLength": 2000
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "id",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "expiresAt": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "actionId": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "kind",
            "title",
            "expiresAt"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "v",
        "id",
        "type",
        "ts",
        "payload"
      ],
      "additionalProperties": true
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schwaizer.ch/ocp/schemas/1.0/ui-request.json"
}
