mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-02 21:02:09 +00:00
Improve Swagger documentation for user endpoints
(cherry picked from commit b074e08f34
)
This commit is contained in:
parent
a167d7b91c
commit
72cbefe63e
23 changed files with 703 additions and 2 deletions
|
@ -136,6 +136,10 @@ func GetAuthenticatedUser(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/User"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
ctx.JSON(http.StatusOK, convert.ToUser(ctx, ctx.Doer, ctx.Doer))
|
||||
}
|
||||
|
@ -243,6 +247,10 @@ func ListBlockedUsers(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/BlockedUserList"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
utils.ListUserBlockedUsers(ctx, ctx.Doer)
|
||||
}
|
||||
|
@ -263,6 +271,10 @@ func BlockUser(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
// "422":
|
||||
|
@ -292,6 +304,10 @@ func UnblockUser(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
// "422":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue