chore(api): update swagger method descripitons (#8728)

Speaking from personal experience, when exploring the API I find myself trying to parse the exact meaning of many descriptions for a while, and I also have to get used to many different kinds of inconsistencies and grammar issues.

This PR improves a few of these. Some I tried to reword to make them easier to understand, for others I just improved consistency a little, like capitalization. This area needs more work, this PR just makes some progress. Anything that is improved in this one can be improved further in later PRs, so in review please focus on regressions if you find any.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8728
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
0ko 2025-07-30 18:08:28 +02:00 committed by Gusted
commit 022ab86988
18 changed files with 113 additions and 113 deletions

View file

@ -16,12 +16,12 @@ import (
user_service "forgejo.org/services/user"
)
// ListEmails list all of the authenticated user's email addresses
// ListEmails lists doer's all email addresses
// see https://github.com/gogits/go-gogs-client/wiki/Users-Emails#list-email-addresses-for-a-user
func ListEmails(ctx *context.APIContext) {
// swagger:operation GET /user/emails user userListEmails
// ---
// summary: List the authenticated user's email addresses
// summary: List all email addresses of the current user
// produces:
// - application/json
// responses:
@ -44,11 +44,11 @@ func ListEmails(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, &apiEmails)
}
// AddEmail add an email address
// AddEmail adds an email address to doer's account
func AddEmail(ctx *context.APIContext) {
// swagger:operation POST /user/emails user userAddEmail
// ---
// summary: Add email addresses
// summary: Add an email addresses to the current user's account
// produces:
// - application/json
// parameters:
@ -102,11 +102,11 @@ func AddEmail(ctx *context.APIContext) {
ctx.JSON(http.StatusCreated, apiEmails)
}
// DeleteEmail delete email
// DeleteEmail deletes an email address from doer's account
func DeleteEmail(ctx *context.APIContext) {
// swagger:operation DELETE /user/emails user userDeleteEmail
// ---
// summary: Delete email addresses
// summary: Delete email addresses from the current user's account
// produces:
// - application/json
// parameters: