-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2dbedc5
commit e262e88
Showing
2 changed files
with
74 additions
and
69 deletions.
There are no files selected for viewing
44 changes: 42 additions & 2 deletions
44
src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/PlanApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,45 @@ | ||
package kr.wooco.woocobe.plan.ui.web.controller | ||
|
||
// TODO: 구현 - 스웨거용 인터페이스 | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement | ||
import io.swagger.v3.oas.annotations.tags.Tag | ||
import kr.wooco.woocobe.plan.ui.web.controller.request.CreatePlanRequest | ||
import kr.wooco.woocobe.plan.ui.web.controller.request.UpdatePlanRequest | ||
import kr.wooco.woocobe.plan.ui.web.controller.response.CreatePlanResponse | ||
import kr.wooco.woocobe.plan.ui.web.controller.response.PlanDetailResponse | ||
import org.springframework.http.ResponseEntity | ||
import org.springframework.security.core.annotation.AuthenticationPrincipal | ||
import org.springframework.web.bind.annotation.PathVariable | ||
import org.springframework.web.bind.annotation.RequestBody | ||
|
||
interface PlanApi | ||
@Tag(name = "플랜 API") | ||
interface PlanApi { | ||
@SecurityRequirement(name = "JWT") | ||
fun getPlanDetail( | ||
@AuthenticationPrincipal userId: Long, | ||
@PathVariable planId: Long, | ||
): ResponseEntity<PlanDetailResponse> | ||
|
||
@SecurityRequirement(name = "JWT") | ||
fun getAllPlanDetail( | ||
@AuthenticationPrincipal userId: Long, | ||
): ResponseEntity<List<PlanDetailResponse>> | ||
|
||
@SecurityRequirement(name = "JWT") | ||
fun createPlan( | ||
@AuthenticationPrincipal userId: Long, | ||
@RequestBody request: CreatePlanRequest, | ||
): ResponseEntity<CreatePlanResponse> | ||
|
||
@SecurityRequirement(name = "JWT") | ||
fun updatePlan( | ||
@AuthenticationPrincipal userId: Long, | ||
@RequestBody request: UpdatePlanRequest, | ||
@PathVariable planId: Long, | ||
): ResponseEntity<Unit> | ||
|
||
@SecurityRequirement(name = "JWT") | ||
fun deletePlan( | ||
@AuthenticationPrincipal userId: Long, | ||
@PathVariable planId: Long, | ||
): ResponseEntity<Unit> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters