Feature/#65 카테고리 등록 조회 수정 삭제 rest docs 작성#70
Open
Conversation
sjmoon00
requested changes
Feb 8, 2026
Contributor
sjmoon00
left a comment
There was a problem hiding this comment.
수고하셨습니다~
카테고리랑 분과랑 복사하는 과정에서 오타가 있는것 같습니다~
Comment on lines
36
to
37
| public class ContestTrackApiDocs extends RestDocsTest { | ||
|
|
Contributor
There was a problem hiding this comment.
클래스명에 Test 접미사가 누락된 것 같습니다
Comment on lines
77
to
78
| willThrow(new ContestCategoryException(CATEGORY_NAME_ALREADY_EXIST)).given(contestTrackCommandService) | ||
| .createTrack(any(), any()); |
Contributor
There was a problem hiding this comment.
ContestTrackException이 발생하지 않을까 생각합니다
| headerWithName(HttpHeaders.AUTHORIZATION).description("Bearer {accessToken} (관리자)") | ||
| ), | ||
| requestFields( | ||
| stringFieldWithPath("trackName", "카테고리 이름") |
Comment on lines
138
to
139
| @DisplayName("[성공] 유효한 요청이면 대회 카테고리 전체 조회는 성공한다.") | ||
| void 유효한_요청이면_대회_카테고리_전체_조회는_성공한다() throws Exception { |
|
|
||
| @Test | ||
| @DisplayName("[실패] 이미 카테고리 이름이 존재한다면 에러를 반환한다.") | ||
| void 이미_카테코리_이름이_존재한다면_에러를_반환한다() throws Exception { |
|
|
||
| ==== ⚠️ 실패 케이스 | ||
|
|
||
| .❌ Case 1: 동일한 카테고리 이름 존재 |
|
|
||
| == `PATCH`: 대회 분과 수정 | ||
|
|
||
| NOTE: 대회 분과 생성과 동일하게 이미 저장되어 있는 카테고리 이름은 저장 불가 |
- ContestTrackApiDocs -> ContestTrackApiDocsTest
pykido
reviewed
Feb 8, 2026
Contributor
pykido
left a comment
There was a problem hiding this comment.
수고하셨습니다! 간단한 리뷰 확인 부탁드려요~!
| .HTTP Response | ||
| include::{snippets}/delete-contest-category/http-response.adoc[] | ||
|
|
||
| .Path Parameters |
Contributor
There was a problem hiding this comment.
API 명세서를 보면 보통 아래와 같은 순서인데 Path Parameters를 Response보다 앞쪽에 배치시키는건 어떤가요-?
- Request Header
- Path Parameters
- Request Fields
- Response
| void 유효한_요청이면_대회_분과_생성은_성공한다() throws Exception { | ||
| doNothing().when(contestTrackCommandService).createTrack(any(), any()); | ||
|
|
||
| mockMvc.perform(post("/contests/{contestId}/tracks", 1) |
Contributor
There was a problem hiding this comment.
매직 넘버를 사용하기보다 아래와 같이 변수를 사용하는건 어떨까요~?
private static final Long CONTEST_ID = 1L;
private static final Long TRACK_ID = 1L;
Collaborator
Author
There was a problem hiding this comment.
좋은 방식인 것 같습니다!
그런데 현재 다른 모든 코드에서 urlVariables를 매직넘버를 사용하고 있어서 전체적인 수정이 필요해보입니다.
해당 부분은 추후 good first issue로 만들어서 수정하는 것은 어떨까요??
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔥 연관된 이슈
close: #65
close: #66
close: #67
📜 작업 내용
💬 리뷰 요구사항
✨ 기타