aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/structs/user.go7
-rw-r--r--routers/api/v1/swagger/options.go3
-rw-r--r--routers/api/v1/swagger/user.go7
-rw-r--r--templates/swagger/v1_json.tmpl17
4 files changed, 8 insertions, 26 deletions
diff --git a/modules/structs/user.go b/modules/structs/user.go
index c43558be5d..21ecc1479e 100644
--- a/modules/structs/user.go
+++ b/modules/structs/user.go
@@ -132,10 +132,3 @@ type UserBadgeOption struct {
// example: ["badge1","badge2"]
BadgeSlugs []string `json:"badge_slugs" binding:"Required"`
}
-
-// BadgeList
-// swagger:response BadgeList
-type BadgeList struct {
- // in:body
- Body []Badge `json:"body"`
-}
diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go
index e03862d7b9..471e7d9c4e 100644
--- a/routers/api/v1/swagger/options.go
+++ b/routers/api/v1/swagger/options.go
@@ -193,7 +193,4 @@ type swaggerParameterBodies struct {
// in:body
UserBadgeOption api.UserBadgeOption
-
- // in:body
- UserBadgeList api.BadgeList
}
diff --git a/routers/api/v1/swagger/user.go b/routers/api/v1/swagger/user.go
index fb6d185ee7..e2ad511d2b 100644
--- a/routers/api/v1/swagger/user.go
+++ b/routers/api/v1/swagger/user.go
@@ -48,3 +48,10 @@ type swaggerResponseUserSettings struct {
// in:body
Body []api.UserSettings `json:"body"`
}
+
+// BadgeList
+// swagger:response BadgeList
+type swaggerResponseBadgeList struct {
+ // in:body
+ Body []api.Badge `json:"body"`
+}
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 221b34b7f8..f835df084d 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -17413,21 +17413,6 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
- "BadgeList": {
- "description": "BadgeList",
- "type": "object",
- "properties": {
- "body": {
- "description": "in:body",
- "type": "array",
- "items": {
- "$ref": "#/definitions/Badge"
- },
- "x-go-name": "Body"
- }
- },
- "x-go-package": "code.gitea.io/gitea/modules/structs"
- },
"Branch": {
"description": "Branch represents a repository branch",
"type": "object",
@@ -24722,7 +24707,7 @@
"parameterBodies": {
"description": "parameterBodies",
"schema": {
- "$ref": "#/definitions/BadgeList"
+ "$ref": "#/definitions/UserBadgeOption"
}
},
"redirect": {