{
  "title": "UNICA API Errors v1",
  "oneOf" : [
    {
      "title": "ClientExceptionType",
      "type": "object",
      "additionalProperties": false,
      "required": ["ClientException"],
      "properties": {
        "ClientException": {
          "type": "object",
          "required": ["exceptionCategory", "exceptionId", "text"],
          "properties": {
            "exceptionCategory": {
              "type": "string",
              "pattern": "^SVC|POL|SEC$"
            },
            "exceptionId": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9999
            },
            "text": {
              "type": "string",
              "minLength": 0
            },
            "variables": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    {
      "title": "ServerExceptionType",
      "type": "object",
      "additionalProperties": false,
      "required": ["ServerException"],
      "properties": {
        "ServerException": {
          "type": "object",
          "required": ["exceptionCategory", "exceptionId", "text"],
          "properties": {
            "exceptionCategory": {
              "type": "string",
              "pattern": "^SVR$"
            },
            "exceptionId": {
              "type": "integer"
            },
            "text": {
              "type": "string",
              "minLength": 0
            },
            "variables": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  ]
}
