{
  "openapi": "3.0.0",
  "info": {
    "description": "A deterministic data API contract generated by Artificial Interface.",
    "version": "1.0.0",
    "title": "Artificial Interface Data API",
    "contact": {
      "email": "bjoernberger.io@gmail.com"
    },
    "x-generator-version": "1.0.76"
  },
  "externalDocs": {
    "description": "Artificial Interface - API Documentation",
    "url": "https://artificial-interface.site/documentation.html"
  },
  "tags": [
    {
      "name": "transaction",
      "description": "Definition of transaction"
    },
    {
      "name": "main.address",
      "description": "Definition of address",
      "x-database-schema": "main",
      "x-database-table": "address"
    },
    {
      "name": "main.contract",
      "description": "Definition of contract",
      "x-database-schema": "main",
      "x-database-table": "contract"
    },
    {
      "name": "main.customer",
      "description": "Definition of customer",
      "x-database-schema": "main",
      "x-database-table": "customer"
    }
  ],
  "paths": {
    "/transaction": {
      "post": {
        "x-swagger-router-controller": "GenericController",
        "description": "POST",
        "operationId": "transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/transaction"
                }
              }
            }
          },
          "description": "Create, update and delete data using one transaction. Benefiting from commit and rollback advantages.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/transaction"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "POST Request to create & update one or more data using one transaction",
        "tags": [
          "transaction"
        ]
      }
    },
    "/main/address": {
      "get": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "address",
        "description": "GET",
        "operationId": "main.address.get",
        "parameters": [
          {
            "name": "ID",
            "in": "query",
            "required": false,
            "description": "\"ID\" of address",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "uniqueItems": true
            }
          },
          {
            "name": "CITY",
            "in": "query",
            "required": false,
            "description": "\"CITY\" of address",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "COUNTRY",
            "in": "query",
            "required": false,
            "description": "\"COUNTRY\" of address",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "HOUSE_NUMBER",
            "in": "query",
            "required": false,
            "description": "\"HOUSE_NUMBER\" of address",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "STREET",
            "in": "query",
            "required": false,
            "description": "\"STREET\" of address",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "ZIP_CODE",
            "in": "query",
            "required": false,
            "description": "\"ZIP_CODE\" of address",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$select",
            "in": "query",
            "description": "Specify one or more properties to retrieve (horizontal filtering).",
            "required": false,
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "id",
                  "city",
                  "country",
                  "house_number",
                  "street",
                  "zip_code"
                ]
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$orderBy",
            "in": "query",
            "description": "\"orderBy\": to order the result asc(+) or desc(-) by columns. The '+' prefix is optional.",
            "required": false,
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "-id",
                  "+id",
                  "id",
                  "-city",
                  "+city",
                  "city",
                  "-country",
                  "+country",
                  "country",
                  "-house_number",
                  "+house_number",
                  "house_number",
                  "-street",
                  "+street",
                  "street",
                  "-zip_code",
                  "+zip_code",
                  "zip_code"
                ]
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$offsetId",
            "in": "query",
            "description": "Set offset by ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "$limit",
            "in": "query",
            "description": "Limit the amount of fetched items and specify the amount of skipped items",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              },
              "maxItems": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.address.get"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "Search and sort address by its parameters. Pagination is also supported.",
        "tags": [
          "main.address"
        ]
      },
      "post": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "address",
        "description": "POST",
        "operationId": "main.address.post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/main.address.post"
                }
              }
            }
          },
          "description": "Create address",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.address.post"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "POST Request to create one or more address",
        "tags": [
          "main.address"
        ]
      },
      "patch": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "address",
        "description": "PATCH",
        "operationId": "main.address.patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/main.address.patch"
                }
              }
            }
          },
          "description": "Modify address",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.address.patch"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "PATCH request to update one or more address. Fields omitted from the request remain unchanged.",
        "tags": [
          "main.address"
        ]
      }
    },
    "/main/address/{ID}": {
      "get": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "address",
        "description": "GET by ID",
        "operationId": "main.address.getById",
        "parameters": [
          {
            "name": "ID",
            "description": "Get address by ID",
            "required": true,
            "in": "path",
            "style": "simple",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1,
                "x-relation-schema": "main",
                "x-relation-table": "address",
                "x-relation-column": "ID"
              },
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.address.get"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "GET Request to get one or more address by ID",
        "tags": [
          "main.address"
        ]
      },
      "delete": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "address",
        "description": "DELETE by ID",
        "operationId": "main.address.deleteById",
        "parameters": [
          {
            "name": "ID",
            "description": "Delete address by ID",
            "required": true,
            "in": "path",
            "style": "simple",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1,
                "x-relation-schema": "main",
                "x-relation-table": "address",
                "x-relation-column": "ID"
              },
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "DELETE Request to delete one or more address by ID",
        "tags": [
          "main.address"
        ]
      }
    },
    "/main/contract": {
      "get": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "contract",
        "description": "GET",
        "operationId": "main.contract.get",
        "parameters": [
          {
            "name": "ID",
            "in": "query",
            "required": false,
            "description": "\"ID\" of contract",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "uniqueItems": true
            }
          },
          {
            "name": "ID_CUSTOMER",
            "in": "query",
            "required": false,
            "description": "main.customer.id",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "uniqueItems": true
            }
          },
          {
            "name": "DURATION_MONTHS",
            "in": "query",
            "required": false,
            "description": "\"DURATION_MONTHS\" of contract",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "uniqueItems": true
            }
          },
          {
            "name": "AMOUNT",
            "in": "query",
            "required": false,
            "description": "\"AMOUNT\" of contract",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "number",
                "format": "float"
              },
              "uniqueItems": true
            }
          },
          {
            "name": "CONTRACT_NUMBER",
            "in": "query",
            "required": false,
            "description": "\"CONTRACT_NUMBER\" of contract",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "CONTRACT_DATE",
            "in": "query",
            "required": false,
            "description": "\"CONTRACT_DATE\" of contract",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "date-time"
              },
              "minItems": 1,
              "maxItems": 2,
              "uniqueItems": true
            }
          },
          {
            "name": "$select",
            "in": "query",
            "description": "Specify one or more properties to retrieve (horizontal filtering).",
            "required": false,
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "id",
                  "id_customer",
                  "duration_months",
                  "amount",
                  "contract_number",
                  "contract_date"
                ]
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$orderBy",
            "in": "query",
            "description": "\"orderBy\": to order the result asc(+) or desc(-) by columns. The '+' prefix is optional.",
            "required": false,
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "-id",
                  "+id",
                  "id",
                  "-id_customer",
                  "+id_customer",
                  "id_customer",
                  "-duration_months",
                  "+duration_months",
                  "duration_months",
                  "-amount",
                  "+amount",
                  "amount",
                  "-contract_number",
                  "+contract_number",
                  "contract_number",
                  "-contract_date",
                  "+contract_date",
                  "contract_date"
                ]
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$offsetId",
            "in": "query",
            "description": "Set offset by ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "$limit",
            "in": "query",
            "description": "Limit the amount of fetched items and specify the amount of skipped items",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              },
              "maxItems": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.contract.get"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "Search and sort contract by its parameters. Pagination is also supported.",
        "tags": [
          "main.contract"
        ]
      },
      "post": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "contract",
        "description": "POST",
        "operationId": "main.contract.post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/main.contract.post"
                }
              }
            }
          },
          "description": "Create contract",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.contract.post"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "POST Request to create one or more contract",
        "tags": [
          "main.contract"
        ]
      },
      "patch": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "contract",
        "description": "PATCH",
        "operationId": "main.contract.patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/main.contract.patch"
                }
              }
            }
          },
          "description": "Modify contract",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.contract.patch"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "PATCH request to update one or more contract. Fields omitted from the request remain unchanged.",
        "tags": [
          "main.contract"
        ]
      }
    },
    "/main/contract/{ID}": {
      "get": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "contract",
        "description": "GET by ID",
        "operationId": "main.contract.getById",
        "parameters": [
          {
            "name": "ID",
            "description": "Get contract by ID",
            "required": true,
            "in": "path",
            "style": "simple",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1,
                "x-relation-schema": "main",
                "x-relation-table": "contract",
                "x-relation-column": "ID"
              },
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.contract.get"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "GET Request to get one or more contract by ID",
        "tags": [
          "main.contract"
        ]
      },
      "delete": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "contract",
        "description": "DELETE by ID",
        "operationId": "main.contract.deleteById",
        "parameters": [
          {
            "name": "ID",
            "description": "Delete contract by ID",
            "required": true,
            "in": "path",
            "style": "simple",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1,
                "x-relation-schema": "main",
                "x-relation-table": "contract",
                "x-relation-column": "ID"
              },
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "DELETE Request to delete one or more contract by ID",
        "tags": [
          "main.contract"
        ]
      }
    },
    "/main/customer": {
      "get": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "customer",
        "description": "GET",
        "operationId": "main.customer.get",
        "parameters": [
          {
            "name": "ID",
            "in": "query",
            "required": false,
            "description": "\"ID\" of customer",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "uniqueItems": true
            }
          },
          {
            "name": "ID_ADDRESS",
            "in": "query",
            "required": false,
            "description": "main.address.id",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "uniqueItems": true
            }
          },
          {
            "name": "EMAIL",
            "in": "query",
            "required": false,
            "description": "\"EMAIL\" of customer",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "email",
                "minLength": 5,
                "maxLength": 255,
                "pattern": "^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"
              },
              "uniqueItems": true
            }
          },
          {
            "name": "PHONE",
            "in": "query",
            "required": false,
            "description": "\"PHONE\" of customer",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "phone",
                "minLength": 7,
                "maxLength": 255,
                "pattern": "^\\+(?:[0-9] ?){6,14}[0-9]$"
              },
              "uniqueItems": true
            }
          },
          {
            "name": "FIRST_NAME",
            "in": "query",
            "required": false,
            "description": "\"FIRST_NAME\" of customer",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "LAST_NAME",
            "in": "query",
            "required": false,
            "description": "\"LAST_NAME\" of customer",
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$select",
            "in": "query",
            "description": "Specify one or more properties to retrieve (horizontal filtering).",
            "required": false,
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "id",
                  "id_address",
                  "email",
                  "phone",
                  "first_name",
                  "last_name"
                ]
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$orderBy",
            "in": "query",
            "description": "\"orderBy\": to order the result asc(+) or desc(-) by columns. The '+' prefix is optional.",
            "required": false,
            "style": "pipeDelimited",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "-id",
                  "+id",
                  "id",
                  "-id_address",
                  "+id_address",
                  "id_address",
                  "-email",
                  "+email",
                  "email",
                  "-phone",
                  "+phone",
                  "phone",
                  "-first_name",
                  "+first_name",
                  "first_name",
                  "-last_name",
                  "+last_name",
                  "last_name"
                ]
              },
              "uniqueItems": true
            }
          },
          {
            "name": "$offsetId",
            "in": "query",
            "description": "Set offset by ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "$limit",
            "in": "query",
            "description": "Limit the amount of fetched items and specify the amount of skipped items",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              },
              "maxItems": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.customer.get"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "Search and sort customer by its parameters. Pagination is also supported.",
        "tags": [
          "main.customer"
        ]
      },
      "post": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "customer",
        "description": "POST",
        "operationId": "main.customer.post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/main.customer.post"
                }
              }
            }
          },
          "description": "Create customer",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.customer.post"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "POST Request to create one or more customer",
        "tags": [
          "main.customer"
        ]
      },
      "patch": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "customer",
        "description": "PATCH",
        "operationId": "main.customer.patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/main.customer.patch"
                }
              }
            }
          },
          "description": "Modify customer",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.customer.patch"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "PATCH request to update one or more customer. Fields omitted from the request remain unchanged.",
        "tags": [
          "main.customer"
        ]
      }
    },
    "/main/customer/{ID}": {
      "get": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "customer",
        "description": "GET by ID",
        "operationId": "main.customer.getById",
        "parameters": [
          {
            "name": "ID",
            "description": "Get customer by ID",
            "required": true,
            "in": "path",
            "style": "simple",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1,
                "x-relation-schema": "main",
                "x-relation-table": "customer",
                "x-relation-column": "ID"
              },
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/main.customer.get"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "GET Request to get one or more customer by ID",
        "tags": [
          "main.customer"
        ]
      },
      "delete": {
        "x-swagger-router-controller": "GenericController",
        "x-database-schema": "main",
        "x-database-table": "customer",
        "description": "DELETE by ID",
        "operationId": "main.customer.deleteById",
        "parameters": [
          {
            "name": "ID",
            "description": "Delete customer by ID",
            "required": true,
            "in": "path",
            "style": "simple",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64",
                "minimum": 1,
                "x-relation-schema": "main",
                "x-relation-table": "customer",
                "x-relation-column": "ID"
              },
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "summary": "DELETE Request to delete one or more customer by ID",
        "tags": [
          "main.customer"
        ]
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "transaction": {
        "description": "Transaction based request. Executes all request within on database transaction.",
        "type": "object",
        "example": {
          "main.address.post": [
            {
              "id": 123,
              "city": "Abc",
              "country": "Abc",
              "house_number": "Abc",
              "street": "Abc",
              "zip_code": "Abc"
            }
          ],
          "main.address.patch": [
            {
              "id": 123,
              "city": "Abc",
              "country": "Abc",
              "house_number": "Abc",
              "street": "Abc",
              "zip_code": "Abc"
            }
          ],
          "main.address.delete": [
            {
              "id": 123
            }
          ],
          "main.contract.post": [
            {
              "id": 123,
              "id_customer": 123,
              "duration_months": 123,
              "amount": 56.7,
              "contract_number": "Abc",
              "contract_date": "2017-07-21T17:32:28Z"
            }
          ],
          "main.contract.patch": [
            {
              "id": 123,
              "id_customer": 123,
              "duration_months": 123,
              "amount": 56.7,
              "contract_number": "Abc",
              "contract_date": "2017-07-21T17:32:28Z"
            }
          ],
          "main.contract.delete": [
            {
              "id": 123
            }
          ],
          "main.customer.post": [
            {
              "id": 123,
              "id_address": 123,
              "email": "user@mail.com",
              "phone": "+491234567890",
              "first_name": "Abc",
              "last_name": "Abc"
            }
          ],
          "main.customer.patch": [
            {
              "id": 123,
              "id_address": 123,
              "email": "user@mail.com",
              "phone": "+491234567890",
              "first_name": "Abc",
              "last_name": "Abc"
            }
          ],
          "main.customer.delete": [
            {
              "id": 123
            }
          ]
        },
        "properties": {
          "main.address.post": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/main.address.post"
            }
          },
          "main.address.patch": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/main.address.patch"
            }
          },
          "main.address.delete": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/main.address.get/properties/id"
                }
              }
            }
          },
          "main.contract.post": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/main.contract.post"
            }
          },
          "main.contract.patch": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/main.contract.patch"
            }
          },
          "main.contract.delete": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/main.contract.get/properties/id"
                }
              }
            }
          },
          "main.customer.post": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/main.customer.post"
            }
          },
          "main.customer.patch": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/main.customer.patch"
            }
          },
          "main.customer.delete": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/main.customer.get/properties/id"
                }
              }
            }
          }
        }
      },
      "main.address.get": {
        "type": "object",
        "x-database-schema": "main",
        "x-database-table": "address",
        "example": {
          "id": 123,
          "city": "Abc",
          "country": "Abc",
          "house_number": "Abc",
          "street": "Abc",
          "zip_code": "Abc"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "address",
            "x-relation-column": "id",
            "description": "main.address.id"
          },
          "city": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "CITY"
          },
          "country": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "COUNTRY"
          },
          "house_number": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "HOUSE_NUMBER"
          },
          "street": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "STREET"
          },
          "zip_code": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "ZIP_CODE"
          }
        }
      },
      "main.address.post": {
        "type": "object",
        "x-database-table": "address",
        "x-database-schema": "main",
        "example": {
          "id": 123,
          "city": "Abc",
          "country": "Abc",
          "house_number": "Abc",
          "street": "Abc",
          "zip_code": "Abc"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "address",
            "x-relation-column": "id",
            "description": "main.address.id"
          },
          "city": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "CITY"
          },
          "country": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "COUNTRY"
          },
          "house_number": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "HOUSE_NUMBER"
          },
          "street": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "STREET"
          },
          "zip_code": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "ZIP_CODE"
          }
        }
      },
      "main.address.patch": {
        "type": "object",
        "x-database-table": "address",
        "x-database-schema": "main",
        "example": {
          "id": 123,
          "city": "Abc",
          "country": "Abc",
          "house_number": "Abc",
          "street": "Abc",
          "zip_code": "Abc"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "address",
            "x-relation-column": "id",
            "description": "main.address.id"
          },
          "city": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "CITY"
          },
          "country": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "COUNTRY"
          },
          "house_number": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "HOUSE_NUMBER"
          },
          "street": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "STREET"
          },
          "zip_code": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "ZIP_CODE"
          }
        }
      },
      "main.contract.get": {
        "type": "object",
        "x-database-schema": "main",
        "x-database-table": "contract",
        "example": {
          "id": 123,
          "id_customer": 123,
          "duration_months": 123,
          "amount": 56.7,
          "contract_number": "Abc",
          "contract_date": "2017-07-21T17:32:28Z"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "contract",
            "x-relation-column": "id",
            "description": "main.contract.id"
          },
          "id_customer": {
            "$ref": "#/components/schemas/main.customer.get/properties/id"
          },
          "duration_months": {
            "type": "integer",
            "format": "int32",
            "x-database-column": "DURATION_MONTHS"
          },
          "amount": {
            "type": "number",
            "format": "float",
            "x-database-column": "AMOUNT"
          },
          "contract_number": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "CONTRACT_NUMBER"
          },
          "contract_date": {
            "type": "string",
            "format": "date-time",
            "x-database-column": "CONTRACT_DATE"
          }
        }
      },
      "main.contract.post": {
        "type": "object",
        "x-database-table": "contract",
        "x-database-schema": "main",
        "example": {
          "id": 123,
          "id_customer": 123,
          "duration_months": 123,
          "amount": 56.7,
          "contract_number": "Abc",
          "contract_date": "2017-07-21T17:32:28Z"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "contract",
            "x-relation-column": "id",
            "description": "main.contract.id"
          },
          "id_customer": {
            "$ref": "#/components/schemas/main.customer.get/properties/id"
          },
          "duration_months": {
            "type": "integer",
            "format": "int32",
            "x-database-column": "DURATION_MONTHS"
          },
          "amount": {
            "type": "number",
            "format": "float",
            "x-database-column": "AMOUNT"
          },
          "contract_number": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "CONTRACT_NUMBER"
          },
          "contract_date": {
            "type": "string",
            "format": "date-time",
            "x-database-column": "CONTRACT_DATE"
          }
        }
      },
      "main.contract.patch": {
        "type": "object",
        "x-database-table": "contract",
        "x-database-schema": "main",
        "example": {
          "id": 123,
          "id_customer": 123,
          "duration_months": 123,
          "amount": 56.7,
          "contract_number": "Abc",
          "contract_date": "2017-07-21T17:32:28Z"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "contract",
            "x-relation-column": "id",
            "description": "main.contract.id"
          },
          "id_customer": {
            "$ref": "#/components/schemas/main.customer.get/properties/id"
          },
          "duration_months": {
            "type": "integer",
            "format": "int32",
            "x-database-column": "DURATION_MONTHS"
          },
          "amount": {
            "type": "number",
            "format": "float",
            "x-database-column": "AMOUNT"
          },
          "contract_number": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "CONTRACT_NUMBER"
          },
          "contract_date": {
            "type": "string",
            "format": "date-time",
            "x-database-column": "CONTRACT_DATE"
          }
        }
      },
      "main.customer.get": {
        "type": "object",
        "x-database-schema": "main",
        "x-database-table": "customer",
        "example": {
          "id": 123,
          "id_address": 123,
          "email": "user@mail.com",
          "phone": "+491234567890",
          "first_name": "Abc",
          "last_name": "Abc"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "customer",
            "x-relation-column": "id",
            "description": "main.customer.id"
          },
          "id_address": {
            "$ref": "#/components/schemas/main.address.get/properties/id"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "EMAIL"
          },
          "phone": {
            "type": "string",
            "format": "phone",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "PHONE"
          },
          "first_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "FIRST_NAME"
          },
          "last_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "LAST_NAME"
          }
        }
      },
      "main.customer.post": {
        "type": "object",
        "x-database-table": "customer",
        "x-database-schema": "main",
        "example": {
          "id": 123,
          "id_address": 123,
          "email": "user@mail.com",
          "phone": "+491234567890",
          "first_name": "Abc",
          "last_name": "Abc"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "customer",
            "x-relation-column": "id",
            "description": "main.customer.id"
          },
          "id_address": {
            "$ref": "#/components/schemas/main.address.get/properties/id"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "EMAIL"
          },
          "phone": {
            "type": "string",
            "format": "phone",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "PHONE"
          },
          "first_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "FIRST_NAME"
          },
          "last_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "LAST_NAME"
          }
        }
      },
      "main.customer.patch": {
        "type": "object",
        "x-database-table": "customer",
        "x-database-schema": "main",
        "example": {
          "id": 123,
          "id_address": 123,
          "email": "user@mail.com",
          "phone": "+491234567890",
          "first_name": "Abc",
          "last_name": "Abc"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "x-relation-schema": "main",
            "x-relation-table": "customer",
            "x-relation-column": "id",
            "description": "main.customer.id"
          },
          "id_address": {
            "$ref": "#/components/schemas/main.address.get/properties/id"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "EMAIL"
          },
          "phone": {
            "type": "string",
            "format": "phone",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "PHONE"
          },
          "first_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "FIRST_NAME"
          },
          "last_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "x-database-column": "LAST_NAME"
          }
        }
      }
    }
  }
}
