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/VersionController.kt |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt
index 60b5133..0178ada 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt
@@ -3,30 +3,38 @@
 import cn.flightfeather.supervision.domain.entity.Version
 import cn.flightfeather.supervision.lightshare.service.VersionService
 import io.swagger.annotations.Api
+import io.swagger.annotations.ApiOperation
+import io.swagger.annotations.ApiParam
 import org.springframework.web.bind.annotation.*
 import org.springframework.web.multipart.MultipartFile
+import springfox.documentation.annotations.ApiIgnore
 
 @Api(tags = ["绯荤粺鐩稿叧API鎺ュ彛"])
 @RestController
 @RequestMapping("/version")
 class VersionController(val versionService: VersionService) {
 
+    @ApiIgnore
     @PutMapping("")
     fun add(@RequestBody version: Version) = versionService.save(version)
 
+    @ApiIgnore
     @PostMapping("")
     fun update(@RequestBody version: Version) = versionService.update(version)
 
+    @ApiIgnore
     @DeleteMapping("/{id}")
     fun delete(@PathVariable id: String) = versionService.delete(id)
 
+    @ApiOperation(value = "鑾峰彇鏈�鏂癮pp鐗堟湰淇℃伅")
     @GetMapping("/latest")
     fun getLatestVersion() = versionService.getLatestVersion()
 
+    @ApiOperation(value = "涓婁紶閿欒鏃ュ織")
     @PostMapping("/crashInfo/upLoad")
     fun upLoadCrashInfo(
-            @RequestParam("userId") userId: String,
-            @RequestPart("files") files: Array<MultipartFile>
+        @ApiParam("鐢ㄦ埛id") @RequestParam("userId") userId: String,
+        @ApiParam("閿欒鏃ュ織") @RequestPart("files") files: Array<MultipartFile>
     ) = versionService.upLoadCrashInfo(userId, files)
 
 }
\ No newline at end of file

--
Gitblit v1.9.3