{
  "swagger": "2.0",
  "info": {
    "description": "Web tools api documentation.",
    "version": "1.0",
    "title": "Release11 Web Tools"
  },
  "host": "tools.zipper.release11.com",
  "schemes": [
    "http",
    "https"
  ],
  "tags": [
    {
      "name": "XPath",
      "description": "XPath processing API"
    },
    {
      "name": "XSLT",
      "description": "XSLT processing API"
    },
    {
      "name": "XSD",
      "description": "XSD verification API"
    },
    {
      "name": "Mocked events",
      "description": "Mocked events controller"
    },
    {
      "name": "Mocked services",
      "description": "Mocked services controller"
    },
    {
      "name": "XML Formatter",
      "description": "XML formatting API"
    }
  ],
  "paths": {
    "/api/event": {
      "post": {
        "tags": [
          "Mocked events"
        ],
        "summary": "Filter History",
        "operationId": "filterHistoryUsingPOST",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "event",
            "description": "event",
            "required": true,
            "schema": {
              "$ref": "#/definitions/EventRequestDto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ResponseEntity"
            }
          },
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/event/{uuid}/{messageId}": {
      "get": {
        "tags": [
          "Mocked events"
        ],
        "summary": "Get last day",
        "operationId": "getLastDayUsingGET",
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "description": "messageId",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "uuid",
            "in": "path",
            "description": "uuid",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ResponseEntity"
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/mock": {
      "put": {
        "tags": [
          "Mocked services"
        ],
        "summary": "Update message",
        "operationId": "updateMessageUsingPUT",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "body",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          },
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/mock/": {
      "get": {
        "tags": [
          "Mocked services"
        ],
        "summary": "Get list of messages",
        "operationId": "getListOfMessagesUsingGET",
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "name": "uuidValue",
            "in": "path",
            "description": "uuidValue",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MockedMessageDto"
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/mock/r/{clientUUID}/{mockedResponseId}": {
      "get": {
        "tags": [
          "Mocked services"
        ],
        "summary": "Get response from mocked service",
        "operationId": "getMockedResponseUsingGET",
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "clientUUID",
            "in": "path",
            "description": "clientUUID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "DELETE",
              "GET",
              "HEAD",
              "OPTIONS",
              "PATCH",
              "POST",
              "PUT",
              "TRACE"
            ]
          },
          {
            "name": "mockedResponseId",
            "in": "path",
            "description": "mockedResponseId",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uri"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ResponseEntity"
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/mock/{uuidValue}": {
      "get": {
        "tags": [
          "Mocked services"
        ],
        "summary": "Get list of messages",
        "operationId": "getListOfMessagesUsingGET_1",
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "name": "uuidValue",
            "in": "path",
            "description": "uuidValue",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MockedMessageDto"
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "post": {
        "tags": [
          "Mocked services"
        ],
        "summary": "addNewMessage",
        "operationId": "addNewMessageUsingPOST",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "name": "uuidValue",
            "in": "path",
            "description": "uuidValue",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          },
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/mock/{uuidValue}/{idValue}": {
      "delete": {
        "tags": [
          "Mocked services"
        ],
        "summary": "Remove message",
        "operationId": "removeMessageUsingDELETE",
        "produces": [
          "*/*"
        ],
        "parameters": [
          {
            "name": "idValue",
            "in": "path",
            "description": "idValue",
            "required": true,
            "type": "string"
          },
          {
            "name": "uuidValue",
            "in": "path",
            "description": "uuidValue",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          },
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/json/formatting": {
      "post": {
        "tags": [
          "JSON"
        ],
        "summary": "Json validation and formatting.",
        "description": "",
        "operationId": "json",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "A transform that is to be performed",
            "required": true,
            "schema": {
              "example": "{'a': 'b', 'c': 'd'}"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Formatted JSON",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Error message from json formatting.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/json/minimize": {
      "post": {
        "tags": [
          "JSON"
        ],
        "summary": "Json validation and minimize formatting.",
        "description": "",
        "operationId": "json",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "A transform that is to be performed",
            "required": true,
            "schema": {
              "example": "{'a': 'b', 'c': 'd'}"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Formatted JSON",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Error message from json formatting.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/xpath": {
      "post": {
        "tags": [
          "XPath"
        ],
        "summary": "Perform XPath transform on XML file",
        "description": "",
        "operationId": "xpath",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "A transform that is to be performed",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RequestXPath"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/XPathResponse"
              }
            }
          },
          "400": {
            "description": "Invalid status value",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ResponseError"
              }
            }
          }
        }
      }
    },
    "/xslt": {
      "post": {
        "tags": [
          "XSLT"
        ],
        "summary": "Perform XSLT transform on XML file",
        "description": "",
        "operationId": "xslt",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "A transform that is to be performed",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RequestXSLT"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Response"
              }
            }
          },
          "400": {
            "description": "Invalid status value",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ResponseError"
              }
            }
          }
        }
      }
    },
    "/xsd": {
      "post": {
        "tags": [
          "XSD"
        ],
        "summary": "Verify XML file using XSD",
        "description": "",
        "operationId": "xsd",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "A XML that is to be verified",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RequestXSD"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/XSDResponse"
              }
            }
          },
          "400": {
            "description": "Invalid status value",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/XSDError"
              }
            }
          }
        }
      }
    },
    "/minimize": {
      "post": {
        "tags": [
          "XML Formatter"
        ],
        "summary": "Minimize given XML (only libxml)",
        "description": "Removes any unneeded whitespace from given xml file",
        "operationId": "minimize",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "A XML to minimize",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RequestPrettify"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MinimizedResponse"
              }
            }
          },
          "400": {
            "description": "Invalid status value",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/XSDError"
              }
            }
          }
        }
      }
    },
    "/prettify": {
      "post": {
        "tags": [
          "XML Formatter"
        ],
        "summary": "Prettify given XML (only libxml)",
        "description": "Removes any unneeded whitespace from given xml file",
        "operationId": "minimize",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "A XML to prettify",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RequestMinimize"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MinimizedResponse"
              }
            }
          },
          "400": {
            "description": "Invalid status value",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/XSDError"
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "EventRequestDto": {
      "type": "object",
      "properties": {
        "clientUUID": {
          "type": "string",
          "format": "uuid"
        },
        "localDateTimeFrom": {
          "type": "string",
          "format": "date-time"
        },
        "localDateTimeTo": {
          "type": "string",
          "format": "date-time"
        },
        "mockedResponseId": {
          "type": "integer",
          "format": "int32"
        }
      },
      "title": "EventRequestDto"
    },
    "MockedMessageDto": {
      "type": "object",
      "required": [
        "mockedResponseId"
      ],
      "properties": {
        "clientUUID": {
          "type": "string",
          "format": "uuid"
        },
        "httpHeaders": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "httpStatus": {
          "type": "integer",
          "format": "int32"
        },
        "mediaType": {
          "type": "string"
        },
        "messageBody": {
          "type": "string"
        },
        "mockedResponseId": {
          "type": "integer",
          "format": "int32"
        }
      },
      "title": "MockedMessageDto"
    },
    "ResponseEntity": {
      "type": "object",
      "properties": {
        "body": {
          "type": "object"
        },
        "statusCode": {
          "type": "string",
          "enum": [
            "ACCEPTED",
            "ALREADY_REPORTED",
            "BAD_GATEWAY",
            "BAD_REQUEST",
            "BANDWIDTH_LIMIT_EXCEEDED",
            "CHECKPOINT",
            "CONFLICT",
            "CONTINUE",
            "CREATED",
            "DESTINATION_LOCKED",
            "EXPECTATION_FAILED",
            "FAILED_DEPENDENCY",
            "FORBIDDEN",
            "FOUND",
            "GATEWAY_TIMEOUT",
            "GONE",
            "HTTP_VERSION_NOT_SUPPORTED",
            "IM_USED",
            "INSUFFICIENT_SPACE_ON_RESOURCE",
            "INSUFFICIENT_STORAGE",
            "INTERNAL_SERVER_ERROR",
            "I_AM_A_TEAPOT",
            "LENGTH_REQUIRED",
            "LOCKED",
            "LOOP_DETECTED",
            "METHOD_FAILURE",
            "METHOD_NOT_ALLOWED",
            "MOVED_PERMANENTLY",
            "MOVED_TEMPORARILY",
            "MULTIPLE_CHOICES",
            "MULTI_STATUS",
            "NETWORK_AUTHENTICATION_REQUIRED",
            "NON_AUTHORITATIVE_INFORMATION",
            "NOT_ACCEPTABLE",
            "NOT_EXTENDED",
            "NOT_FOUND",
            "NOT_IMPLEMENTED",
            "NOT_MODIFIED",
            "NO_CONTENT",
            "OK",
            "PARTIAL_CONTENT",
            "PAYLOAD_TOO_LARGE",
            "PAYMENT_REQUIRED",
            "PERMANENT_REDIRECT",
            "PRECONDITION_FAILED",
            "PRECONDITION_REQUIRED",
            "PROCESSING",
            "PROXY_AUTHENTICATION_REQUIRED",
            "REQUESTED_RANGE_NOT_SATISFIABLE",
            "REQUEST_ENTITY_TOO_LARGE",
            "REQUEST_HEADER_FIELDS_TOO_LARGE",
            "REQUEST_TIMEOUT",
            "REQUEST_URI_TOO_LONG",
            "RESET_CONTENT",
            "SEE_OTHER",
            "SERVICE_UNAVAILABLE",
            "SWITCHING_PROTOCOLS",
            "TEMPORARY_REDIRECT",
            "TOO_EARLY",
            "TOO_MANY_REQUESTS",
            "UNAUTHORIZED",
            "UNAVAILABLE_FOR_LEGAL_REASONS",
            "UNPROCESSABLE_ENTITY",
            "UNSUPPORTED_MEDIA_TYPE",
            "UPGRADE_REQUIRED",
            "URI_TOO_LONG",
            "USE_PROXY",
            "VARIANT_ALSO_NEGOTIATES"
          ]
        },
        "statusCodeValue": {
          "type": "integer",
          "format": "int32"
        }
      },
      "title": "ResponseEntity"
    },
    "RequestXPath": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "example": "28",
          "description": "The XML data to be processed"
        },
        "process": {
          "type": "string",
          "example": "count(//value)",
          "description": "XPath tranform to be executed"
        },
        "processor": {
          "type": "string",
          "enum": [
            "saxon",
            "xalan"
          ]
        },
        "version": {
          "type": "string",
          "enum": [
            "2.0",
            "3.0",
            "3.1"
          ]
        }
      }
    },
    "RequestXSLT": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "example": "28",
          "description": "The XML data to be processed"
        },
        "process": {
          "type": "string",
          "example": "count(//value)",
          "description": "XSLT tranform to be executed"
        },
        "processor": {
          "type": "string",
          "enum": [
            "saxon",
            "xalan"
          ]
        },
        "version": {
          "type": "string",
          "enum": [
            "2.0",
            "3.0",
            "3.1"
          ]
        }
      }
    },
    "RequestXSD": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "example": "28",
          "description": "The XML data to be processed"
        },
        "process": {
          "type": "string",
          "example": " ",
          "description": "XSD to perform verification with"
        },
        "processor": {
          "type": "string",
          "enum": [
            "saxon",
            "xalan"
          ]
        },
        "version": {
          "type": "string",
          "enum": [
            "2.0",
            "3.0",
            "3.1"
          ]
        }
      }
    },
    "Response": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "example": "4",
          "description": "Result of performing transformation on provided XML"
        },
        "time": {
          "type": "string",
          "example": "320",
          "description": "Computation time in milliseconds"
        },
        "processor": {
          "type": "string",
          "enum": [
            "Saxon 10.3 2.0 over s9api",
            "Xalan Java 2.7.2",
            "libXml over lxml"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "OK"
          ]
        }
      }
    },
    "XPathResponse": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "example": "4",
          "description": "Result of performing transformation on provided XML"
        },
        "time": {
          "type": "string",
          "example": "320",
          "description": "Computation time in milliseconds"
        },
        "processor": {
          "type": "string",
          "enum": [
            "Saxon 10.3 2.0 over s9api",
            "Xalan Java 2.7.2",
            "libXml over lxml"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "OK"
          ]
        },
        "type": {
          "type": "string",
          "description": "Optional. Specifies type of data returned by Xalan or libXML."
        }
      }
    },
    "ResponseError": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "example": "Concatenation operator ('||') requires XPath 3.0 to be enabled",
          "description": "Error from XPath processor"
        },
        "time": {
          "type": "string",
          "example": "40",
          "description": "Computation time in milliseconds"
        },
        "processor": {
          "type": "string",
          "enum": [
            "Saxon 10.3 2.0 over s9api",
            "Xalan Java 2.7.2",
            "libXml over lxml"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "ERR"
          ]
        }
      }
    },
    "XSDResponse": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "example": "XML file is valid",
          "description": "Validation result"
        },
        "time": {
          "type": "string",
          "example": "7",
          "description": "Computation time in milliseconds"
        },
        "processor": {
          "type": "string",
          "enum": [
            "Xalan Java 2.7.2"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "OK"
          ]
        }
      }
    },
    "XSDError": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "example": "The end-tag for element type \"xs:complexType\" must end with a '>' delimiter.",
          "description": "Validation result"
        },
        "time": {
          "type": "string",
          "example": "7",
          "description": "Computation time in milliseconds"
        },
        "processor": {
          "type": "string",
          "enum": [
            "Xalan Java 2.7.2"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "ERR"
          ]
        }
      }
    },
    "RequestPrettify": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "example": "28",
          "description": "The XML data to be prettified"
        },
        "process": {
          "type": "string",
          "example": "",
          "description": "Unused here, required only to use same json for whole project"
        },
        "processor": {
          "type": "string",
          "enum": [
            "libxml"
          ]
        },
        "version": {
          "type": "string",
          "enum": [
            "1.0"
          ]
        }
      }
    },
    "RequestMinimize": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "example": "28",
          "description": "The XML data to be minimized"
        },
        "process": {
          "type": "string",
          "example": "",
          "description": "Unused here, required only to use same json for whole project"
        },
        "processor": {
          "type": "string",
          "enum": [
            "libxml"
          ]
        },
        "version": {
          "type": "string",
          "enum": [
            "1.0"
          ]
        }
      }
    },
    "PrettifiedResponse": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "example": "\\n\\t2\\n\\t8\\n",
          "description": "Prettified XML"
        },
        "time": {
          "type": "string",
          "example": "320",
          "description": "Computation time in milliseconds"
        },
        "processor": {
          "type": "string",
          "enum": [
            "libXml over lxml"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "OK"
          ]
        }
      }
    },
    "MinimizedResponse": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "example": "28",
          "description": "Result of minimized provided XML"
        },
        "time": {
          "type": "string",
          "example": "320",
          "description": "Computation time in milliseconds"
        },
        "processor": {
          "type": "string",
          "enum": [
            "libXml over lxml"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "OK"
          ]
        }
      }
    }
  },
  "externalDocs": {
    "description": "Find out more about Swagger",
    "url": "http://swagger.io"
  }
}