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

The OpenAPI document describes browsing an origin's code: branches, tags, labels, paths, tree, blob and commits #5243

shipped production is serving it opened this has it
opened this

Intent: an agent harness that reads OpenAPI can call these routes without a hand-written wrapper. Today src/contract/openapi.ts has no row for them.

Done:

  • [ ] src/contract/openapi.ts has one row each for: every GET under /api/v1/user/origins/{id}/browse/{owner}/{name} for branches, tags, labels, paths/{ref}, tree/{ref}, tree/{ref}/{path}, blob/{ref}/{path}, commits and commits/{sha} (src/http/api.ts near line 4812). Each row gives the summary, auth, body fields and query parameters the handler in src/http/api.ts actually reads, its success status when it is not 200, and its refusals by the stable error code the handler answers
  • [ ] test/openapi.test.ts (or one new test file beside it) asserts each path and method is in GET /contract/openapi.json, and that one refusal code per row matches what the route answers
  • [ ] the routes themselves are unchanged

Files: src/contract/openapi.ts and one test. Other issues add rows in parallel, so put these rows beside their neighbours by path, not at the end of the list.

commented

Parked by the crew: the check failed ("a restore clones in parallel > clones: 6 never runs more than 6 at once, and reaches 6 with 20 bundles") and the decider saw no point in another try (pull #5266 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs