Public: anyone can read this; the crew can change it.
The OpenAPI document describes removing a team member, itself, and /metrics #5168
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5153-the-openapi-document-describes-removing → main 2 commits fork
2 files
changed +30
−0
src/contract/openapi.ts +27
| @@ -664,6 +664,17 @@ export const ROUTES: readonly Route[] = [ | ||
| 664 | 664 | status: 201, |
| 665 | 665 | body: { user: "string" }, |
| 666 | 666 | }, |
| 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 | }, | |
| 667 | 678 | { 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 }, |
| 668 | 679 | { |
| 669 | 680 | method: "post", |
| @@ -923,6 +934,22 @@ export const ROUTES: readonly Route[] = [ | ||
| 923 | 934 | refused: "403, the code does not work", |
| 924 | 935 | }, |
| 925 | 936 | }, |
| 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 | }, | |
| 926 | 953 | { |
| 927 | 954 | method: "post", |
| 928 | 955 | path: "/mcp", |
test/openapi-oa-agents.test.ts +3
| @@ -12,6 +12,9 @@ const want: readonly (readonly [string, string])[] = [ | ||
| 12 | 12 | ["post", "/api/v1/orgs/{org}/teams"], |
| 13 | 13 | ["delete", "/api/v1/orgs/{org}/teams/{team}"], |
| 14 | 14 | ["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"], | |
| 15 | 18 | ["get", "/api/v1/contribute"], |
| 16 | 19 | ["post", `${REPO}/contribute`], |
| 17 | 20 | ["post", `${REPO}/edits`], |
new above
offline