docs(api): name the unadopted-repository search parameter query (#39370)

`GET /admin/unadopted` documents a `pattern` query parameter, but the
handler reads `query`:

```go
repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx, ctx.FormString("query"), &listOptions)
```

Nothing in the tree reads `pattern`. A client generated from the
published spec sends it, the server ignores it, and the caller gets the
full unadopted list with no error — the failure is silent.

Both spellings date from the commit that added the endpoint,
https://github.com/go-gitea/gitea/pull/12920, so the documentation has
been wrong since 2020 rather than drifting. The handler side is the one
clients already depend on, so this renames the documented parameter and
regenerates the spec.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Roshan Ramani
2026-09-25 18:15:24 +00:00
committed by GitHub
co-authored by silverwind Lunny Xiao
parent 03c7255c9b
commit f0f53a76ee
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -31,9 +31,9 @@ func ListUnadoptedRepositories(ctx *context.APIContext) {
// in: query
// description: page size of results
// type: integer
// - name: pattern
// - name: query
// in: query
// description: pattern of repositories to search for
// description: glob pattern of repositories to search for, in the form owner or owner/repo
// type: string
// responses:
// "200":
+2 -2
View File
@@ -11837,9 +11837,9 @@
}
},
{
"description": "pattern of repositories to search for",
"description": "glob pattern of repositories to search for, in the form owner or owner/repo",
"in": "query",
"name": "pattern",
"name": "query",
"schema": {
"type": "string"
}
+2 -2
View File
@@ -723,8 +723,8 @@
},
{
"type": "string",
"description": "pattern of repositories to search for",
"name": "pattern",
"description": "glob pattern of repositories to search for, in the form owner or owner/repo",
"name": "query",
"in": "query"
}
],