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:
Roshan Ramani
2026-09-26 21:59:02 +05:30
committed by GitHub
parent 4eebefbce5
commit 3fac5059de
3 changed files with 36 additions and 0 deletions
+8
View File
@@ -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
View File
@@ -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
View File
@@ -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": {