POST /reservations
예약 추가 API
POST /reservations HTTP/1.1
content-type: application/json
{
"date": "2023-08-05",
"name": "브라운",
"timeId": 1
}
HTTP/1.1 201
Content-Type: application/json
{
"id": 1,
"name": "브라운",
"date": "2023-08-05",
"time" : {
"id": 1,
"startAt" : "10:00"
}
}
GET /reservations
전체 예약 조회 API
GET /reservations HTTP/1.1
HTTP/1.1 200
Content-Type: application/json
[
{
"id": 1,
"name": "브라운",
"date": "2023-08-05",
"time": {
"id": 1,
"startAt": "10:00"
}
},
{
"id": 2,
"name": "구름",
"date": "2023-08-05",
"time": {
"id": 2,
"startAt": "11:00"
}
}
]
POST /times
예약 시간 추가 API
POST /times HTTP/1.1
content-type: application/json
{
"startAt": "10:00"
}
HTTP/1.1 201
Content-Type: application/json
{
"id": 1,
"startAt": "10:00"
}
GET /times
전체 예약 시간 조회 API
GET /times HTTP/1.1
HTTP/1.1 200
Content-Type: application/json
[
{
"id": 1,
"startAt": "10:00"
},
{
"id": 2,
"startAt": "11:00"
}
]