{
  "openapi": "3.0.1",
  "info": {
    "title": "Vector Maps",
    "description": "With the Vector Maps service you can render geographical vector tiles with your own renderer.",
    "version": "1.1",
    "contact": {
      "url": "https://developer.myptv.com/"
    }
  },
  "tags": [
    {
      "name": "Vector Tiles"
    }
  ],
  "paths": {
    "/vector-tiles/{zoomLevel}/{x}/{y}": {
      "get": {
        "tags": [
          "Vector Tiles"
        ],
        "description": "Render a single vector map tile.",
        "operationId": "getVectorTile",
        "responses": {
          "200": {
            "description": "Response on success.",
            "content": {
              "application/vnd.mapbox-vector-tile": {
                "schema": {
                  "$ref": "#/components/schemas/VectorTile"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            }
          },
          "default": {
            "description": "Response on failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "zoomLevel",
          "in": "path",
          "description": "Zoom level.",
          "required": true,
          "schema": {
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "format": "int32"
          }
        },
        {
          "name": "x",
          "in": "path",
          "description": "Horizontal tile index. The valid range is between `0` and `2`^**zoomLevel** - `1`.",
          "required": true,
          "schema": {
            "minimum": 0,
            "type": "integer",
            "format": "int32"
          }
        },
        {
          "name": "y",
          "in": "path",
          "description": "Vertical tile index. The valid range is between `0` and `2`^**zoomLevel** - `1`.",
          "required": true,
          "schema": {
            "minimum": 0,
            "type": "integer",
            "format": "int32"
          }
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "VectorTile": {
        "type": "object"
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "description",
          "errorCode",
          "traceId"
        ],
        "example": {
          "traceId": "dc5b4c9a240458dd57128194dfbef0c8",
          "errorCode": "GENERAL_UNAUTHENTICATED",
          "description": "Invalid or missing authentication credentials.",
          "details": {
            "message": "Invalid API Key."
          }
        },
        "properties": {
          "description": {
            "description": "A human readable message that describes the error.",
            "type": "string"
          },
          "errorCode": {
            "description": "A constant string that can be used to identify this error class programmatically.\n\nIf additional information is available for an errorCode, it will be provided as key-value pairs with the parameter **details**. The keys available for a specific errorCode are documented directly with the errorCode. Unless stated otherwise, the values are of type string.\n\nAs an example, the following errorCode provides one key-value pair in the **details**. The key is called **message**.\n* `GENERAL_UNAUTHENTICATED` - Invalid or missing authentication credentials.\n  * `message` - An additional error message.\n\nNote that additional errorCodes as well as the **details** of existing errorCodes may be added at any time. Furthermore, the **description** may change at any time.  \n\n**HTTP status code: 400**  \n* `GENERAL_VALIDATION_ERROR` - The validation of the request failed. Details can be found in **causes**.  \n* `GENERAL_PARSING_ERROR` - The JSON syntax is invalid.  \n\n**HTTP status code: 401**  \n* `GENERAL_UNAUTHENTICATED` - Invalid or missing authentication credentials.  \n  * `message` - An additional error message.  \n\n**HTTP status code: 403**  \n* `GENERAL_FORBIDDEN` - Insufficient access rights.  \n* `GENERAL_QUOTA_EXCEEDED` - The transaction limit is exceeded.  \n  * `message` - An additional error message.  \n\n**HTTP status code: 404**  \n* `GENERAL_RESOURCE_NOT_FOUND` - A requested resource does not exist.  \n  * `message` - An additional error message.  \n\n**HTTP status code: 429**  \n* `GENERAL_RATE_LIMIT_EXCEEDED` - The rate limit is exceeded.  \n\n**HTTP status code: 500**  \n* `GENERAL_INTERNAL_SERVER_ERROR` - The request could not be processed due to an internal error.  \n  * `message` - An additional error message.  \n  * `hint` - A hint how to solve the problem.  \n\n**HTTP status code: 503**  \n* `GENERAL_SERVICE_UNAVAILABLE` - The service is temporarily unavailable.",
            "type": "string"
          },
          "traceId": {
            "description": "A unique identifier of the corresponding trace forest. It can be used to trace errors by the support.",
            "type": "string"
          },
          "errorId": {
            "description": "A unique identifier specific to this error instance. It can be used to trace errors by the support.",
            "type": "string"
          },
          "causes": {
            "description": "A list of affected parameters and/or properties that caused this error.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CausingError"
            }
          },
          "details": {
            "description": "Additional properties specific to this error class.",
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CausingError": {
        "type": "object",
        "required": [
          "description",
          "errorCode"
        ],
        "properties": {
          "description": {
            "description": "A human readable message that describes the error.",
            "type": "string"
          },
          "errorCode": {
            "description": "A constant string that can be used to identify this error class programmatically.\n\nIf additional information is available for an errorCode, it will be provided as key-value pairs with the parameter **details**. The keys available for a specific errorCode are documented directly with the errorCode. Unless stated otherwise, the values are of type string.\n\nAs an example, the following errorCode provides one key-value pair in the **details**. The key is called **value**.\n* `GENERAL_INVALID_VALUE` - A parameter is set to an invalid value.\n  * `value` - The invalid value.\n\nNote that additional errorCodes as well as the **details** of existing errorCodes may be added at any time. Furthermore, the **description** may change at any time.  \n\n**Error codes for** `GENERAL_VALIDATION_ERROR`  \n* `GENERAL_INVALID_VALUE` - A parameter is set to an invalid value.  \n  * `value` - The invalid value.  \n* `GENERAL_UNRECOGNIZED_PARAMETER` - A parameter is unknown.  \n* `GENERAL_MINIMUM_VALUE_VIOLATED` - The minimum value of a parameter is violated.  \n  * `minimumValue` - The minimum value (integer or double).  \n* `GENERAL_MAXIMUM_VALUE_VIOLATED` - The maximum value of a parameter is violated.  \n  * `maximumValue` - The maximum value (integer or double).  \n* `GENERAL_DUPLICATE_PARAMETER` - A parameter is duplicated.",
            "type": "string"
          },
          "parameter": {
            "description": "The name of the affected query or path parameter or a JSONPath to the affected property of the request.",
            "type": "string"
          },
          "details": {
            "description": "Additional properties specific to this error class.",
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    },
    "headers": {
      "Cache-Control": {
        "schema": {
          "type": "string",
          "description": "Cache control header."
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "apiKey"
      }
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.myptv.com/maps/v1"
    }
  ]
}
