ERD

image.png

API

기능 HTTP 메서드 URL 요청 응답
채팅방 생성 POST /api/chatRoom Header
{”Authorization” : JWT 토큰}
RequetBody
{ “title” : 방 이름(String).
”password” : 비밀번호(String),
”maxParticipants” : 최대 정원(int)} 200 OK
{ “id” : 채팅방 ID,
”title” : 방 이름,
”isSecret” : 비공개 여부,
”maxParticipants” : 최대 정원,
”wsURL” : 웹소켓 요청 URL}
채팅방 전체 조회 GET /api/chatRoom Header
{”Authorization” : JWT 토큰}
RequestParam
page : 페이지 번호(int)
size : 페이지 크기(int) 200 OK
{ “id” : 채팅방 ID,
”title” : 방 이름,
”isSecret” : 비공개 여부,
”curParticipants” : 현재 입장 유저,
”maxParticipants” : 최대 정원}
채팅방 정보 수정 PUT /api/chatRoom/{chatRoomId} Header
{”Authorization” : JWT 토큰}
PathVariable
chatRoomId : 채팅방 ID(Long)
RequetBody
{ “title” : 방 이름(String).
”password” : 비밀번호(String),
”maxParticipants” : 최대 정원(int)} 200 OK
{ “id” : 채팅방 ID,
”title” : 방 이름,
”isSecret” : 비공개 여부,
”maxParticipants” : 최대 정원,
”wsURL” : 웹소켓 요청 URL}
채팅방 입장 POST /api/chatRoom/{chatRoomId} Header
{”Authorization” : JWT 토큰}
PathVariable
chatRoomId : 채팅방 ID(Long)
RequetBody
{ ”password” : 비밀번호(String)} 200 OK
채팅방 유저 조회 GET /api/chatRoom/{chatRoomId} Header
{”Authorization” : JWT 토큰} 200 OK
채팅 메세지 전송 POST /api/chatRoom/{chatRoomId}/messages Header
{”Authorization” : JWT 토큰}
PathVariable
chatRoomId : 채팅방 ID(Long)
RequestBody
content : 메세지 내용(String) 200 OK
{”id” : 메세지 id,
”content” : 메세지 내용,
”user” :
{“id” : 발행 유저 ID,
 “email” : 발행 유저 email},

”createdAt” : 발행일시 } | | 채팅 메세지 다건 조회 | GET | /api/chatRoom/{chatRoomId} | Header {”Authorization” : JWT 토큰} PathVariable chatRoomId : 채팅방 ID(Long) | 200 OK [{”id” : 메세지 id, ”content” : 메세지 내용, ”user” : {“id” : 발행 유저 ID, “email” : 발행 유저 email}, ”createdAt” : 발행일시 }, {”id” : 메세지 id, ”content” : 메세지 내용, ”user” : {“id” : 발행 유저 ID, “email” : 발행 유저 email}, ”createdAt” : 발행일시 }, …] |

https://youtu.be/eQ9taVGyayc?si=5aG0yvxU9Ta7A43M