From 407d8b4bdcfccae9269f286124264ceeb94c43eb Mon Sep 17 00:00:00 2001 From: toychip Date: Sun, 30 Jun 2024 04:18:52 +0900 Subject: [PATCH 1/2] add: getQuestionSheet --- _endpoint_test/getQuestionSheet.http | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 _endpoint_test/getQuestionSheet.http diff --git a/_endpoint_test/getQuestionSheet.http b/_endpoint_test/getQuestionSheet.http new file mode 100644 index 00000000..654bfebe --- /dev/null +++ b/_endpoint_test/getQuestionSheet.http @@ -0,0 +1,2 @@ +### 질문 12개 조회 +GET localhost:8080/api/sheet From d114f1cbc0b551deb38a70dbdf7e828c2d7ca2e0 Mon Sep 17 00:00:00 2001 From: toychip Date: Sun, 30 Jun 2024 04:28:58 +0900 Subject: [PATCH 2/2] add: getSheet API Swagger --- .../main/kotlin/com/mashup/dojo/SheetController.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/src/main/kotlin/com/mashup/dojo/SheetController.kt b/api/src/main/kotlin/com/mashup/dojo/SheetController.kt index 7215b373..d81aaa24 100644 --- a/api/src/main/kotlin/com/mashup/dojo/SheetController.kt +++ b/api/src/main/kotlin/com/mashup/dojo/SheetController.kt @@ -5,16 +5,26 @@ import com.mashup.dojo.dto.Question import com.mashup.dojo.dto.SheetResponse import com.mashup.dojo.dto.SheetSingleResponse import com.mashup.dojo.usecase.SheetUseCase +import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.responses.ApiResponse +import io.swagger.v3.oas.annotations.tags.Tag import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController +@Tag(name = "Sheet", description = "질문지 API") @RestController @RequestMapping("/api/sheet") class SheetController( private val sheetUseCase: SheetUseCase, ) { - // 질문지 목록 12개를 반환하는 API + @Operation( + summary = "질문 리스트 목록 조회", + description = "질문 리스트와 질문에 해당하는 후보자 4명과 현재 질문의 순서, 총 질문의 개수를 반환합니다.", + responses = [ + ApiResponse(responseCode = "200", description = "질문 목록 12개 리스트") + ] + ) @GetMapping fun getQuestionSheet(): DojoApiResponse { val createSheets = sheetUseCase.createSheet()