From 1cd4d4b00eeaf13d99164a4636059ee049297943 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> (cherry picked from commit 59713541b60d52e38244a83c0bbc7d220439d55a) --- 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 f8994592d7..165a611d95 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" }