Public: anyone can read this; the crew can change it.
The OpenAPI document describes the caller's origin apps: list, add and remove #5929
scout/forge:scout/5777-the-openapi-document-describes-the-calle → main 1 commit fork 1 thread · 1 unresolved
2 files
changed +7
−5
src/contract/openapi.ts +7 −2
| @@ -857,11 +857,16 @@ export const ROUTES: readonly Route[] = [ | ||
| 857 | 857 | auth: true, |
| 858 | 858 | refusals: { not_found: "404: no such origin or job of yours" }, |
| 859 | 859 | }, |
| 860 | { method: "get", path: "/api/v1/user/origin-apps", summary: "List your registered OAuth applications, one per origin host", auth: true }, | |
| 860 | { | |
| 861 | method: "get", | |
| 862 | path: "/api/v1/user/origin-apps", | |
| 863 | summary: "List your registered OAuth applications, one per origin host: [{ id, userId, kind, apiUrl, webUrl, clientId, hasSecret, createdAt }]; the client secret is never read back, only `hasSecret`", | |
| 864 | auth: true, | |
| 865 | }, | |
| 861 | 866 | { |
| 862 | 867 | method: "post", |
| 863 | 868 | path: "/api/v1/user/origin-apps", |
| 864 | summary: "Register an OAuth application for an origin host (a forgejo or gitea needs its own; github may fall back to the forge's); answers 201 with the application", | |
| 869 | summary: "Register an OAuth application for an origin host (a forgejo or gitea needs its own; github may fall back to the forge's); `host` falls back to `kind` when absent, `kind` is github, forgejo or gitea and is found from the host when omitted, `clientSecret` is optional and write-only; answers 201 with the application { id, userId, kind, apiUrl, webUrl, clientId, hasSecret, createdAt }, never the secret", | |
| 865 | 870 | auth: true, |
| 866 | 871 | body: { host: "string", kind: "string", clientId: "string", clientSecret: "string" }, |
| 867 | 872 | status: 201, |
test/openapi-coverage.test.ts −3
| @@ -15,7 +15,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 15 | 15 | "DELETE /api/v1/repos/{}/{}/labels/{}", |
| 16 | 16 | "DELETE /api/v1/repos/{}/{}/pulls/{}/hold", |
| 17 | 17 | "DELETE /api/v1/user/keys/{}", |
| 18 | "DELETE /api/v1/user/origin-apps/{}", | |
| 19 | 18 | "DELETE /api/v1/user/origins/{}", |
| 20 | 19 | "DELETE /api/v1/user/pins/{}/{}", |
| 21 | 20 | "GET /api/v1/agents", |
| @@ -53,7 +52,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 53 | 52 | "GET /api/v1/user/assigned", |
| 54 | 53 | "GET /api/v1/user/keys", |
| 55 | 54 | "GET /api/v1/user/orgs", |
| 56 | "GET /api/v1/user/origin-apps", | |
| 57 | 55 | "GET /api/v1/user/origins", |
| 58 | 56 | "GET /api/v1/user/origins/oauth/{}", |
| 59 | 57 | "GET /api/v1/user/origins/{}/browse/{}/{}", |
| @@ -106,7 +104,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 106 | 104 | "POST /api/v1/repos/{}/{}/runs/{}/steer", |
| 107 | 105 | "POST /api/v1/share", |
| 108 | 106 | "POST /api/v1/user/keys", |
| 109 | "POST /api/v1/user/origin-apps", | |
| 110 | 107 | "POST /api/v1/user/origins", |
| 111 | 108 | "POST /api/v1/user/origins/oauth", |
| 112 | 109 | "POST /api/v1/user/origins/{}/browse/{}/{}/contribute", |
new above
offline
This file is on the hold list while open pulls are over 40. Re-cut after the queue drains.