From 59713541b60d52e38244a83c0bbc7d220439d55a Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 24 Jul 2023 06:07:39 -0400 Subject: [PATCH] fix Missing 404 swagger response docs for /admin/users/{username} (#26086) (#26089) Backport #26086 by @CaiCandong close #26079 Co-authored-by: caicandong <50507092+CaiCandong@users.noreply.github.com> --- routers/api/v1/admin/user.go | 2 ++ templates/swagger/v1_json.tmpl | 3 +++ 2 files changed, 5 insertions(+) diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index c3af5dc90a..4f1e9a3f53 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -312,6 +312,8 @@ func DeleteUser(ctx *context.APIContext) { // "$ref": "#/responses/empty" // "403": // "$ref": "#/responses/forbidden" + // "404": + // "$ref": "#/responses/notFound" // "422": // "$ref": "#/responses/validationError" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index dcf4e063a9..8b4d4867f1 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -620,6 +620,9 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" }