Skip to content

Commit

Permalink
Merge pull request #30 from mash-up-kr/junhyoung/add-swager-http-endp…
Browse files Browse the repository at this point in the history
…oint

add: 질문목록 12개를 반환하는 API Swagger를 작성해요.
  • Loading branch information
toychip authored Jun 29, 2024
2 parents 36783d7 + d114f1c commit 7ca4779
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _endpoint_test/getQuestionSheet.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### 질문 12개 조회
GET localhost:8080/api/sheet
12 changes: 11 additions & 1 deletion api/src/main/kotlin/com/mashup/dojo/SheetController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<SheetResponse> {
val createSheets = sheetUseCase.createSheet()
Expand Down

0 comments on commit 7ca4779

Please sign in to comment.