Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: 질문목록 12개를 반환하는 API Swagger를 작성해요. #30

Merged
merged 2 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading