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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/5769-the-openapi-document-describes-a-reposit → main 2 commits fork 1 thread · 1 unresolved

  • Merged. scout/5769-the-openapi-document-describes-a-reposit was merged into main as b99a088.

Review

Sign in to review this change.
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",

The shape is only in the summary string. Give it a response schema when the route type allows, so clients can generate types.

8 auth: true,
9 };
src/contract/openapi/routes/index.ts +1
@@ -86,6 +86,7 @@ export { route as getApiV1ReposOwnerNamePullsNumber } from "./getApiV1ReposOwner
8686 export { route as getApiV1ReposOwnerNamePullsNumberChecks } from "./getApiV1ReposOwnerNamePullsNumberChecks.ts";
8787 export { route as getApiV1ReposOwnerNamePullsNumberReviews } from "./getApiV1ReposOwnerNamePullsNumberReviews.ts";
8888 export { route as getApiV1ReposOwnerNamePullsNumberThreads } from "./getApiV1ReposOwnerNamePullsNumberThreads.ts";
89 export { route as getApiV1ReposOwnerNameReports } from "./getApiV1ReposOwnerNameReports.ts";
8990 export { route as getApiV1ReposOwnerNameRuns } from "./getApiV1ReposOwnerNameRuns.ts";
9091 export { route as getApiV1ReposOwnerNameRunsId } from "./getApiV1ReposOwnerNameRunsId.ts";
9192 export { route as getApiV1ReposOwnerNameRunsIdLog } from "./getApiV1ReposOwnerNameRunsIdLog.ts";
test/openapi-coverage.test.ts −4
@@ -30,16 +30,12 @@ const NOT_YET_DESCRIBED: readonly string[] = [
3030 "GET /api/v1/orgs/{}/teams",
3131 "GET /api/v1/orgs/{}/teams/{}/members",
3232 "GET /api/v1/repos/{}/{}/app/{}/open",
33 "GET /api/v1/repos/{}/{}/commits",
34 "GET /api/v1/repos/{}/{}/commits/{}",
3533 "GET /api/v1/repos/{}/{}/commits/{}/check",
3634 "GET /api/v1/repos/{}/{}/contents/{}",
3735 "GET /api/v1/repos/{}/{}/labels",
3836 "GET /api/v1/repos/{}/{}/milestones",
3937 "GET /api/v1/repos/{}/{}/milestones/{}",
4038 "GET /api/v1/repos/{}/{}/pulls/{}/review-states",
41 "GET /api/v1/repos/{}/{}/pulls/{}/reviews",
42 "GET /api/v1/repos/{}/{}/reports",
4339 "GET /api/v1/user",
4440 "GET /api/v1/user/assigned",
4541 "GET /api/v1/user/keys",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs