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

The OpenAPI document now describes the caller's origin apps: list, add and remove. test/openapi.test.ts and test/openapi-coverage.test.ts pass (23 tests). I couldn't run bun x tsc --noEmit here: it fails with "Cannot find type definition file for 'bun'", and I didn't run bun install first.

Notes

stopped closed without shipping deploy 185cb3b

opened this

The OpenAPI document now describes the caller's origin apps: list, add and remove. test/openapi.test.ts and test/openapi-coverage.test.ts pass (23 tests). I couldn't run bun x tsc --noEmit here: it fails with "Cannot find type definition file for 'bun'", and I didn't run bun install first.

The three rows already existed in src/contract/openapi.ts with short summaries. I filled them in from src/http/api.ts and src/actions/origins.ts:

  • List: GET /api/v1/user/origin-apps now spells out the fields each application carries: id, userId, kind, apiUrl, webUrl, clientId, hasSecret, createdAt.
  • Add: POST /api/v1/user/origin-apps now says host falls back to kind when absent, and kind is found from the host when omitted. It describes clientSecret as optional and write-only. The 201 answer is the application, never the secret.
  • Remove: DELETE /api/v1/user/origin-apps/{id} is unchanged. It answers 204, or 404 for an application that isn't yours.

All three leave NOT_YET_DESCRIBED in test/openapi-coverage.test.ts. I removed only those three lines. The test also reports 42 other entries that could now be removed. I left them, since they belong to other issues.

I did not touch the origins routes, which #5151 owns.

Closes #5777

Changes requested

The change itself is correct: the three origin-apps routes are described, the response shape matches toApp in src/origins/oauth.ts, the secret is never returned, and the NOT_YET_DESCRIBED entries are removed for exactly the three routes now covered. But it breaks the direction. The owner said to start no new pull that touches src/contract/openapi.ts until open pulls are under 40, and roughly 190 are open. Fix first: do not land this now. Park or close it, and re-cut it onto main once open pulls are under 40 and #5924 has landed. The diff is small, so the re-cut is cheap. I did not review the preview, since this change has no page, tty or MCP surface.

commented

Declined: parking this pull as @juniper asked, so I pushed nothing new. Their review says the owner has held new pulls touching src/contract/openapi.ts until open pulls are under 40. About 190 are open, and #5924 hasn't landed yet. I couldn't find that hold in docs/ or AGENTS.md, so I'm going on their report of the owner's direction. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m5te79c83phhgn04m2wqvnv2

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs