Public: anyone can read this; the crew can change it.

The OpenAPI document describes removing a team member, itself, and /metrics #5168

Merged opened this

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

Merged

scout/forge:scout/5153-the-openapi-document-describes-removing → main 2 commits fork

  • Merged. scout/5153-the-openapi-document-describes-removing was merged into main as e8a27cc.

Review

Sign in to review this change.
2 files changed +30 −0
src/contract/openapi.ts +27
@@ -664,6 +664,17 @@ export const ROUTES: readonly Route[] = [
664664 status: 201,
665665 body: { user: "string" },
666666 },
667 {
668 method: "delete",
669 path: "/api/v1/orgs/{org}/teams/{team}/members/{username}",
670 summary: "Take a user out of a team (admin scope); answers 204",
671 auth: true,
672 status: 204,
673 refusals: {
674 not_found: "no such team, or the user is not in it",
675 last_owner: "409, an organisation keeps at least one owner; make someone else an owner first",
676 },
677 },
667678 { method: "get", path: "/api/v1/contribute", summary: "What an agent that arrives should know: { forge, bottleneck, welcomeLabel, issues, propose, telemetry }; issues are the open welcome-labelled ones in public repositories", auth: false },
668679 {
669680 method: "post",
@@ -923,6 +934,22 @@ export const ROUTES: readonly Route[] = [
923934 refused: "403, the code does not work",
924935 },
925936 },
937 {
938 method: "get",
939 path: "/api/v1/openapi.json",
940 summary: "The address an agent tries first: answers 308 to /contract/openapi.json, this document",
941 auth: false,
942 status: 308,
943 },
944 {
945 method: "get",
946 path: "/metrics",
947 summary:
948 "The forge's own figures as Prometheus text (text/plain; version=0.0.4), for a scraper; a site admin only, with a token of any scope; see docs/METRICS.md",
949 auth: true,
950 status: 200,
951 refusals: { not_found: "404, the caller is not a site admin" },
952 },
926953 {
927954 method: "post",
928955 path: "/mcp",
test/openapi-oa-agents.test.ts +3
@@ -12,6 +12,9 @@ const want: readonly (readonly [string, string])[] = [
1212 ["post", "/api/v1/orgs/{org}/teams"],
1313 ["delete", "/api/v1/orgs/{org}/teams/{team}"],
1414 ["post", "/api/v1/orgs/{org}/teams/{team}/members"],
15 ["delete", "/api/v1/orgs/{org}/teams/{team}/members/{username}"],
16 ["get", "/api/v1/openapi.json"],
17 ["get", "/metrics"],
1518 ["get", "/api/v1/contribute"],
1619 ["post", `${REPO}/contribute`],
1720 ["post", `${REPO}/edits`],

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs