From 9867f6d5c5bccfe52b878c344c536905dd6b309e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 09 六月 2022 08:48:06 +0800 Subject: [PATCH] 1. 接口文档自动输出 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt index d38442d..a21506b 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt @@ -3,6 +3,8 @@ import cn.flightfeather.supervision.domain.entity.OnLineQuestion import cn.flightfeather.supervision.lightshare.service.OnLineQuestionService import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam import org.springframework.web.bind.annotation.* @Api(tags = ["鍦ㄧ嚎鍜ㄨAPI鎺ュ彛"]) @@ -10,9 +12,10 @@ @RequestMapping("/consultation") class ConsultationController(val onLineQuestionService: OnLineQuestionService) { + @ApiOperation(value = "鎻愬嚭鍜ㄨ闂") @PostMapping("/add/{userId}") fun add( - @PathVariable userId: String, - @RequestBody questions: List<OnLineQuestion> + @ApiParam(value = "鐢ㄦ埛id") @PathVariable userId: String, + @ApiParam(value = "鍜ㄨ闂") @RequestBody questions: List<OnLineQuestion> ) = onLineQuestionService.addQuestions(userId, questions) } \ No newline at end of file -- Gitblit v1.9.3