{
  "$ref": "#/definitions/context-set",
  "definitions": {
    "context-set": {
      "type": "object",
      "properties": {
        "v": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+$"
        },
        "id": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "type": {
          "type": "string",
          "const": "context.set"
        },
        "ts": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "sid": {
          "type": "string",
          "minLength": 16,
          "maxLength": 128
        },
        "replyTo": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "payload": {
          "type": "object",
          "properties": {
            "rev": {
              "type": "integer",
              "minimum": 0
            },
            "url": {
              "type": "string",
              "maxLength": 2048
            },
            "resource": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "title": {
                  "type": "string",
                  "maxLength": 500
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            "selection": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 8192
                },
                "ref": {
                  "type": "string",
                  "maxLength": 512
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": false
            },
            "view": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "maxLength": 1024
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "rev"
          ],
          "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/context-set.json"
}
