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

@ -251,11 +251,11 @@ func GetPushMirrorByName(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, m)
}
// AddPushMirror adds a push mirror to a repository
// AddPushMirror sets up a new push mirror in a repository
func AddPushMirror(ctx *context.APIContext) {
// swagger:operation POST /repos/{owner}/{repo}/push_mirrors repository repoAddPushMirror
// ---
// summary: add a push mirror to the repository
// summary: Set up a new push mirror in a repository
// consumes:
// - application/json
// produces:
@ -296,11 +296,11 @@ func AddPushMirror(ctx *context.APIContext) {
CreatePushMirror(ctx, pushMirror)
}
// DeletePushMirrorByRemoteName deletes a push mirror from a repository by remoteName
// DeletePushMirrorByRemoteName removes a push mirror from a repository by remoteName
func DeletePushMirrorByRemoteName(ctx *context.APIContext) {
// swagger:operation DELETE /repos/{owner}/{repo}/push_mirrors/{name} repository repoDeletePushMirror
// ---
// summary: deletes a push mirror from a repository by remoteName
// summary: Remove a push mirror from a repository by remoteName
// produces:
// - application/json
// parameters: