From eb8e48f0f816bde03cd611122fccd39cc1cfd703 Mon Sep 17 00:00:00 2001 From: kyubeom Date: Sun, 18 Aug 2024 16:35:10 +0900 Subject: [PATCH] =?UTF-8?q?#2=20=EC=8A=A4=EC=9B=A8=EA=B1=B0=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/core/adapter/in/web/MealController.kt | 9 +++++++-- core/src/main/resources/application.yml | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/com/core/adapter/in/web/MealController.kt b/core/src/main/kotlin/com/core/adapter/in/web/MealController.kt index b821bb1..6e2f847 100644 --- a/core/src/main/kotlin/com/core/adapter/in/web/MealController.kt +++ b/core/src/main/kotlin/com/core/adapter/in/web/MealController.kt @@ -4,18 +4,23 @@ import com.core.adapter.`in`.web.dto.AdapterMealDto import com.core.application.port.`in`.GetWeekMealUseCase import com.core.common.response.ApplicationResponse import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Schema +import io.swagger.v3.oas.annotations.tags.Tag import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestParam import org.springframework.web.bind.annotation.RestController +@Tag(name = "식단 조회 API", description = "식단 조회 API") @RestController class MealController(val getWeekMealUseCase: GetWeekMealUseCase) { @GetMapping("/api/v1/meals/week") - @Operation(summary = "주간 식단 조회") + @Operation(summary = "주간 식단 조회", description = "주간 식단 조회 API입니다.") fun getWeekMeal( - @RequestParam("restaurantIdx") restaurantIdx: Long + @Schema(description = "식당 인덱스", example = "1") + @RequestParam("restaurantIdx") + restaurantIdx: Long ) : ApplicationResponse> { val data = getWeekMealUseCase(restaurantIdx) val toResponse = AdapterMealDto.GetWeekMealRes.from(data) diff --git a/core/src/main/resources/application.yml b/core/src/main/resources/application.yml index ec4973f..fb45dec 100644 --- a/core/src/main/resources/application.yml +++ b/core/src/main/resources/application.yml @@ -12,3 +12,13 @@ spring: highlight_sql: true default_batch_fetch_size: 20 open-in-view: false + +springdoc: + swagger-ui: + path: /docs + groups-order: DESC + doc-expansion: none + tags-sorter: alpha + paths-to-match: + - /api/v1/** +