summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChongyi Zheng <harryzheng25@gmail.com>2022-04-12 04:13:07 -0400
committerGitHub <noreply@github.com>2022-04-12 16:13:07 +0800
commitf029b9ae4f85d5c1d678709ae0e7d656c3fad3db (patch)
treeff71fb8de88a2dd0d4775487dadaa2bd8516184d
parent0d3d9675c62b3ad7ebcfd7a7515bbe9c3c769262 (diff)
downloadgitea-f029b9ae4f85d5c1d678709ae0e7d656c3fad3db.tar.gz
gitea-f029b9ae4f85d5c1d678709ae0e7d656c3fad3db.zip
Document 409 error returned by repos/migrate api (#19376)
* Document 409 error returned by repos/migrate api * Generate swagger spec Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
-rw-r--r--routers/api/v1/repo/migrate.go2
-rw-r--r--templates/swagger/v1_json.tmpl3
2 files changed, 5 insertions, 0 deletions
diff --git a/routers/api/v1/repo/migrate.go b/routers/api/v1/repo/migrate.go
index d2c2d8ba14..f5851bfcae 100644
--- a/routers/api/v1/repo/migrate.go
+++ b/routers/api/v1/repo/migrate.go
@@ -52,6 +52,8 @@ func Migrate(ctx *context.APIContext) {
// "$ref": "#/responses/Repository"
// "403":
// "$ref": "#/responses/forbidden"
+ // "409":
+ // description: The repository with the same name already exists.
// "422":
// "$ref": "#/responses/validationError"
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 16b0c76400..4bf3874bae 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -2222,6 +2222,9 @@
"403": {
"$ref": "#/responses/forbidden"
},
+ "409": {
+ "description": "The repository with the same name already exists."
+ },
"422": {
"$ref": "#/responses/validationError"
}