mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-27 05:25:14 +00:00
docs(api): document verification and files on the compare endpoint (#39440)
`GET /repos/{owner}/{repo}/compare/{basehead}` reads `verification` and
`files` (both default true), the same as the commit endpoints do:
```go
verification := ctx.FormString("verification") == "" || ctx.FormBool("verification")
files := ctx.FormString("files") == "" || ctx.FormBool("files")
```
The spec only lists `output`, so generated clients cannot turn either
off. This documents both with the wording the commit endpoints already
use and regenerates the spec.
Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
@@ -48,6 +48,14 @@ func CompareDiff(ctx *context.APIContext) {
|
||||
// enum:
|
||||
// - diff
|
||||
// - patch
|
||||
// - name: verification
|
||||
// in: query
|
||||
// description: include verification for every commit (disable for speedup, default 'true')
|
||||
// type: boolean
|
||||
// - name: files
|
||||
// in: query
|
||||
// description: include a list of affected files for every commit (disable for speedup, default 'true')
|
||||
// type: boolean
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Compare"
|
||||
|
||||
+16
@@ -20936,6 +20936,22 @@
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "include verification for every commit (disable for speedup, default 'true')",
|
||||
"in": "query",
|
||||
"name": "verification",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "include a list of affected files for every commit (disable for speedup, default 'true')",
|
||||
"in": "query",
|
||||
"name": "files",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
+12
@@ -9229,6 +9229,18 @@
|
||||
"description": "return the raw comparison as `diff` or `patch` instead of JSON",
|
||||
"name": "output",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "include verification for every commit (disable for speedup, default 'true')",
|
||||
"name": "verification",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "include a list of affected files for every commit (disable for speedup, default 'true')",
|
||||
"name": "files",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
Reference in New Issue
Block a user