Skip to content

Commit

Permalink
✨ Feature/71 banner img 불러오는 api swagger 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanvp committed Aug 26, 2023
1 parent 7eba1d9 commit 7c6b4c2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/zipdabang/server/web/controller/RootController.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,14 @@ public ResponseDto<RootResponseDto.BeverageCategoryListDto> showCategoryList(){
List<Category> allCategories = rootService.getAllCategories();
return ResponseDto.of(RootConverter.toBeverageCategoryListDto(allCategories));
}

@Operation(summary = "배너 이미지 APII️", description = "홈 화면의 배너 이미지를 가져옵니다. order는 배너 순서를 의미합니다.")
@ApiResponses({
@ApiResponse(responseCode = "2000",description = "OK 성공, access Token과 refresh 토큰을 반환함"),
@ApiResponse(responseCode = "5000",description = "SERVER ERROR, 백앤드 개발자에게 알려주세요",content = @Content(schema = @Schema(implementation = ResponseDto.class))),
})
@GetMapping("/banners")
public ResponseDto<RootResponseDto.BannerImageDto> showBanners() {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,22 @@ public static class BeverageCategoryListDto{
List<BeverageCategoryDto> beverageCategoryList;
Integer size;
}

@Builder
@Getter
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class BannerDto{
private Integer order;
private String imageUrl;
}

@Builder
@Getter
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class BannerImageDto {
List<BannerDto> bannerList;
Integer size;
}
}

0 comments on commit 7c6b4c2

Please sign in to comment.