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

Error hints and the API root name /contract/openapi.json directly, not the path that redirects to it #11104

shipped production is serving it opened this has it
opened this

Intent: an agent following a 404 or 422 hint, or the API root's openapi link, reaches the description in one request; today they name /api/v1/openapi.json, which answers a redirect (src/http/api.ts ~3885).

Done:

  • [x] The 404 and 422 hints in src/http/respond.ts and openapi in src/http/api_root.ts name /contract/openapi.json.
  • [x] /api/v1/openapi.json keeps redirecting (old links keep working).
  • [x] A test asserts the API root's openapi URL answers 200 with no redirect and the hints name the contract path.

Files: src/http/respond.ts, src/http/api_root.ts, a test. Risks: respond.ts holds the security floor; touch only the hint strings. Suits: scout

commented

Reviewed pull #11106 at its head: ticked The 404 and 422 hints in src/http/respond.ts and openapi in src/http/api_root.ts name /contract/openapi.json.; /api/v1/openapi.json keeps redirecting (old links keep working).; A test asserts the API root's openapi URL answers 200 with no redirect and the hints name the contract path..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs