@@ -23,7 +23,7 @@ import ( | |||||
// @Param req body interface{} true "任意参数" | // @Param req body interface{} true "任意参数" | ||||
// @Success 200 {object} map[string]interface{} "返回任意参数" | // @Success 200 {object} map[string]interface{} "返回任意参数" | ||||
// @Failure 400 {object} md.Response "具体错误" | // @Failure 400 {object} md.Response "具体错误" | ||||
// @Router /api/v1/test [POST] | |||||
// @Router /api/v1/test [GET] | |||||
func Demo(c *gin.Context) { | func Demo(c *gin.Context) { | ||||
var args interface{} | var args interface{} | ||||
if c.Request.Method == "GET" { | if c.Request.Method == "GET" { | ||||
@@ -63,7 +63,7 @@ const docTemplate = `{ | |||||
} | } | ||||
}, | }, | ||||
"/api/v1/test": { | "/api/v1/test": { | ||||
"post": { | |||||
"get": { | |||||
"description": "Demo样例测试", | "description": "Demo样例测试", | ||||
"consumes": [ | "consumes": [ | ||||
"application/json" | "application/json" | ||||
@@ -57,7 +57,7 @@ | |||||
} | } | ||||
}, | }, | ||||
"/api/v1/test": { | "/api/v1/test": { | ||||
"post": { | |||||
"get": { | |||||
"description": "Demo样例测试", | "description": "Demo样例测试", | ||||
"consumes": [ | "consumes": [ | ||||
"application/json" | "application/json" | ||||
@@ -102,7 +102,7 @@ paths: | |||||
tags: | tags: | ||||
- 对象存储 | - 对象存储 | ||||
/api/v1/test: | /api/v1/test: | ||||
post: | |||||
get: | |||||
consumes: | consumes: | ||||
- application/json | - application/json | ||||
description: Demo样例测试 | description: Demo样例测试 | ||||