{
  "$ref": "#/definitions/error-message",
  "definitions": {
    "error-message": {
      "type": "object",
      "properties": {
        "v": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+$"
        },
        "id": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "type": {
          "type": "string",
          "const": "error"
        },
        "ts": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "sid": {
          "type": "string",
          "minLength": 16,
          "maxLength": 128
        },
        "replyTo": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "payload": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "AUTH_EXPIRED",
                "SCOPE_DENIED",
                "RATE_LIMITED",
                "NONCE_USED",
                "SESSION_GONE",
                "TURN_ABORTED",
                "CONTEXT_TOO_LARGE",
                "PAIR_DENIED",
                "UNSUPPORTED",
                "INTERNAL"
              ]
            },
            "message": {
              "type": "string",
              "maxLength": 500
            },
            "retryable": {
              "type": "boolean"
            },
            "details": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "required": [
            "code",
            "message",
            "retryable"
          ],
          "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/error-message.json"
}
