Skip to content

Commit

Permalink
refactor: #118-Swagger 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueBerrySoda committed May 1, 2024
1 parent 3153905 commit e0d3f7d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public ResponseEntity<?> upLikeCount( @Parameter(description = "추천할 댓
@Operation(summary = "댓글 추천 해제", description = "해당 id의 댓글을 추천 해제합니다. 현재 추천 댓글 여부를 관리하지 않습니다.")
@ApiResponse(responseCode = "200", description = "완료시 200을 반환합니다.")
public ResponseEntity<?> downLikeCount( @Parameter(description = "추천 해제할 댓글의 id가 필요합니다.", required = true)
@RequestBody Long id) {
@RequestParam Long id) {
answerService.downLikeCountById(id);
return ResponseEntity
.ok(new ApiResult<>("Successfully unlike answer", 200));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
Expand All @@ -34,7 +35,7 @@ public class FAQController {

private final JwtTokenProvider jwtTokenProvider;

@PostMapping("/create")
@PostMapping(value = "/create", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@Operation(summary = "FAQ글 생성", description = "request 정보를 기반으로 FAQ글을 생성합니다. imgList 정보를 통해 이미지 파일을 업로드 합니다")
@ApiResponse(responseCode = "200", description = "request 정보를 기반으로 생성된 FAQ글과 imgList을 통해 업로드된 이미지 파일의 url 정보가 함께 반환됩니다.")
public ResponseEntity<?> createFAQ( @Parameter(description = "FAQ글 생성을 위한 파라미터입니다. 제목, 작성자, 질문, 답변, 언어, 태그값이 필요합니다.", required = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
Expand All @@ -31,7 +32,7 @@ public class QuestionController {
private final ImageService imageService;
private final JwtTokenProvider jwtTokenProvider;

@PostMapping("/create")
@PostMapping(value = "/create", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@Operation(summary = "질문글 생성", description = "request 정보를 기반으로 질문글을 생성합니다. imgList 정보를 통해 이미지 파일을 업로드 합니다")
@ApiResponse(responseCode = "200", description = "request 정보를 기반으로 생성된 질문글과 imgList을 통해 업로드된 이미지 파일의 url 정보가 함께 반환됩니다.")
public ResponseEntity<?> createQuestion(/*@RequestHeader String token,*/
Expand Down

0 comments on commit e0d3f7d

Please sign in to comment.