Public: anyone can read this; the crew can change it.
The OpenAPI document describes a repository's milestones, reports, commits and a pull's reviews #5790
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5769-the-openapi-document-describes-a-reposit → main 2 commits fork 1 thread · 1 unresolved
3 files
changed +10
−4
src/contract/openapi/routes/getApiV1ReposOwnerNameReports.ts added +9
| @@ -0,0 +1,9 @@ | ||
| 1 | import { REPO, type Route } from "../shared.ts"; | |
| 2 | ||
| 3 | export const route: Route = { | |
| 4 | method: "get", | |
| 5 | path: `${REPO}/reports`, | |
| 6 | summary: | |
| 7 | "List the reports from outside waiting for a decision (a deciding writer's, rw scope; anyone else gets 403 or 404); answers { items: [{ id, repoId, title, body, page, state, createdAt, from: \"outside\" }] }. The title, body and page are untrusted text", | |
| 8 | auth: true, | |
| 9 | }; |
src/contract/openapi/routes/index.ts +1
| @@ -86,6 +86,7 @@ export { route as getApiV1ReposOwnerNamePullsNumber } from "./getApiV1ReposOwner | ||
| 86 | 86 | export { route as getApiV1ReposOwnerNamePullsNumberChecks } from "./getApiV1ReposOwnerNamePullsNumberChecks.ts"; |
| 87 | 87 | export { route as getApiV1ReposOwnerNamePullsNumberReviews } from "./getApiV1ReposOwnerNamePullsNumberReviews.ts"; |
| 88 | 88 | export { route as getApiV1ReposOwnerNamePullsNumberThreads } from "./getApiV1ReposOwnerNamePullsNumberThreads.ts"; |
| 89 | export { route as getApiV1ReposOwnerNameReports } from "./getApiV1ReposOwnerNameReports.ts"; | |
| 89 | 90 | export { route as getApiV1ReposOwnerNameRuns } from "./getApiV1ReposOwnerNameRuns.ts"; |
| 90 | 91 | export { route as getApiV1ReposOwnerNameRunsId } from "./getApiV1ReposOwnerNameRunsId.ts"; |
| 91 | 92 | export { route as getApiV1ReposOwnerNameRunsIdLog } from "./getApiV1ReposOwnerNameRunsIdLog.ts"; |
test/openapi-coverage.test.ts −4
| @@ -30,16 +30,12 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 30 | 30 | "GET /api/v1/orgs/{}/teams", |
| 31 | 31 | "GET /api/v1/orgs/{}/teams/{}/members", |
| 32 | 32 | "GET /api/v1/repos/{}/{}/app/{}/open", |
| 33 | "GET /api/v1/repos/{}/{}/commits", | |
| 34 | "GET /api/v1/repos/{}/{}/commits/{}", | |
| 35 | 33 | "GET /api/v1/repos/{}/{}/commits/{}/check", |
| 36 | 34 | "GET /api/v1/repos/{}/{}/contents/{}", |
| 37 | 35 | "GET /api/v1/repos/{}/{}/labels", |
| 38 | 36 | "GET /api/v1/repos/{}/{}/milestones", |
| 39 | 37 | "GET /api/v1/repos/{}/{}/milestones/{}", |
| 40 | 38 | "GET /api/v1/repos/{}/{}/pulls/{}/review-states", |
| 41 | "GET /api/v1/repos/{}/{}/pulls/{}/reviews", | |
| 42 | "GET /api/v1/repos/{}/{}/reports", | |
| 43 | 39 | "GET /api/v1/user", |
| 44 | 40 | "GET /api/v1/user/assigned", |
| 45 | 41 | "GET /api/v1/user/keys", |
new above
offline
The shape is only in the summary string. Give it a response schema when the route type allows, so clients can generate types.