Skip to content

Commit

Permalink
[Chore] #163 - Consumes 추가 및 RequestPart value 설정 제거
Browse files Browse the repository at this point in the history
multipart/form-data를 사용하는 API가 Swagger에서 제대로 Response를 반환하지 못하여 설정하고, RequestPart가 변수명에 맞추어 키값으로로 설정되므로 제거
  • Loading branch information
parkrootseok committed Feb 6, 2023
1 parent 42a09e7 commit eec86cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/shop/cazait/domain/cafe/api/CafeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public class CafeController {

private final CafeService cafeService;

@PostMapping("/add/master/{masterId}")
@PostMapping(name = "/add/master/{masterId}", consumes = {"multipart/form-data"})
@ApiOperation(value = "카페 등록", notes = "master가 카페를 등록한다.")
@ApiImplicitParam(name = "masterId", value = "마스터 ID")
public SuccessResponse<String> addCafe(@PathVariable Long masterId,
@RequestPart(value = "PostCafeReq") @Valid PostCafeReq postCafeReq,
@RequestPart(value = "images", required = false) List<MultipartFile> imageFiles) throws JsonProcessingException {
@RequestPart @Valid PostCafeReq postCafeReq,
@RequestPart(required = false) List<MultipartFile> imageFiles) throws JsonProcessingException {
cafeService.addCafe(masterId, postCafeReq, imageFiles);
return new SuccessResponse<>("카페 등록 완료");
}
Expand Down

0 comments on commit eec86cf

Please sign in to comment.