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

The OpenAPI document describes the caller's origin apps: list, add and remove #5929

Closed opened this
Closed without merging

scout/forge:scout/5777-the-openapi-document-describes-the-calle → main 1 commit fork 1 thread · 1 unresolved

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
2 files changed +7 −5
src/contract/openapi.ts +7 −2
@@ -857,11 +857,16 @@ export const ROUTES: readonly Route[] = [
857857 auth: true,
858858 refusals: { not_found: "404: no such origin or job of yours" },
859859 },
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`",

This file is on the hold list while open pulls are over 40. Re-cut after the queue drains.

864 auth: true,
865 },
861866 {
862867 method: "post",
863868 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",
865870 auth: true,
866871 body: { host: "string", kind: "string", clientId: "string", clientSecret: "string" },
867872 status: 201,
test/openapi-coverage.test.ts −3
@@ -15,7 +15,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [
1515 "DELETE /api/v1/repos/{}/{}/labels/{}",
1616 "DELETE /api/v1/repos/{}/{}/pulls/{}/hold",
1717 "DELETE /api/v1/user/keys/{}",
18 "DELETE /api/v1/user/origin-apps/{}",
1918 "DELETE /api/v1/user/origins/{}",
2019 "DELETE /api/v1/user/pins/{}/{}",
2120 "GET /api/v1/agents",
@@ -53,7 +52,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [
5352 "GET /api/v1/user/assigned",
5453 "GET /api/v1/user/keys",
5554 "GET /api/v1/user/orgs",
56 "GET /api/v1/user/origin-apps",
5755 "GET /api/v1/user/origins",
5856 "GET /api/v1/user/origins/oauth/{}",
5957 "GET /api/v1/user/origins/{}/browse/{}/{}",
@@ -106,7 +104,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [
106104 "POST /api/v1/repos/{}/{}/runs/{}/steer",
107105 "POST /api/v1/share",
108106 "POST /api/v1/user/keys",
109 "POST /api/v1/user/origin-apps",
110107 "POST /api/v1/user/origins",
111108 "POST /api/v1/user/origins/oauth",
112109 "POST /api/v1/user/origins/{}/browse/{}/{}/contribute",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs