Skip to content

Feature/#65 카테고리 등록 조회 수정 삭제 rest docs 작성#70

Open
JJimini wants to merge 14 commits intodevelopfrom
Feature/#65-카테고리_등록_조회_수정_삭제_Rest_Docs_작성

Hidden character warning

The head ref may contain hidden characters: "Feature/#65-\uce74\ud14c\uace0\ub9ac_\ub4f1\ub85d_\uc870\ud68c_\uc218\uc815_\uc0ad\uc81c_Rest_Docs_\uc791\uc131"
Open

Feature/#65 카테고리 등록 조회 수정 삭제 rest docs 작성#70
JJimini wants to merge 14 commits intodevelopfrom
Feature/#65-카테고리_등록_조회_수정_삭제_Rest_Docs_작성

Conversation

@JJimini
Copy link
Collaborator

@JJimini JJimini commented Feb 4, 2026

🔥 연관된 이슈

close: #65
close: #66
close: #67

📜 작업 내용

  • 카테고리 등록, 전체 조회, 수정, 삭제 API docs 작성
  • 대회 등록, 전체 조회, 수정, 삭제 API docs 작성
  • 분과 등록, 전체 조회, 수정, 삭제 API docs 작성

💬 리뷰 요구사항

  • 3개 issue 한방에 했습니당
  • 작성하면서 발견한 자잘한 수정사항들도 수정했습니다!

✨ 기타

  • 100줄은 넘지만.. 이미 개발 완료된 API의 docs만 작성한 거라서 간단 수정 라벨 달았습니다~!
  • 저도 다시 확인은 했는데, 복붙하면서 작업해서 오타가 있을 수도..?

@JJimini JJimini self-assigned this Feb 4, 2026
@JJimini JJimini added the 🕐 간단 수정 수정 코드 100줄 이하의 간단한 수정 label Feb 4, 2026
Copy link
Contributor

@sjmoon00 sjmoon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~
카테고리랑 분과랑 복사하는 과정에서 오타가 있는것 같습니다~

Comment on lines 36 to 37
public class ContestTrackApiDocs extends RestDocsTest {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

클래스명에 Test 접미사가 누락된 것 같습니다

Comment on lines 77 to 78
willThrow(new ContestCategoryException(CATEGORY_NAME_ALREADY_EXIST)).given(contestTrackCommandService)
.createTrack(any(), any());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ContestTrackException이 발생하지 않을까 생각합니다

headerWithName(HttpHeaders.AUTHORIZATION).description("Bearer {accessToken} (관리자)")
),
requestFields(
stringFieldWithPath("trackName", "카테고리 이름")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오타인것 같습니다~

Comment on lines 138 to 139
@DisplayName("[성공] 유효한 요청이면 대회 카테고리 전체 조회는 성공한다.")
void 유효한_요청이면_대회_카테고리_전체_조회는_성공한다() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

메서드명, @DisplayName에 카테고리라는 명칭이 잘못 들어간것 같습니다


@Test
@DisplayName("[실패] 이미 카테고리 이름이 존재한다면 에러를 반환한다.")
void 이미_카테코리_이름이_존재한다면_에러를_반환한다() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

카테코리 오타 있습니다 😄


==== ⚠️ 실패 케이스

.❌ Case 1: 동일한 카테고리 이름 존재
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

동일한 대회명인것 같습니다


== `PATCH`: 대회 분과 수정

NOTE: 대회 분과 생성과 동일하게 이미 저장되어 있는 카테고리 이름은 저장 불가
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 분과 이름인것 같습니다

@JJimini JJimini requested a review from sjmoon00 February 8, 2026 10:55
Copy link
Contributor

@pykido pykido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 간단한 리뷰 확인 부탁드려요~!

.HTTP Response
include::{snippets}/delete-contest-category/http-response.adoc[]

.Path Parameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API 명세서를 보면 보통 아래와 같은 순서인데 Path Parameters를 Response보다 앞쪽에 배치시키는건 어떤가요-?

  1. Request Header
  2. Path Parameters
  3. Request Fields
  4. Response

void 유효한_요청이면_대회_분과_생성은_성공한다() throws Exception {
doNothing().when(contestTrackCommandService).createTrack(any(), any());

mockMvc.perform(post("/contests/{contestId}/tracks", 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

매직 넘버를 사용하기보다 아래와 같이 변수를 사용하는건 어떨까요~?

private static final Long CONTEST_ID = 1L;
private static final Long TRACK_ID = 1L;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 방식인 것 같습니다!
그런데 현재 다른 모든 코드에서 urlVariables를 매직넘버를 사용하고 있어서 전체적인 수정이 필요해보입니다.
해당 부분은 추후 good first issue로 만들어서 수정하는 것은 어떨까요??

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니다~!!

Copy link
Contributor

@sjmoon00 sjmoon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🕐 간단 수정 수정 코드 100줄 이하의 간단한 수정

Projects

None yet

3 participants