할일을 작성하고 관리하는 앱
할일을 작성하고 관리하는 REST API 입니다. 기본 CRUD 기능을 포함합니다
추가사항
- 기존의 JDBC 로 데이터베이스 액세스하던 방식에서 JPA 를 사용하는 방식으로 변경되었습니다
- Member / Comment 에 대한 CRUD
- 로그인/로그아웃 기능
리포지토리 클론:
git clone https://github.com/Seungmin-J/todo-api-jpa.gitTodo API 명세서
| Method | URL | Request Body | Response | Status |
|---|---|---|---|---|
POST |
/todos |
json { "title": "제목","contents": "내용","createdAt": "LocalDateTime 일정 생성 시간", "editedAt": "LocalDateTime 일정 수정 시간" } |
TodoResponseDto | CREATED : 201 BAD_REQUEST : 400 |
| Method | URL | Request Param | Request Body | Response | Status |
|---|---|---|---|---|---|
GET |
/todos |
page: 페이지 |
- | Page<TodoResponseDto> | OK : 200 |
| Method | URL | PathVariable | Request Body | Response | Status |
|---|---|---|---|---|---|
GET |
/todos/{id} |
id: 조회할 일정의 ID |
- | TodoResponseWithCommentsDto | OK : 200 NOT_FOUND : 404 |
| Method | URL | PathVariable | Request Body | Response | Status |
|---|---|---|---|---|---|
PUT |
/todos/{id} |
id: 수정할 일정의 ID |
json { "contents": "내용" } |
TodoResponseDto | OK : 200 NOT_FOUND : 404 |
| Method | URL | PathVariable | Response | Status |
|---|---|---|---|---|
DELETE |
/todos/{id} |
id: 삭제할 일정의 ID |
- | OK : 200 BAD_REQUEST : 400 |
Member API 명세서
| Method | URL | Request Body | Response | Status |
|---|---|---|---|---|
POST |
/members/signup |
json {"memberName": "이름","email": "이메일","password": "비밀번호"} |
MemberResponseDto | OK : 200 BAD_REQUEST : 400 |
| Method | URL | PathVariable | Request Body | Response | Status |
|---|---|---|---|---|---|
GET |
/members/{id} |
id: 조회할 회원의 ID |
- | MemberResponseDto | OK : 200 NOT_FOUND : 404 |
| Method | URL | Request Param | Request Body | Response | Status |
|---|---|---|---|---|---|
GET |
/members |
- | - | List<MemberResponseDto> | OK : 200 |
| Method | URL | PathVariable | Request Body | Response | Status |
|---|---|---|---|---|---|
PUT |
/members/{id} |
id: 수정할 회원의 ID |
json {"memberName": "이름","email": "이메일","password": "비밀번호"} |
MemberResponseDto | OK : 200 NOT_FOUND : 404 |
| Method | URL | PathVariable | Response | Status |
|---|---|---|---|---|
DELETE |
/members/{id} |
id: 삭제할 회원의 ID |
- | OK : 200 BAD_REQUEST : 400 |
| Method | URL | Request Body | Response | Status |
|---|---|---|---|---|
POST |
/members/login |
json {"email": "이메일","password": "비밀번호"} |
"로그인 성공" |
OK : 200 UNAUTHORIZED : 401 |
| Method | URL | Request Body | Response | Status |
|---|---|---|---|---|
POST |
/members/logout |
- | "로그아웃 되었습니다." |
OK : 200 |
Comment API 명세서
| Method | URL | PathVariable | Request Body | Response | Status |
|---|---|---|---|---|---|
POST |
/todos/{todoId}/comments |
todoId: 댓글을 추가할 Todo의 ID |
json {"contents": "댓글 내용"} |
CommentResponseDto | OK : 200 UNAUTHORIZED : 401 |
| Method | URL | PathVariable | Request Body | Response | Status |
|---|---|---|---|---|---|
GET |
/comments/{commentId} |
commentId: 조회할 댓글의 ID |
- | CommentResponseDto | OK : 200 NOT_FOUND : 404 |
| Method | URL | PathVariable | Request Body | Response | Status |
|---|---|---|---|---|---|
PUT |
/comments/{commentId} |
commentId: 수정할 댓글의 ID |
json {"contents": "수정된 댓글 내용"} |
UpdateCommentResponseDto | OK : 200 UNAUTHORIZED : 401 NOT_FOUND : 404 |
| Method | URL | PathVariable | Response | Status |
|---|---|---|---|---|
DELETE |
/comments/{commentId} |
commentId: 삭제할 댓글의 ID |
- | OK : 200 UNAUTHORIZED : 401 NOT_FOUND : 404 |
- Email: seungmin103@gmail.com
- GitHub: Seungmin-J
