Skip to content

Commit

Permalink
#189 docs: 공지사항, 자주 묻는 질문 스웨거 pathVariable 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
chaerlo127 committed Nov 10, 2023
1 parent ce9812c commit 6234e26
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/kotlin/com/psr/psr/cs/controller/CsController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.psr.psr.cs.dto.response.NoticeRes
import com.psr.psr.cs.service.CsService
import com.psr.psr.global.dto.BaseResponse
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.Parameter
import io.swagger.v3.oas.annotations.media.Content
import io.swagger.v3.oas.annotations.media.Schema
import io.swagger.v3.oas.annotations.responses.ApiResponse
Expand Down Expand Up @@ -49,7 +50,8 @@ class CsController(
) ]
)
@GetMapping("/notices/{noticeId}")
fun getNotice(@PathVariable(name = "noticeId") noticeId: Long): BaseResponse<NoticeRes>{
fun getNotice(
@Parameter(description = "(Long) 공지사항 Id", example = "1") @PathVariable(name = "noticeId") noticeId: Long): BaseResponse<NoticeRes>{
return BaseResponse(csService.getNotice(noticeId))
}

Expand All @@ -68,7 +70,8 @@ class CsController(
]
)
@GetMapping("/faqs")
fun getFaqs(@RequestParam(value = "type", required = false) type: String?): BaseResponse<FaqListRes>{
fun getFaqs(
@Parameter(description = "(String) 자주 묻는 질문 타입 (계정관리/컨설팅/상품)", example = "계정관리") @RequestParam(value = "type", required = false) type: String?): BaseResponse<FaqListRes>{
return BaseResponse(csService.getFaqs(type))
}

Expand All @@ -87,7 +90,8 @@ class CsController(
]
)
@GetMapping("/faqs/{faqId}")
fun getFaq(@PathVariable(name = "faqId") faqId: Long): BaseResponse<FaqRes>{
fun getFaq(
@Parameter(description = "(Long) 자주 묻는 질문 Id", example = "1") @PathVariable(name = "faqId") faqId: Long): BaseResponse<FaqRes>{
return BaseResponse(csService.getFaq(faqId))
}

Expand Down

0 comments on commit 6234e26

Please sign in to comment.