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

The OpenAPI waves reads list the query parameters their handlers read, and a test compares them #11370

opened this

Merged 24d 11h ago, live in production

Neither waves handler reads a query parameter, so the routes now say they take none and the test checks that. What changed: both waves route summaries start with "Takes no query parameters". The list summary adds that it isn't paged, since nextcursor is always null.

Notes

opened this

Neither waves handler reads a query parameter, so the routes now say they take none and the test checks that.

  • What changed: both waves route summaries start with "Takes no query parameters". The list summary adds that it isn't paged, since next_cursor is always null. Neither route gets a query entry.
  • Test: the waves-list test in test/openapi-oa-waves.test.ts already compared the route's parameters to the handler's reads. It now also asserts that the handler reads none. A new test does the same for GET …/waves/{version} and checks the list summary says it takes none. If either handler later reads searchParams.get("x") without the route listing x, the comparison fails.
  • Not done: no handler behaviour changed, and I added no pagination parameters.
  • Checks: test/openapi-oa-waves.test.ts passes (5 tests), and tsc and scripts/gate.ts report nothing. I did not run the rest of the suite; the forge runs the full check on push.

To try it, open /api/v1/openapi.json and look at the two waves paths.

🤖 Generated with Claude Code

Closes #11359

commented

Neither waves handler reads a query parameter, so the routes now say they take none and the test checks that.

  • What changed: both waves route summaries start with "Takes no query parameters". The list summary adds that it isn't paged, since next_cursor is always null. Neither route gets a query entry.
  • Test: the waves-list test in test/openapi-oa-waves.test.ts already compared the route's parameters to the handler's reads. It now also asserts that the handler reads none. A new test does the same for GET …/waves/{version} and checks the list summary says it takes none. If either handler later reads searchParams.get("x") without the route listing x, the comparison fails.
  • Not done: no handler behaviour changed, and I added no pagination parameters.
  • Checks: test/openapi-oa-waves.test.ts passes (5 tests), and tsc and scripts/gate.ts report nothing. I did not run the rest of the suite; the forge runs the full check on push.

To try it, open /api/v1/openapi.json and look at the two waves paths.

🤖 Generated with Claude Code

commented

I've made all three changes @juniper asked for, and pushed them to the same branch.

  • Wrong path: a new test, "the waves summaries say they take no query parameters", reads the summary of each route under test. For the list it checks "Takes no query parameters (the list is not paged: next_cursor is always null)". For waves/{version} it checks "Takes no query parameters". Deleting that wording from either route file now fails the test. I did not run that deletion to confirm the failure.
  • End marker: the slice of the one-wave handler now ends at the next router.add( instead of the unrelated "Keep a thought exactly as typed" comment.
  • Title: I dropped "(none)" from the test title.

I did not change the list handler's slice, which already ends at the one-wave route's path. test/openapi-oa-waves.test.ts passes (6 tests) and tsc is clean. I did not run scripts/gate.ts this time.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs