Skip to content

Commit a4415f0

Browse files
committed
fix(swagger): 增加POST UPDATE方法中的accept json注释
1 parent b66be89 commit a4415f0

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

docs/docs.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
22
// This file was generated by swaggo/swag at
3+
<<<<<<< Updated upstream
34
// 2021-06-20 16:22:58.944567 +0800 CST m=+0.063645120
5+
=======
6+
// 2021-06-20 16:53:32.405848 +0800 CST m=+0.051690642
7+
>>>>>>> Stashed changes
48

59
package docs
610

@@ -88,6 +92,9 @@ var doc = `{
8892
}
8993
},
9094
"post": {
95+
"consumes": [
96+
"application/json"
97+
],
9198
"produces": [
9299
"application/json"
93100
],

docs/swagger.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
}
7171
},
7272
"post": {
73+
"consumes": [
74+
"application/json"
75+
],
7376
"produces": [
7477
"application/json"
7578
],

docs/swagger.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ paths:
136136
$ref: '#/definitions/errcode.Error'
137137
summary: 获取多个标签
138138
post:
139+
consumes:
140+
- application/json
139141
parameters:
140142
- description: 请求体
141143
in: body

internal/routers/api/v1/tag.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,13 @@ func (t Tag) List(c *gin.Context) {
6262
return
6363
}
6464

65+
// Create
6566
// @Summary 新增标签
6667
// @Produce json
68+
<<<<<<< Updated upstream
69+
=======
70+
// @accept json
71+
>>>>>>> Stashed changes
6772
// @Param data body service.CreateTagRequest true "请求体"
6873
// @Success 200 {object} model.Tag "成功"
6974
// @Failure 400 {object} errcode.Error "请求错误"
@@ -94,6 +99,7 @@ func (t Tag) Create(c *gin.Context) {
9499
// Update tag update
95100
// @Summary 更新标签
96101
// @Produce json
102+
// @accept json
97103
// @Param id path int true "标签 ID"
98104
// @Param data body service.UpdateTagRequest true "请求体"
99105
// @Success 200 {object} model.Tag "成功"

0 commit comments

Comments
 (0)