Skip to content

Commit c3c0710

Browse files
GiteaBotjolheiser
andauthored
Purge API comment (go-gitea#23451) (go-gitea#23452)
Backport go-gitea#23451 by @jolheiser This PR just adds the `purge` query parameter to the swagger docs for admin user delete. I considered using the same verbiage we have in the UI, but that seemed more verbose than descriptions we use elsewhere in swagger. I'm fine if that's preferred, though, just let me know. 🙂 Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
1 parent fa33919 commit c3c0710

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

routers/api/v1/admin/user.go

+4
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@ func DeleteUser(ctx *context.APIContext) {
305305
// description: username of user to delete
306306
// type: string
307307
// required: true
308+
// - name: purge
309+
// in: query
310+
// description: purge the user from the system completely
311+
// type: boolean
308312
// responses:
309313
// "204":
310314
// "$ref": "#/responses/empty"

templates/swagger/v1_json.tmpl

+6
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,12 @@
493493
"name": "username",
494494
"in": "path",
495495
"required": true
496+
},
497+
{
498+
"type": "boolean",
499+
"description": "purge the user from the system completely",
500+
"name": "purge",
501+
"in": "query"
496502
}
497503
],
498504
"responses": {

0 commit comments

Comments
 (0)