Public: anyone can read this; the crew can change it.
The OpenAPI document describes making and deleting a repository, its branches, and listing and committing contents #5786
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5767-the-openapi-document-describes-making-an → main 1 commit fork
2 files
changed +12
−8
src/contract/openapi.ts +12 −1
| @@ -325,7 +325,18 @@ export const ROUTES: readonly Route[] = [ | ||
| 325 | 325 | }, |
| 326 | 326 | { method: "get", path: `${REPO}/issues`, summary: "List a repository's issues; fields=brief leaves out bodies and comments, any other fields value is a 422 invalid_fields", auth: false, query: { ...LIST_QUERY, fields: "string" } }, |
| 327 | 327 | { method: "get", path: `${REPO}/pulls`, summary: "List a repository's pulls", auth: false, query: LIST_QUERY }, |
| 328 | { method: "get", path: `${REPO}/branches`, summary: "List a repository's branches as a bare array of { name, oid, isDefault, ahead, behind, protected }; ahead and behind are null past the comparison cap; a private repository needs a token", auth: false }, | |
| 328 | { | |
| 329 | method: "get", | |
| 330 | path: `${REPO}/branches`, | |
| 331 | summary: | |
| 332 | "List a repository's branches; answers { items: [{ name, oid, isDefault, ahead, behind, protected }], next_cursor }; ahead and behind are null past the comparison cap; limit 1 to 200, cursor from next_cursor; a private repository needs a token", | |
| 333 | auth: false, | |
| 334 | query: { limit: "integer", cursor: "string" }, | |
| 335 | refusals: { | |
| 336 | invalid_limit: "limit is not a whole number from 1 to 200 (422)", | |
| 337 | invalid_cursor: "cursor is not the next_cursor of a page before (422)", | |
| 338 | }, | |
| 339 | }, | |
| 329 | 340 | { method: "get", path: `${REPO}/commits`, summary: "List commits newest first from `ref` (default: the default branch) as a bare array of { oid, parents, author, email, date, subject, body }; limit 1 to 100 (default 30); an unsafe ref is a 422 bad_ref; a private repository needs a token", auth: false, query: { ref: "string", limit: "integer" } }, |
| 330 | 341 | { method: "get", path: `${REPO}/commits/{oid}`, summary: "Read one commit (a full or abbreviated id, or a ref) as { oid, parents, author, email, date, subject, body, diff: { files, additions, deletions } }; a private repository needs a token", auth: false }, |
| 331 | 342 | { method: "get", path: `${REPO}/contents`, summary: "Read the tree or a file at `ref` (default: the default branch); no `path` or a directory answers { type: \"dir\", ref, path, entries }, a file answers { type: \"file\", ref, path, size, encoding: \"utf-8\" | \"base64\", content }, a file over 5 MB is a 413 { type: \"file\", tooLarge: true, size }; a private repository needs a token", auth: false, query: { path: "string", ref: "string" } }, |
test/openapi-coverage.test.ts −7
| @@ -10,8 +10,6 @@ import { ROUTES } from "../src/contract/openapi.ts"; | ||
| 10 | 10 | const NOT_YET_DESCRIBED: readonly string[] = [ |
| 11 | 11 | "DELETE /api/v1/boards/{}", |
| 12 | 12 | "DELETE /api/v1/orgs/{}/teams/{}/members/{}", |
| 13 | "DELETE /api/v1/repos/{}/{}", | |
| 14 | "DELETE /api/v1/repos/{}/{}/branches/{}", | |
| 15 | 13 | "DELETE /api/v1/repos/{}/{}/labels/{}", |
| 16 | 14 | "DELETE /api/v1/repos/{}/{}/pulls/{}/hold", |
| 17 | 15 | "DELETE /api/v1/user/keys/{}", |
| @@ -33,11 +31,9 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 33 | 31 | "GET /api/v1/orgs/{}/teams", |
| 34 | 32 | "GET /api/v1/orgs/{}/teams/{}/members", |
| 35 | 33 | "GET /api/v1/repos/{}/{}/app/{}/open", |
| 36 | "GET /api/v1/repos/{}/{}/branches", | |
| 37 | 34 | "GET /api/v1/repos/{}/{}/commits", |
| 38 | 35 | "GET /api/v1/repos/{}/{}/commits/{}", |
| 39 | 36 | "GET /api/v1/repos/{}/{}/commits/{}/check", |
| 40 | "GET /api/v1/repos/{}/{}/contents", | |
| 41 | 37 | "GET /api/v1/repos/{}/{}/contents/{}", |
| 42 | 38 | "GET /api/v1/repos/{}/{}/issues/{}/dependencies", |
| 43 | 39 | "GET /api/v1/repos/{}/{}/issues/{}/teams", |
| @@ -87,9 +83,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 87 | 83 | "POST /api/v1/boards/query", |
| 88 | 84 | "POST /api/v1/feed/chips", |
| 89 | 85 | "POST /api/v1/feed/interactions", |
| 90 | "POST /api/v1/repos", | |
| 91 | "POST /api/v1/repos/{}/{}/branches", | |
| 92 | "POST /api/v1/repos/{}/{}/contents", | |
| 93 | 86 | "POST /api/v1/repos/{}/{}/issues/{}/dependencies/{}/confirm", |
| 94 | 87 | "POST /api/v1/repos/{}/{}/issues/{}/private", |
| 95 | 88 | "POST /api/v1/repos/{}/{}/labels", |
new above
offline