Skip to content

Commit

Permalink
Purge API comment (go-gitea#23451) (go-gitea#23452)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
GiteaBot and jolheiser authored Mar 13, 2023
1 parent fa33919 commit c3c0710
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routers/api/v1/admin/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: boolean
// responses:
// "204":
// "$ref": "#/responses/empty"
Expand Down
6 changes: 6 additions & 0 deletions templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,12 @@
"name": "username",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "purge the user from the system completely",
"name": "purge",
"in": "query"
}
],
"responses": {
Expand Down

0 comments on commit c3c0710

Please sign in to comment.