From f029b9ae4f85d5c1d678709ae0e7d656c3fad3db Mon Sep 17 00:00:00 2001 From: Chongyi Zheng Date: Tue, 12 Apr 2022 04:13:07 -0400 Subject: [PATCH] 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 --- routers/api/v1/repo/migrate.go | 2 ++ templates/swagger/v1_json.tmpl | 3 +++ 2 files changed, 5 insertions(+) diff --git a/routers/api/v1/repo/migrate.go b/routers/api/v1/repo/migrate.go index d2c2d8ba1463..f5851bfcae66 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 16b0c76400b0..4bf3874bae28 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" }