Search
Duplicate
📽️

Issue Tracker

1. 프로젝트 결과

가. 깃헙 저장소

나. API 문서

2. DB 설계

가. DB 개념적 설계

1) 엔티티

사용자
이슈
레이블
마일스톤
코멘트
이모지

2) ERD

나. DB 논리적 설계

1) 스키마

3. API 설계

고민할 부분

도메인의 개수에 대한 정보는 어떻게 제공할까?
→ 하나의 DTO로 통채로 전달
→ 프런트에서 기존의 전체 조회 요청을 가공해서 카운트만 뽑아내는 방법
작성자, 담당자의 정보를 어떻게 관리할까?
→ 컨트리뷰터 엔티티 생성 필요

가. 로그인

1) 임시승인코드 요청

query param: client_id, redirect_uri, scope
response

2) JWT 요청

요청경로: /api/login/auth
query param: client, code
response
{ "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiTWFuamluIEJhZSIsImlzcyI6ImFpcmJuYiIsImlkIjoxNjY5NDM0NiwiZXhwIjoxNjIzMjE4MjEzfQ.Qu6NOrKdeWGwfVFH8b_-V6IcDSPxNzUwusXN57m9UQs" }
JSON
복사

나. 이슈

1) 이슈 전체 조회

요청경로: GET, /api/issues
response
[ { "title": "이슈 제목", "author_avatar_url": "https://테스트.png", "label_list": [ { "title": "test-label", "color_code": "#34f71" }, { - 반복 - } ], "issue_number": 3, "created_time": "2021-06-21 12:11", "milestone_title": "마스터즈 코스" }, { - 반복 - } ]
JSON
복사

2) 이슈 상세 조회

요청경로: GET, /api/issues/{id}
response
{ "title": "FE 이슈트래커 디자인 시스템 구현", "description": "처음부터 구현 하지 말라", "assignee": 3, // user_id "created_time": "2021-06-08 16:25", "closed": false, "milestone": { "title": "마일스톤 타이틀입니다", "opened_issue_count": 2, "closed_issue_count": 3 }, "author_user_id": 35462432, "issue_number": 2, "label_list": [ { "title": "test-label", "color_code": "#34f64" }, { - 반복 - } ] }
JSON
복사

3) 이슈 검색

요청경로: GET, api/issues?
closed=true or false
author="MJ"
label="document"
milestone="1st_week"
assignee="Kyu"
comment="본인"

2) 이슈 삭제

요청경로: PATCH, /api/issues/{id}
request
{ "deleted": true }
Shell
복사

3) 이슈 클로즈

단일 이슈 클로즈: PATCH, /api/issues/{id}
복수 이슈 클로즈: PATCH, /api/issues 고민이필요?
request
{ "closed": true }
JSON
복사

4) 이슈 생성

담당자 선택: GET, /api/assignees
레이블 선택: GET, /api/labels
마일스톤 선택: GET, /api/milestones
파일 첨부하기: POST, /api/images // 무슨 의미였지?
{ "image_id": 44 }
JSON
복사
이슈 생성 (완료버튼)
POST, /api/issues
request 클라이언트단에 말해주 이미지 관련 - 다시 이야기..image_url은 필요없어보임 \
{ "title": "BE test", "description": "hello ![](이미지주소) world", "assignee": 54432321, // user_id "label_ids": [2], // label_id "milestone_id": 34, // milestone_id }
JSON
복사

5) 이슈 수정

제목 수정: PATCH, /api/issues/{id}
{ "title": "수정된 타이틀이 여기에 들어갑니다" }
Shell
복사
내용 수정: PATCH, /api/issues/{id}
{ "description": "수정된 디스크립션이 여기에 들어갑니다" }
Shell
복사
담당자 수정: PATCH, /api/issues/{id}
{ "assignee": 482930 // user_id }
Shell
복사
레이블 수정: PATCH, /api/issues/{id}
{ "label": [2, 5, 44] // label_id }
Shell
복사
마일스톤 수정: PATCH, /api/issues/{id}
{ "milestone": 1 // milestone_id }
Shell
복사

6) 이슈 카운트

요청경로: GET, /api/issues/count
response
{ "opened_issue_count": 3, "closed_issue_count": 0 }
JSON
복사

다. 이미지

1) 이미지 생성

이미지 저장 주소 반환

라. 마일스톤

1) 마일스톤 전체 조회

요청경로: GET, /api/milestones

2) 마일스톤 생성

요청경로: POST, /api/milestones
request
{ "title": "입력한 타이틀이 여기에 들어갑니다", "description": "입력한 디스크립션이 여기에 들어갑니다", "due_date": "2021-06-08" }
Shell
복사

3) 마일스톤 삭제

요청경로: DELETE, /api/milestones/{id}

4) 마일스톤 카운트

요청경로: GET, /api/milestones/count
response
{ "count": 3 }
JSON
복사

5) 마일스톤 수정

요청경로: PUT, /api/milestones/{id}
request
{ "title": "수정된 타이틀이 여기에 들어가요", "description": "수정된 디스크립션이 여기에 들어가요", "due_date": "2021-12-11" }
Shell
복사

마. 코멘트

1) 코멘트 생성

2) 코멘트 조회

요청경로: GET, /api/issues/{issue_id}/comments
response 왜 아바타 url이 두개지
[ { "description": "코멘트1", "created_time": "2021-06-08 20:36" "user": { "name": "어텀", "avatar_url": "https://테스트.png" "editable": true // 프론트에서 필요하다고 함 } }, { - 반복 - } ]
Shell
복사

3) 코멘트 카운트

요청경로: GET, /api/comments/count // 프론트는 렌더링 할수있다, 아이작 상관없다, 줘도 안쓴닼ㅋㅋ MJ왈: 저도 빼도 괜찮다고 생각합니다 무슨 렌더링 이야기..
{ "count": 3 }
JSON
복사

4) 코멘트 편집 (디스크립션만 바뀐다)

요청경로: PATCH, /api/comments/{id}
{ "description": "바뀐 디스크립션이 들어갑니다" }
JSON
복사

바. 레이블

1) 레이블 전체 조회

요청경로: GET, /api/labels

2) 레이블 생성

요청경로: POST, /api/labels
request
{ "title": "test-label", "description": "테스트를 하는 라벨입니다", "color_code": "#34f71" }
Shell
복사

3) 레이블 수정

요청경로: PUT, /api/labels/{id}
request
{ "title": "edited-title", "description": "수정된 디스크립션이 여기에 적힙니다", "color_code": "#00000" }
Shell
복사

4) 레이블 카운트

요청경로: GET, /api/labels/count
response
{ "count": 3 }
JSON
복사

5) 레이블 삭제

요청경로: DELETE, /api/labels/{id}