{
  "swagger": "2.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"
  },
  "basePath": "/v2",
  "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"
    }
  ],
  "schemes": [
    "https",
    "http"
  ],
  "paths": {
    "/transaction": {
      "post": {
        "x-swagger-router-controller": "GenericController",
        "consumes": [
          "application/json"
        ],
        "description": "POST",
        "operationId": "transaction",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "Create, update and delete data using one transaction. Benefiting from commit and rollback advantages.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/transaction"
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"ID\" of address",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "CITY",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"CITY\" of address",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "COUNTRY",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"COUNTRY\" of address",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "HOUSE_NUMBER",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"HOUSE_NUMBER\" of address",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "STREET",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"STREET\" of address",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "ZIP_CODE",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"ZIP_CODE\" of address",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "$select",
            "in": "query",
            "description": "Specify one or more properties to retrieve (horizontal filtering).",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "city",
                "country",
                "house_number",
                "street",
                "zip_code"
              ]
            }
          },
          {
            "name": "$orderBy",
            "in": "query",
            "description": "\"orderBy\": to order the result asc(+) or desc(-) by columns. The '+' prefix is optional.",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "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"
              ]
            }
          },
          {
            "name": "$offsetId",
            "in": "query",
            "description": "Set offset by ID",
            "required": false,
            "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,
            "type": "array",
            "maxItems": 2,
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "collectionFormat": "csv"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
        "consumes": [
          "application/json"
        ],
        "description": "POST",
        "operationId": "main.address.post",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "Create address",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/main.address.post"
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
        "consumes": [
          "application/json"
        ],
        "description": "PATCH",
        "operationId": "main.address.patch",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "Modify address",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/main.address.patch"
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
            "type": "array",
            "description": "Get address by ID",
            "required": true,
            "uniqueItems": true,
            "in": "path",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "x-relation-schema": "main",
              "x-relation-table": "address",
              "x-relation-column": "ID"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
            "type": "array",
            "description": "Delete address by ID",
            "required": true,
            "uniqueItems": true,
            "in": "path",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "x-relation-schema": "main",
              "x-relation-table": "address",
              "x-relation-column": "ID"
            }
          }
        ],
        "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",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"ID\" of contract",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "ID_CUSTOMER",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "main.customer.id",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "DURATION_MONTHS",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"DURATION_MONTHS\" of contract",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "AMOUNT",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"AMOUNT\" of contract",
            "items": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "name": "CONTRACT_NUMBER",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"CONTRACT_NUMBER\" of contract",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "CONTRACT_DATE",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"CONTRACT_DATE\" of contract",
            "items": {
              "type": "string",
              "format": "date-time"
            },
            "minItems": 1,
            "maxItems": 2
          },
          {
            "name": "$select",
            "in": "query",
            "description": "Specify one or more properties to retrieve (horizontal filtering).",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "id_customer",
                "duration_months",
                "amount",
                "contract_number",
                "contract_date"
              ]
            }
          },
          {
            "name": "$orderBy",
            "in": "query",
            "description": "\"orderBy\": to order the result asc(+) or desc(-) by columns. The '+' prefix is optional.",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "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"
              ]
            }
          },
          {
            "name": "$offsetId",
            "in": "query",
            "description": "Set offset by ID",
            "required": false,
            "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,
            "type": "array",
            "maxItems": 2,
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "collectionFormat": "csv"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
        "consumes": [
          "application/json"
        ],
        "description": "POST",
        "operationId": "main.contract.post",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "Create contract",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/main.contract.post"
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
        "consumes": [
          "application/json"
        ],
        "description": "PATCH",
        "operationId": "main.contract.patch",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "Modify contract",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/main.contract.patch"
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
            "type": "array",
            "description": "Get contract by ID",
            "required": true,
            "uniqueItems": true,
            "in": "path",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "x-relation-schema": "main",
              "x-relation-table": "contract",
              "x-relation-column": "ID"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
            "type": "array",
            "description": "Delete contract by ID",
            "required": true,
            "uniqueItems": true,
            "in": "path",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "x-relation-schema": "main",
              "x-relation-table": "contract",
              "x-relation-column": "ID"
            }
          }
        ],
        "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",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"ID\" of customer",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "ID_ADDRESS",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "main.address.id",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          {
            "name": "EMAIL",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"EMAIL\" of customer",
            "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,}))$"
            }
          },
          {
            "name": "PHONE",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"PHONE\" of customer",
            "items": {
              "type": "string",
              "format": "phone",
              "minLength": 7,
              "maxLength": 255,
              "pattern": "^\\+(?:[0-9] ?){6,14}[0-9]$"
            }
          },
          {
            "name": "FIRST_NAME",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"FIRST_NAME\" of customer",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "LAST_NAME",
            "in": "query",
            "type": "array",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "description": "\"LAST_NAME\" of customer",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "$select",
            "in": "query",
            "description": "Specify one or more properties to retrieve (horizontal filtering).",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "id_address",
                "email",
                "phone",
                "first_name",
                "last_name"
              ]
            }
          },
          {
            "name": "$orderBy",
            "in": "query",
            "description": "\"orderBy\": to order the result asc(+) or desc(-) by columns. The '+' prefix is optional.",
            "required": false,
            "uniqueItems": true,
            "collectionFormat": "pipes",
            "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"
              ]
            }
          },
          {
            "name": "$offsetId",
            "in": "query",
            "description": "Set offset by ID",
            "required": false,
            "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,
            "type": "array",
            "maxItems": 2,
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "collectionFormat": "csv"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
        "consumes": [
          "application/json"
        ],
        "description": "POST",
        "operationId": "main.customer.post",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "Create customer",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/main.customer.post"
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
        "consumes": [
          "application/json"
        ],
        "description": "PATCH",
        "operationId": "main.customer.patch",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "Modify customer",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/main.customer.patch"
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
            "type": "array",
            "description": "Get customer by ID",
            "required": true,
            "uniqueItems": true,
            "in": "path",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "x-relation-schema": "main",
              "x-relation-table": "customer",
              "x-relation-column": "ID"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/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",
            "type": "array",
            "description": "Delete customer by ID",
            "required": true,
            "uniqueItems": true,
            "in": "path",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "x-relation-schema": "main",
              "x-relation-table": "customer",
              "x-relation-column": "ID"
            }
          }
        ],
        "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"
        ]
      }
    }
  },
  "definitions": {
    "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": "#/definitions/main.address.post"
          }
        },
        "main.address.patch": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/main.address.patch"
          }
        },
        "main.address.delete": {
          "type": "array",
          "items": {
            "properties": {
              "id": {
                "$ref": "#/definitions/main.address.get/properties/id"
              }
            }
          }
        },
        "main.contract.post": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/main.contract.post"
          }
        },
        "main.contract.patch": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/main.contract.patch"
          }
        },
        "main.contract.delete": {
          "type": "array",
          "items": {
            "properties": {
              "id": {
                "$ref": "#/definitions/main.contract.get/properties/id"
              }
            }
          }
        },
        "main.customer.post": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/main.customer.post"
          }
        },
        "main.customer.patch": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/main.customer.patch"
          }
        },
        "main.customer.delete": {
          "type": "array",
          "items": {
            "properties": {
              "id": {
                "$ref": "#/definitions/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": "#/definitions/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": "#/definitions/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": "#/definitions/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": "#/definitions/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": "#/definitions/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": "#/definitions/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"
        }
      }
    }
  },
  "securityDefinitions": {
    "ApiKeyAuth": {
      "type": "apiKey",
      "name": "x-api-key",
      "in": "header"
    },
    "BearerAuth": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ]
}
