From 4211efe8b7a0b38420da5c5d4f287a8d466aedc2 Mon Sep 17 00:00:00 2001 From: caicandong <50507092+CaiCandong@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:48:44 +0800 Subject: [PATCH] fix Missing 404 swagger response docs for /admin/users/{username} (#26086) close #26079 --- 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 7b3a616740..69874bdc75 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" }