File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
src/main/java/com/somemore Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 33import com .somemore .center .dto .response .CenterProfileResponseDto ;
44import com .somemore .center .usecase .query .CenterQueryUseCase ;
55import com .somemore .global .common .response .ApiResponse ;
6+ import io .swagger .v3 .oas .annotations .Operation ;
7+ import io .swagger .v3 .oas .annotations .tags .Tag ;
68import lombok .RequiredArgsConstructor ;
79import org .springframework .web .bind .annotation .GetMapping ;
810import org .springframework .web .bind .annotation .PathVariable ;
1416@ RequiredArgsConstructor
1517@ RestController
1618@ RequestMapping ("/api/center" )
19+ @ Tag (name = "Center Query API" , description = "기관 관련 조회 API를 제공합니다." )
1720public class CenterQueryApiController {
1821
1922 private final CenterQueryUseCase centerQueryUseCase ;
2023
24+ @ Operation (summary = "기관 프로필 조회 API" )
2125 @ GetMapping ("/profile/{centerId}" )
2226 public ApiResponse <CenterProfileResponseDto > getCenterProfile (@ PathVariable UUID centerId ) {
2327
Original file line number Diff line number Diff line change 44import com .fasterxml .jackson .databind .annotation .JsonNaming ;
55import com .somemore .center .domain .Center ;
66import com .somemore .center .domain .PreferItem ;
7+ import io .swagger .v3 .oas .annotations .media .Schema ;
78import lombok .Builder ;
89
910import java .util .List ;
1213@ JsonNaming (PropertyNamingStrategies .SnakeCaseStrategy .class )
1314@ Builder
1415public record CenterProfileResponseDto (
16+ @ Schema (description = "센터 ID" , example = "123e4567-e89b-12d3-a456-426614174000" )
1517 UUID centerId ,
18+
19+ @ Schema (description = "센터 이름" , example = "서울 도서관" )
1620 String name ,
21+
22+ @ Schema (description = "연락처" , example = "010-1234-5678" )
1723 String contactNumber ,
24+
25+ @ Schema (description = "센터 이미지 URL" , example = "https://example.com/images/center.jpg" )
1826 String imgUrl ,
27+
28+ @ Schema (description = "센터 소개" , example = "저희 도서관은 유명해요" )
1929 String introduce ,
30+
31+ @ Schema (description = "센터 홈페이지 링크" , example = "https://fitnesscenter.com" )
2032 String homepageLink ,
33+
34+ @ Schema (description = "선호 물품 리스트" )
2135 List <PreferItemResponseDto > preferItems
2236) {
2337 public static CenterProfileResponseDto of (Center center , List <PreferItemResponseDto > preferItemDtos ) {
Original file line number Diff line number Diff line change 88@ Getter
99public enum ExceptionMessage {
1010
11- NOT_EXISTS_CENTER ("존재하지 않는 기관 ID 입니다." ),
11+ NOT_EXISTS_CENTER ("존재하지 않는 기관 입니다." ),
1212 NOT_EXISTS_COMMUNITY_BOARD ("존재하지 않는 게시글 입니다." ),
1313 UNAUTHORIZED_COMMUNITY_BOARD ("해당 게시글에 권한이 없습니다." ),
1414 NOT_EXISTS_COMMUNITY_COMMENT ("존재하지 않는 댓글 입니다." ),
You can’t perform that action at this time.
0 commit comments