From 07ca3459c5a6cc07a184784b3697a8dd5e8686bd Mon Sep 17 00:00:00 2001 From: jolheiser Date: Mon, 13 Mar 2023 13:41:21 -0500 Subject: [PATCH 1/2] docs: add purge to swagger docs for admin user delete Signed-off-by: jolheiser --- routers/api/v1/admin/user.go | 4 ++++ templates/swagger/v1_json.tmpl | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 1fbdab3e5598a..71e9c0b562e49 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -305,6 +305,10 @@ func DeleteUser(ctx *context.APIContext) { // description: username of user to delete // type: string // required: true + // - name: purge + // in: query + // description: purge the user from the system completely + // type: bool // responses: // "204": // "$ref": "#/responses/empty" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index cb88e175ea5f8..0a0c831482446 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -493,6 +493,12 @@ "name": "username", "in": "path", "required": true + }, + { + "type": "bool", + "description": "purge the user from the system completely", + "name": "purge", + "in": "query" } ], "responses": { From 8236e4841ff76ebc744dc595fbed1e60699bf128 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Mon, 13 Mar 2023 13:43:52 -0500 Subject: [PATCH 2/2] docs: bool -> boolean Signed-off-by: jolheiser --- routers/api/v1/admin/user.go | 2 +- templates/swagger/v1_json.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 71e9c0b562e49..4192d8654d7c4 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -308,7 +308,7 @@ func DeleteUser(ctx *context.APIContext) { // - name: purge // in: query // description: purge the user from the system completely - // type: bool + // type: boolean // responses: // "204": // "$ref": "#/responses/empty" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 0a0c831482446..b64f6dcd87dcf 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -495,7 +495,7 @@ "required": true }, { - "type": "bool", + "type": "boolean", "description": "purge the user from the system completely", "name": "purge", "in": "query"