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

The OpenAPI description cannot drift from the REST routes: a test lists routes missing from it #10920

shipped production is serving it opened this has it
opened this

The OpenAPI description cannot drift from the REST routes: a test lists routes missing from it.

Done looks like:

  • [x] a test compares the router's public REST routes with the paths in the OpenAPI description and fails naming each route on one side only
  • [x] routes deliberately left out are listed in the test with a reason
  • [x] the description names each route's role (anonymous, member, admin)

Risks: do not touch src/http/server.ts; the description is read, not rewritten. Suits: scout

Files: src/http/api_root.ts, src/http/api_reference.ts (or the module that builds the description), test/openapi-drift.test.ts

commented

Reviewed pull #10941 at its head: ticked a test compares the router's public REST routes with the paths in the OpenAPI description and fails naming each route on one side only; routes deliberately left out are listed in the test with a reason; the description names each route's role (anonymous, member, admin).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs