-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 개별 메뉴 조회 API 추가 및 menuUrl 필드 검증 강화 #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "20251216_#41_\uBA54\uB274_url_api\uCD94\uAC00"
Conversation
Walkthrough메뉴 단일 조회 엔드포인트 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (2)
src/main/java/com/campustable/be/domain/menu/controller/MenuController.java (1)
49-50: 경로 변수 명명 규칙의 일관성을 고려하세요.이 엔드포인트는
{menuId}(camelCase)를 사용하고 있지만, 동일한 컨트롤러의 다른 엔드포인트들은{menu_id}(snake_case, line 73, 87) 또는{cafeteria-id}(kebab-case, line 56)를 사용하고 있습니다. API 일관성을 위해 기존 패턴을 따르는 것이 좋습니다.예시:
- @GetMapping("/{menuId}") - public ResponseEntity<MenuResponse> getMenuById(@PathVariable Long menuId){ + @GetMapping("/{menu_id}") + public ResponseEntity<MenuResponse> getMenuById(@PathVariable(name = "menu_id") Long menuId){ return ResponseEntity.ok(menuService.getMenuById(menuId)); }src/main/java/com/campustable/be/domain/menu/service/MenuService.java (1)
63-64: 로그 메시지 개선이 필요합니다.두 가지 개선사항이 있습니다:
- "유효하지않은"은 띄어쓰기가 누락되었습니다. "유효하지 않은"으로 수정하세요.
- 존재하지 않는 ID는 일반적인 비즈니스 예외이므로
log.error보다는log.warn이 더 적절합니다. 동일한 파일의 line 39, 84에서도 유사한 경우에log.warn을 사용하고 있습니다.다음 diff를 적용하세요:
- log.error("getMenuById : 유효하지않은 menuId"); + log.warn("getMenuById: 유효하지 않은 menuId"); return new CustomException(ErrorCode.MENU_NOT_FOUND);
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/com/campustable/be/domain/menu/controller/MenuController.java(2 hunks)src/main/java/com/campustable/be/domain/menu/dto/MenuRequest.java(1 hunks)src/main/java/com/campustable/be/domain/menu/service/MenuService.java(3 hunks)
🔇 Additional comments (1)
src/main/java/com/campustable/be/domain/menu/service/MenuService.java (1)
38-41: 예외 처리 패턴 개선이 좋습니다.람다 내부에서 예외를 직접 throw하는 대신 예외 인스턴스를 return하도록 변경한 것은 코드 가독성 측면에서 개선입니다. 동일한 패턴이 line 85에도 일관되게 적용되었습니다.
src/main/java/com/campustable/be/domain/menu/controller/MenuController.java
Show resolved
Hide resolved
src/main/java/com/campustable/be/domain/menu/dto/MenuRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/com/campustable/be/domain/menu/service/MenuService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java(1 hunks)src/main/java/com/campustable/be/domain/menu/dto/MenuRequest.java(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/java/com/campustable/be/domain/menu/dto/MenuRequest.java
🔇 Additional comments (1)
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java (1)
18-22: LGTM! 문서화 개선이 잘 되었습니다.인터페이스 레벨의 Javadoc이 명확하게 작성되었고, 태그 설명에서 "CURD"를 "CRUD"로 올바르게 수정하였습니다.
| /** | ||
| * 시스템에 등록된 모든 메뉴 목록을 조회합니다. | ||
| * * @return 메뉴 정보 리스트를 담은 ResponseEntity | ||
| */ | ||
| @Operation(summary = "메뉴 전체 조회", description = "모든 메뉴 목록을 조회합니다.") | ||
| @ApiResponse(responseCode = "200", description = "조회 성공") | ||
| ResponseEntity<List<MenuResponse>> getAllMenus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc 형식 오류를 수정하세요.
Line 27에서 * * @return 대신 * @return으로 작성해야 합니다. 여분의 별표가 포함되어 있습니다.
* 시스템에 등록된 모든 메뉴 목록을 조회합니다.
- * * @return 메뉴 정보 리스트를 담은 ResponseEntity
+ * @return 메뉴 정보 리스트를 담은 ResponseEntity
*/🤖 Prompt for AI Agents
In
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
around lines 25 to 31, the Javadoc for the method contains an extra asterisk
sequence ("* * @return") on line 27; remove the extra asterisk so the Javadoc
tag reads " * @return" (single leading asterisk and a space before @return) to
restore proper Javadoc formatting and alignment.
| /** | ||
| * 고유 식별자를 통해 단일 메뉴의 상세 정보를 조회합니다. | ||
| * * @param menuId 조회하고자 하는 메뉴의 ID | ||
| * @return 해당 메뉴의 상세 정보를 담은 ResponseEntity | ||
| */ | ||
| @Operation(summary = "단일 메뉴 상세 조회", description = "특정 ID에 해당하는 메뉴의 상세 정보를 조회합니다.") | ||
| @ApiResponses({ | ||
| @ApiResponse(responseCode = "200", description = "조회 성공"), | ||
| @ApiResponse(responseCode = "404", description = "해당 메뉴를 찾을 수 없습니다.", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | ||
| }) | ||
| ResponseEntity<MenuResponse> getMenuById( | ||
| @Parameter(description = "조회할 메뉴 ID", example = "1") Long menuId | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc 형식 오류를 수정하세요.
Line 35에서 * * @param 대신 * @param으로 작성해야 합니다. 여분의 별표가 포함되어 있습니다.
* 고유 식별자를 통해 단일 메뉴의 상세 정보를 조회합니다.
- * * @param menuId 조회하고자 하는 메뉴의 ID
+ * @param menuId 조회하고자 하는 메뉴의 ID
* @return 해당 메뉴의 상세 정보를 담은 ResponseEntity그 외 API 문서화는 잘 작성되었습니다.
🤖 Prompt for AI Agents
In
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
around lines 33 to 46, the Javadoc for getMenuById contains an extra asterisk in
the param tag ("* * @param") which breaks Javadoc formatting; remove the extra
asterisk so the tag reads " * @param menuId 조회하고자 하는 메뉴의 ID" (i.e., a single
leading " * " before @param) and ensure the Javadoc block alignment remains
consistent.
| /** | ||
| * 특정 카테고리에 속한 모든 메뉴를 조회합니다. | ||
| * * @param categoryId 카테고리 고유 식별자 | ||
| * @return 해당 카테고리의 메뉴 리스트를 담은 ResponseEntity | ||
| */ | ||
| @Operation(summary = "카테고리별 메뉴 조회", description = "특정 카테고리 ID에 해당하는 메뉴 목록을 조회합니다.") | ||
| @ApiResponses({ | ||
| @ApiResponse(responseCode = "200", description = "조회 성공"), | ||
| @ApiResponse(responseCode = "404", description = "해당 카테고리를 찾을 수 없습니다.", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | ||
| }) | ||
| ResponseEntity<List<MenuResponse>> getAllMenusByCategoryId( | ||
| @Parameter(description = "조회할 카테고리 ID", example = "1") Long categoryId | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc 형식 오류를 수정하세요.
Line 50에서 * * @param 대신 * @param으로 작성해야 합니다.
* 특정 카테고리에 속한 모든 메뉴를 조회합니다.
- * * @param categoryId 카테고리 고유 식별자
+ * @param categoryId 카테고리 고유 식별자
* @return 해당 카테고리의 메뉴 리스트를 담은 ResponseEntity📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /** | |
| * 특정 카테고리에 속한 모든 메뉴를 조회합니다. | |
| * * @param categoryId 카테고리 고유 식별자 | |
| * @return 해당 카테고리의 메뉴 리스트를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "카테고리별 메뉴 조회", description = "특정 카테고리 ID에 해당하는 메뉴 목록을 조회합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "200", description = "조회 성공"), | |
| @ApiResponse(responseCode = "404", description = "해당 카테고리를 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<List<MenuResponse>> getAllMenusByCategoryId( | |
| @Parameter(description = "조회할 카테고리 ID", example = "1") Long categoryId | |
| ); | |
| /** | |
| * 특정 카테고리에 속한 모든 메뉴를 조회합니다. | |
| * @param categoryId 카테고리 고유 식별자 | |
| * @return 해당 카테고리의 메뉴 리스트를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "카테고리별 메뉴 조회", description = "특정 카테고리 ID에 해당하는 메뉴 목록을 조회합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "200", description = "조회 성공"), | |
| @ApiResponse(responseCode = "404", description = "해당 카테고리를 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<List<MenuResponse>> getAllMenusByCategoryId( | |
| @Parameter(description = "조회할 카테고리 ID", example = "1") Long categoryId | |
| ); |
🤖 Prompt for AI Agents
In
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
around lines 48 to 61, the Javadoc has a stray extra asterisk sequence ("* *
@param") on line 50; replace it with the correct single-asterisk Javadoc tag
format (" * @param") so the param tag is properly recognized and align the
leading asterisks for the Javadoc block to match the other lines.
| /** | ||
| * 특정 식당에서 제공하는 모든 메뉴를 조회합니다. | ||
| * * @param cafeteriaId 식당 고유 식별자 | ||
| * @return 해당 식당의 메뉴 리스트를 담은 ResponseEntity | ||
| */ | ||
| @Operation(summary = "식당별 메뉴 조회", description = "식당 ID에 해당하는 메뉴 목록을 조회합니다.") | ||
| @ApiResponses({ | ||
| @ApiResponse(responseCode = "200", description = "조회 성공"), | ||
| @ApiResponse(responseCode = "404", description = "해당 식당을 찾을 수 없습니다.", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | ||
| }) | ||
| ResponseEntity<List<MenuResponse>> getAllMenusByCafeteriaId( | ||
| @Parameter(description = "조회할 식당 ID", example = "1") Long cafeteriaId | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc 형식 오류를 수정하세요.
Line 65에서 * * @param 대신 * @param으로 작성해야 합니다.
* 특정 식당에서 제공하는 모든 메뉴를 조회합니다.
- * * @param cafeteriaId 식당 고유 식별자
+ * @param cafeteriaId 식당 고유 식별자
* @return 해당 식당의 메뉴 리스트를 담은 ResponseEntity📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /** | |
| * 특정 식당에서 제공하는 모든 메뉴를 조회합니다. | |
| * * @param cafeteriaId 식당 고유 식별자 | |
| * @return 해당 식당의 메뉴 리스트를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "식당별 메뉴 조회", description = "식당 ID에 해당하는 메뉴 목록을 조회합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "200", description = "조회 성공"), | |
| @ApiResponse(responseCode = "404", description = "해당 식당을 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<List<MenuResponse>> getAllMenusByCafeteriaId( | |
| @Parameter(description = "조회할 식당 ID", example = "1") Long cafeteriaId | |
| ); | |
| /** | |
| * 특정 식당에서 제공하는 모든 메뉴를 조회합니다. | |
| * @param cafeteriaId 식당 고유 식별자 | |
| * @return 해당 식당의 메뉴 리스트를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "식당별 메뉴 조회", description = "식당 ID에 해당하는 메뉴 목록을 조회합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "200", description = "조회 성공"), | |
| @ApiResponse(responseCode = "404", description = "해당 식당을 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<List<MenuResponse>> getAllMenusByCafeteriaId( | |
| @Parameter(description = "조회할 식당 ID", example = "1") Long cafeteriaId | |
| ); |
🤖 Prompt for AI Agents
In
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
around lines 63 to 76, the Javadoc has a malformed asterisk sequence ("* *
@param") on line 65; replace it with a proper single-space Javadoc tag line (" *
@param cafeteriaId ...") so the Javadoc block is syntactically correct and the
@param is recognized.
| /** | ||
| * 새로운 메뉴를 시스템에 등록합니다. (관리자 권한 필요) | ||
| * * @param menuRequest 생성할 메뉴의 상세 정보 DTO | ||
| * @return 생성된 메뉴 정보를 담은 ResponseEntity | ||
| */ | ||
| @Operation(summary = "신규 메뉴 생성 (관리자 전용)", description = "새로운 메뉴를 등록합니다.") | ||
| @ApiResponses({ | ||
| @ApiResponse(responseCode = "201", description = "메뉴 생성 성공"), | ||
| @ApiResponse(responseCode = "400", description = "입력값 오류(이름/가격 등)", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | ||
| @ApiResponse(responseCode = "409", description = "이미 존재하는 메뉴입니다.", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | ||
| }) | ||
| ResponseEntity<MenuResponse> createMenu(MenuRequest menuRequest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find MenuControllerDocs.java and check line 80 for the Javadoc issue
find . -name "MenuControllerDocs.java" -type f | head -5Repository: CampusTable/campus-table-be
Length of output: 152
🏁 Script executed:
#!/bin/bash
# Read the MenuControllerDocs.java file, focusing on lines 78-91
cat -n ./src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java | sed -n '75,95p'Repository: CampusTable/campus-table-be
Length of output: 1062
🏁 Script executed:
#!/bin/bash
# Find and examine MenuController.java for security annotations on createMenu
find . -name "MenuController.java" -type fRepository: CampusTable/campus-table-be
Length of output: 148
🏁 Script executed:
#!/bin/bash
# Check MenuController.java for createMenu method and security annotations
cat -n ./src/main/java/com/campustable/be/domain/menu/controller/MenuController.java | grep -A 10 -B 5 "createMenu"Repository: CampusTable/campus-table-be
Length of output: 850
🏁 Script executed:
#!/bin/bash
# Search for security annotations in MenuController.java
rg -n "@PreAuthorize|@Secured|@RolesAllowed" ./src/main/java/com/campustable/be/domain/menu/controller/MenuController.javaRepository: CampusTable/campus-table-be
Length of output: 53
🏁 Script executed:
#!/bin/bash
# Check the entire MenuController.java file for any security-related annotations and class declaration
cat -n ./src/main/java/com/campustable/be/domain/menu/controller/MenuController.java | head -80Repository: CampusTable/campus-table-be
Length of output: 3162
Javadoc 형식 오류를 수정하세요.
Line 80에서 * * @param 대신 * @param으로 작성해야 합니다.
* 새로운 메뉴를 시스템에 등록합니다. (관리자 권한 필요)
- * * @param menuRequest 생성할 메뉴의 상세 정보 DTO
+ * @param menuRequest 생성할 메뉴의 상세 정보 DTO
* @return 생성된 메뉴 정보를 담은 ResponseEntityMenuController의 createMenu, updateMenu, deleteMenu 메서드에 보안 애노테이션이 누락되어 있습니다.
인터페이스(MenuControllerDocs)에서는 관리자 권한이 필요함을 명시하고 있으나, 실제 구현체(MenuController)에는 @PreAuthorize, @Secured, 또는 @RolesAllowed 같은 보안 애노테이션이 적용되지 않았습니다. 관리자만 접근할 수 있도록 적절한 보안 애노테이션을 추가하세요.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /** | |
| * 새로운 메뉴를 시스템에 등록합니다. (관리자 권한 필요) | |
| * * @param menuRequest 생성할 메뉴의 상세 정보 DTO | |
| * @return 생성된 메뉴 정보를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "신규 메뉴 생성 (관리자 전용)", description = "새로운 메뉴를 등록합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "201", description = "메뉴 생성 성공"), | |
| @ApiResponse(responseCode = "400", description = "입력값 오류(이름/가격 등)", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | |
| @ApiResponse(responseCode = "409", description = "이미 존재하는 메뉴입니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<MenuResponse> createMenu(MenuRequest menuRequest); | |
| /** | |
| * 새로운 메뉴를 시스템에 등록합니다. (관리자 권한 필요) | |
| * @param menuRequest 생성할 메뉴의 상세 정보 DTO | |
| * @return 생성된 메뉴 정보를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "신규 메뉴 생성 (관리자 전용)", description = "새로운 메뉴를 등록합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "201", description = "메뉴 생성 성공"), | |
| @ApiResponse(responseCode = "400", description = "입력값 오류(이름/가격 등)", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | |
| @ApiResponse(responseCode = "409", description = "이미 존재하는 메뉴입니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<MenuResponse> createMenu(MenuRequest menuRequest); |
🤖 Prompt for AI Agents
In
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
around lines 78-91, fix the Javadoc formatting by replacing the stray "* *
@param" with a single "* @param" on line 80; additionally, ensure the actual
controller implementation
(src/main/java/com/campustable/be/domain/menu/controller/MenuController.java)
applies an admin-only security annotation to the createMenu, updateMenu, and
deleteMenu methods (for example add @PreAuthorize("hasRole('ADMIN')") or
@RolesAllowed("ROLE_ADMIN") to each method or the class) and import the
corresponding security annotation and enable method security if not already
configured.
| /** | ||
| * 기존 메뉴 정보를 수정합니다. (관리자 권한 필요) | ||
| * * @param menuId 수정할 메뉴의 ID | ||
| * @param menuUpdateRequest 수정할 내용이 담긴 DTO | ||
| * @return 수정 완료된 메뉴 정보를 담은 ResponseEntity | ||
| */ | ||
| @Operation(summary = "메뉴 정보 수정 (관리자 전용)", description = "특정 ID의 메뉴 정보를 수정합니다.") | ||
| @ApiResponses({ | ||
| @ApiResponse(responseCode = "200", description = "메뉴 수정 성공"), | ||
| @ApiResponse(responseCode = "400", description = "입력값 오류", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | ||
| @ApiResponse(responseCode = "404", description = "해당 메뉴를 찾을 수 없습니다.", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | ||
| }) | ||
| ResponseEntity<MenuResponse> updateMenu( | ||
| @Parameter(description = "수정할 메뉴 ID", example = "1") Long menuId, | ||
| MenuUpdateRequest menuUpdateRequest | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc 형식 오류를 수정하세요.
Line 95에서 * * @param 대신 * @param으로 작성해야 합니다.
* 기존 메뉴 정보를 수정합니다. (관리자 권한 필요)
- * * @param menuId 수정할 메뉴의 ID
+ * @param menuId 수정할 메뉴의 ID
* @param menuUpdateRequest 수정할 내용이 담긴 DTO📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /** | |
| * 기존 메뉴 정보를 수정합니다. (관리자 권한 필요) | |
| * * @param menuId 수정할 메뉴의 ID | |
| * @param menuUpdateRequest 수정할 내용이 담긴 DTO | |
| * @return 수정 완료된 메뉴 정보를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "메뉴 정보 수정 (관리자 전용)", description = "특정 ID의 메뉴 정보를 수정합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "200", description = "메뉴 수정 성공"), | |
| @ApiResponse(responseCode = "400", description = "입력값 오류", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | |
| @ApiResponse(responseCode = "404", description = "해당 메뉴를 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<MenuResponse> updateMenu( | |
| @Parameter(description = "수정할 메뉴 ID", example = "1") Long menuId, | |
| MenuUpdateRequest menuUpdateRequest | |
| ); | |
| /** | |
| * 기존 메뉴 정보를 수정합니다. (관리자 권한 필요) | |
| * @param menuId 수정할 메뉴의 ID | |
| * @param menuUpdateRequest 수정할 내용이 담긴 DTO | |
| * @return 수정 완료된 메뉴 정보를 담은 ResponseEntity | |
| */ | |
| @Operation(summary = "메뉴 정보 수정 (관리자 전용)", description = "특정 ID의 메뉴 정보를 수정합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "200", description = "메뉴 수정 성공"), | |
| @ApiResponse(responseCode = "400", description = "입력값 오류", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | |
| @ApiResponse(responseCode = "404", description = "해당 메뉴를 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<MenuResponse> updateMenu( | |
| @Parameter(description = "수정할 메뉴 ID", example = "1") Long menuId, | |
| MenuUpdateRequest menuUpdateRequest | |
| ); |
🤖 Prompt for AI Agents
In
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
around lines 93 to 110, the Javadoc has a formatting typo on line 95 where `* *
@param` is used; replace it with a single leading asterisk and a space so it
reads ` * @param` and ensure all @param tags are properly aligned (each starts
with " * @param") and the Javadoc block remains syntactically correct.
| /** | ||
| * 특정 메뉴를 시스템에서 삭제합니다. (관리자 권한 필요) | ||
| * * @param menuId 삭제할 메뉴의 ID | ||
| * @return 삭제 성공 시 빈 바디를 담은 ResponseEntity (204 No Content) | ||
| */ | ||
| @Operation(summary = "메뉴 삭제 (관리자 전용)", description = "특정 ID의 메뉴를 삭제합니다.") | ||
| @ApiResponses({ | ||
| @ApiResponse(responseCode = "204", description = "메뉴 삭제 성공"), | ||
| @ApiResponse(responseCode = "404", description = "해당 메뉴를 찾을 수 없습니다.", | ||
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | ||
| }) | ||
| ResponseEntity<Void> deleteMenu( | ||
| @Parameter(description = "삭제할 메뉴 ID", example = "1") Long menuId | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc 형식 오류를 수정하세요.
Line 114에서 * * @param 대신 * @param으로 작성해야 합니다.
* 특정 메뉴를 시스템에서 삭제합니다. (관리자 권한 필요)
- * * @param menuId 삭제할 메뉴의 ID
+ * @param menuId 삭제할 메뉴의 ID
* @return 삭제 성공 시 빈 바디를 담은 ResponseEntity (204 No Content)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /** | |
| * 특정 메뉴를 시스템에서 삭제합니다. (관리자 권한 필요) | |
| * * @param menuId 삭제할 메뉴의 ID | |
| * @return 삭제 성공 시 빈 바디를 담은 ResponseEntity (204 No Content) | |
| */ | |
| @Operation(summary = "메뉴 삭제 (관리자 전용)", description = "특정 ID의 메뉴를 삭제합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "204", description = "메뉴 삭제 성공"), | |
| @ApiResponse(responseCode = "404", description = "해당 메뉴를 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<Void> deleteMenu( | |
| @Parameter(description = "삭제할 메뉴 ID", example = "1") Long menuId | |
| ); | |
| /** | |
| * 특정 메뉴를 시스템에서 삭제합니다. (관리자 권한 필요) | |
| * @param menuId 삭제할 메뉴의 ID | |
| * @return 삭제 성공 시 빈 바디를 담은 ResponseEntity (204 No Content) | |
| */ | |
| @Operation(summary = "메뉴 삭제 (관리자 전용)", description = "특정 ID의 메뉴를 삭제합니다.") | |
| @ApiResponses({ | |
| @ApiResponse(responseCode = "204", description = "메뉴 삭제 성공"), | |
| @ApiResponse(responseCode = "404", description = "해당 메뉴를 찾을 수 없습니다.", | |
| content = @Content(schema = @Schema(implementation = ErrorResponse.class))) | |
| }) | |
| ResponseEntity<Void> deleteMenu( | |
| @Parameter(description = "삭제할 메뉴 ID", example = "1") Long menuId | |
| ); |
🤖 Prompt for AI Agents
In
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
around lines 112 to 125, the Javadoc has a formatting typo on line 114 where "`*
* @param`" is used; replace it with a single leading asterisk and space followed
by "@param" (i.e. " * @param") so the Javadoc block is correctly formatted;
ensure the rest of the Javadoc alignment and spacing remain consistent and
re-run javadoc/lint to confirm the warning is resolved.
…ps://github.com//issues/41
✨ 변경 사항
메뉴_url_api추가 : feat : {개별메뉴를 가져오는 api가 없어서 추가 imageurl NOTNULL설정}
✅ 테스트
Summary by CodeRabbit
새로운 기능
개선 사항
문서
✏️ Tip: You can customize this high-level summary in your review settings.