{
  "openapi": "3.1.0",
  "info": {
    "title": "Mesto API",
    "version": "1.0.0",
    "description": "Публичные справочники личного веб-проекта о местах и маршрутах. Доступ только для чтения."
  },
  "servers": [
    {
      "url": "https://api-123219307.mooo.com"
    }
  ],
  "paths": {
    "/api/v1/status.json": {
      "get": {
        "operationId": "getStatus",
        "summary": "Информация о версии API",
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/places.json": {
      "get": {
        "operationId": "getPlaces",
        "summary": "Каталог мест",
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Places"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/collections.json": {
      "get": {
        "operationId": "getCollections",
        "summary": "Тематические подборки",
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collections"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Status": {
        "type": "object",
        "required": [
          "status",
          "project",
          "api_version",
          "access"
        ],
        "properties": {
          "status": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "api_version": {
            "type": "string"
          },
          "access": {
            "type": "string"
          }
        }
      },
      "Meta": {
        "type": "object",
        "required": [
          "count",
          "updated_at"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "Place": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "tags"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Collection": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "place_ids"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "place_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Places": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Place"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "Collections": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Collection"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      }
    }
  }
}
