Skip to content

Conversation

@seojelee9999
Copy link
Contributor

@seojelee9999 seojelee9999 commented Dec 16, 2025

…ps://github.com//issues/41

✨ 변경 사항


메뉴_url_api추가 : feat : {개별메뉴를 가져오는 api가 없어서 추가 imageurl NOTNULL설정}

✅ 테스트


  • 수동 테스트 완료
  • 테스트 코드 완료

Summary by CodeRabbit

  • 새로운 기능

    • 메뉴 ID로 단일 메뉴 상세 조회 기능이 추가되었습니다.
  • 개선 사항

    • 메뉴 이미지 URL(menuUrl)에 대한 유효성 검증이 강화되어 빈 문자열은 허용되지 않습니다.
    • 식당별 메뉴 조회 엔드포인트는 유지되며 조회 흐름이 정리되었습니다.
  • 문서

    • API 문서가 확대되어 단일 조회, 목록 조회, 생성, 수정, 삭제 등 CRUD 엔드포인트와 응답 설명이 상세히 추가되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

Walkthrough

메뉴 단일 조회 엔드포인트 getMenuById(Long menuId)가 컨트롤러 및 서비스에 추가되었고, MenuRequest의 menuUrl 검증이 @NotBlank로 변경되었으며 API 문서 인터페이스에 관련 엔드포인트 및 응답 스펙이 추가·정리되었습니다.

Changes

코호트 / 파일(s) 변경 요약
메뉴 컨트롤러
src/main/java/com/campustable/be/domain/menu/controller/MenuController.java
GET /{menuId} 엔드포인트 getMenuById(Long menuId) 추가; 기존 getAllMenusByCafeteriaId의 위치·포맷팅 조정
메뉴 서비스
src/main/java/com/campustable/be/domain/menu/service/MenuService.java
public MenuResponse getMenuById(Long menuId) 추가(트랜잭션 readOnly), 존재하지 않을 경우 MENU_NOT_FOUND 예외 반환 패턴 적용; 일부 예외 처리 표현 변경 및 불필요한 import 제거
메뉴 요청 DTO
src/main/java/com/campustable/be/domain/menu/dto/MenuRequest.java
menuUrl 검증 어노테이션을 @NotBlank(message = "이미지를 위한url은 필수입니다.")로 변경(Null뿐 아니라 빈 문자열도 거부)
API 문서 인터페이스
src/main/java/com/campustable/be/domain/menu/controller/MenuControllerDocs.java
getMenuById 문서화 추가 및 CRUD 엔드포인트의 응답/설명 블록 확장·정리, 태그 설명 오타 수정("CURD" → "CRUD")

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • 추가 확인 권장:
    • MenuService#getMenuById의 예외 타입/상태 코드 및 메시지 일관성
    • MenuRequest.menuUrl@NotBlank 적용으로 인한 클라이언트 입력/테스트 영향
    • MenuControllerDocs의 문서 주석과 실제 컨트롤러 시그니처·응답이 일치하는지

Possibly related PRs

Suggested labels

feat

Poem

🐰 달빛 아래 코드 밭을 훔쳐보니,
메뉴 하나 뚝! 아이디로 콕 찾아주네,
URL은 빈칸 말고 꽉 채워줘라,
문서엔 친절히 길을 밝혀주고,
당근으로 축하 — 홧팅! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 46.67% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 개별 메뉴 조회 API 추가와 menuUrl 필드 검증 강화라는 변경사항의 주요 내용을 명확하게 요약하고 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 20251216_#41_메뉴_url_api추가

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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: 로그 메시지 개선이 필요합니다.

두 가지 개선사항이 있습니다:

  1. "유효하지않은"은 띄어쓰기가 누락되었습니다. "유효하지 않은"으로 수정하세요.
  2. 존재하지 않는 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

📥 Commits

Reviewing files that changed from the base of the PR and between 749782b and b6e146d.

📒 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에도 일관되게 적용되었습니다.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between da25560 and 7b69120.

📒 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"로 올바르게 수정하였습니다.

Comment on lines +25 to +31
/**
* 시스템에 등록된 모든 메뉴 목록을 조회합니다.
* * @return 메뉴 정보 리스트를 담은 ResponseEntity
*/
@Operation(summary = "메뉴 전체 조회", description = "모든 메뉴 목록을 조회합니다.")
@ApiResponse(responseCode = "200", description = "조회 성공")
ResponseEntity<List<MenuResponse>> getAllMenus();
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +33 to +46
/**
* 고유 식별자를 통해 단일 메뉴의 상세 정보를 조회합니다.
* * @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
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +48 to +61
/**
* 특정 카테고리에 속한 모든 메뉴를 조회합니다.
* * @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
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
/**
* 특정 카테고리에 속한 모든 메뉴를 조회합니다.
* * @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.

Comment on lines +63 to +76
/**
* 특정 식당에서 제공하는 모든 메뉴를 조회합니다.
* * @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
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
/**
* 특정 식당에서 제공하는 모든 메뉴를 조회합니다.
* * @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.

Comment on lines +78 to +91
/**
* 새로운 메뉴를 시스템에 등록합니다. (관리자 권한 필요)
* * @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);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find MenuControllerDocs.java and check line 80 for the Javadoc issue
find . -name "MenuControllerDocs.java" -type f | head -5

Repository: 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 f

Repository: 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.java

Repository: 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 -80

Repository: CampusTable/campus-table-be

Length of output: 3162


Javadoc 형식 오류를 수정하세요.

Line 80에서 * * @param 대신 * @param으로 작성해야 합니다.

   * 새로운 메뉴를 시스템에 등록합니다. (관리자 권한 필요)
-  * * @param menuRequest 생성할 메뉴의 상세 정보 DTO
+  * @param menuRequest 생성할 메뉴의 상세 정보 DTO
   * @return 생성된 메뉴 정보를 담은 ResponseEntity

MenuController의 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.

Suggested change
/**
* 새로운 메뉴를 시스템에 등록합니다. (관리자 권한 필요)
* * @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.

Comment on lines +93 to +110
/**
* 기존 메뉴 정보를 수정합니다. (관리자 권한 필요)
* * @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
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
/**
* 기존 메뉴 정보를 수정합니다. (관리자 권한 필요)
* * @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.

Comment on lines +112 to +125
/**
* 특정 메뉴를 시스템에서 삭제합니다. (관리자 권한 필요)
* * @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
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
/**
* 특정 메뉴를 시스템에서 삭제합니다. (관리자 권한 필요)
* * @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.

@seojelee9999 seojelee9999 changed the title 메뉴_url_api추가 : feat : {개별메뉴를 가져오는 api가 없어서 추가 imageurl NOTNULL설정} feat: 개별 메뉴 조회 API 추가 및 menuUrl 필드 검증 강화 Dec 16, 2025
@seojelee9999 seojelee9999 merged commit 3efea72 into test Dec 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants