From 17d3b5d79721e9651f355cefc5efcd520db91945 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 20 Aug 2024 10:48:37 +0900 Subject: [PATCH] =?UTF-8?q?api=20=EC=84=A4=EB=AA=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/module/ModuleController.java | 5 ++++- .../roofmaterial/RoofMaterialController.java | 4 ++++ .../qcast/biz/trestle/TrestleController.java | 4 ++++ .../resources/mappers/module/moduleMapper.xml | 14 ++++++------- .../roofmaterial/roofMaterialMapper.xml | 6 +++--- .../mappers/trestle/trestleMapper.xml | 20 +++++++++---------- 6 files changed, 32 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/interplug/qcast/biz/module/ModuleController.java b/src/main/java/com/interplug/qcast/biz/module/ModuleController.java index fec42695..7e9905e9 100644 --- a/src/main/java/com/interplug/qcast/biz/module/ModuleController.java +++ b/src/main/java/com/interplug/qcast/biz/module/ModuleController.java @@ -1,6 +1,8 @@ package com.interplug.qcast.biz.module; import com.interplug.qcast.biz.module.dto.ModuleResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -8,10 +10,11 @@ import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api/module") @RequiredArgsConstructor +@Tag(name = "ModuleController", description = "모듈 관련 API") public class ModuleController { private final ModuleService moduleService; - // 모듈 조회 + @Operation(description = "지붕재 ID와 가대 ID에 따라 설치 가능한 모듈 목록을 조회한다.") @GetMapping("/v1.0/modules/{roofMaterialId}/{trestleId}") public List getModulesByRoofMaterialIdAndTrestleId( @PathVariable("roofMaterialId") Integer roofMaterialId, diff --git a/src/main/java/com/interplug/qcast/biz/roofmaterial/RoofMaterialController.java b/src/main/java/com/interplug/qcast/biz/roofmaterial/RoofMaterialController.java index 7dddc702..79efb38a 100644 --- a/src/main/java/com/interplug/qcast/biz/roofmaterial/RoofMaterialController.java +++ b/src/main/java/com/interplug/qcast/biz/roofmaterial/RoofMaterialController.java @@ -1,6 +1,8 @@ package com.interplug.qcast.biz.roofmaterial; import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; @@ -10,9 +12,11 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor @RequestMapping("/api/roof-material") +@Tag(name = "RoofMaterialController", description = "지붕재 API") public class RoofMaterialController { private final RoofMaterialService roofService; + @Operation(description = "지붕재 목록을 조회한다.") @GetMapping("/v1.0/roof-materials") public List getRoofMaterials() { return roofService.getRoofMaterials(); diff --git a/src/main/java/com/interplug/qcast/biz/trestle/TrestleController.java b/src/main/java/com/interplug/qcast/biz/trestle/TrestleController.java index ef10be81..40412cd1 100644 --- a/src/main/java/com/interplug/qcast/biz/trestle/TrestleController.java +++ b/src/main/java/com/interplug/qcast/biz/trestle/TrestleController.java @@ -1,6 +1,8 @@ package com.interplug.qcast.biz.trestle; import com.interplug.qcast.biz.trestle.dto.TrestleResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -8,9 +10,11 @@ import org.springframework.web.bind.annotation.*; @RestController @RequiredArgsConstructor @RequestMapping("/api/trestle") +@Tag(description = "가대 관련 API", name = "TrestleController") public class TrestleController { private final TrestleService trestleService; + @Operation(description = "지붕재 ID에 따라 가대 목록을 조회한다.") @GetMapping("/v1.0/trestles/{roofMaterialId}") public List getTrestlesByRoofMaterialId(@PathVariable Integer roofMaterialId) { return trestleService.getTrestlesByRoofMaterialId(roofMaterialId); diff --git a/src/main/resources/mappers/module/moduleMapper.xml b/src/main/resources/mappers/module/moduleMapper.xml index 59c305fa..e2eb3bfc 100644 --- a/src/main/resources/mappers/module/moduleMapper.xml +++ b/src/main/resources/mappers/module/moduleMapper.xml @@ -3,12 +3,12 @@ \ No newline at end of file diff --git a/src/main/resources/mappers/roofmaterial/roofMaterialMapper.xml b/src/main/resources/mappers/roofmaterial/roofMaterialMapper.xml index 88d34682..7f9b866c 100644 --- a/src/main/resources/mappers/roofmaterial/roofMaterialMapper.xml +++ b/src/main/resources/mappers/roofmaterial/roofMaterialMapper.xml @@ -3,8 +3,8 @@ \ No newline at end of file diff --git a/src/main/resources/mappers/trestle/trestleMapper.xml b/src/main/resources/mappers/trestle/trestleMapper.xml index d9ef3eb1..ea1b370e 100644 --- a/src/main/resources/mappers/trestle/trestleMapper.xml +++ b/src/main/resources/mappers/trestle/trestleMapper.xml @@ -4,15 +4,15 @@ \ No newline at end of file