{"openapi":"3.0.0","info":{"version":"1.0.0","title":"API","description":"Для работы с расписанием и базой пользователей"},"paths":{"/seances":{"get":{"summary":"Получить список сеансов","responses":{"200":{"description":"Список сеансов","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"movieId":{"type":"integer"},"hallId":{"type":"integer"},"startTime":{"type":"string","format":"date-time"}}}}}}}}}},"/seances/{seanceId}/seats":{"get":{"summary":"Получить список мест на сеанс","parameters":[{"name":"seanceId","in":"path","required":true,"description":"ID сеанса","schema":{"type":"integer"}}],"responses":{"200":{"description":"Список мест","content":{"application/json":{"schema":{"type":"object","properties":{"seanceId":{"type":"integer"},"seats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"row":{"type":"integer"},"seat":{"type":"integer"},"IsBooked":{"type":"boolean","enum":[true,false]}}}}}}}}},"404":{"description":"Сеанс не найден"}}}},"/reservations":{"post":{"summary":"Создать бронирование","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["seanceId","seatId","userName","userEmail"],"properties":{"seanceId":{"type":"integer"},"seatId":{"type":"integer"},"userName":{"type":"string"},"userEmail":{"type":"string","format":"email"}}}}}},"responses":{"201":{"description":"Бронирование создано","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"seanceId":{"type":"integer"},"seatId":{"type":"integer"},"userName":{"type":"string"},"userEmail":{"type":"string"},"status":{"type":"boolean","enum":[true,false]}}}}}},"400":{"description":"Некорректный запрос"},"409":{"description":"Место уже занято"}}}},"/reservations/{reservationId}":{"delete":{"summary":"Удалить бронирование","parameters":[{"name":"reservationId","in":"path","required":true,"description":"ID бронирования","schema":{"type":"integer"}}],"responses":{"200":{"description":"Бронирование отменено"},"404":{"description":"Бронирование не найдено"}}}},"/seances/{seanceId}":{"put":{"summary":"Изменить время сеанса (администратор)","parameters":[{"name":"seanceId","in":"path","required":true,"description":"ID сеанса","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["startTime"],"properties":{"startTime":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Время сеанса обновлено"},"404":{"description":"Сеанс не найден"}}}}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/dddf-1e3/CP-API/1.0.0"}]}