Skip to content

fix(cli): compile OpenAPI path templates correctly - #55

Merged
robinbraemer merged 4 commits into
mainfrom
codex/fix-custom-verb-path-params
Sep 10, 2026
Merged

robinbraemer merged 4 commits into
mainfrom
codex/fix-custom-verb-path-params

Conversation

@robinbraemer

Copy link
Copy Markdown
Member

Why

Production dogfood proved the merged #47 workaround is not router-compatible: generated order-draft custom verbs either failed as a missing path parameter in v0.10.1 or sent %3AselectWorkspace, which production returns as 404. The same compiler also broke embedded brace parameters and wildcard proxy paths.

What

  • preserve OpenAPI {param} and {path:*} templates through generation
  • compile only declared brace parameters while retaining legacy /:param support
  • keep literal AIP custom-verb colons on the wire
  • encode ordinary parameter values, while preserving wildcard path separators
  • regenerate the public Effect client and cover custom verbs, embedded parameters, and wildcard paths

Verification

  • mise run check — 19 files / 177 tests
  • bun run generate:check
  • production dogfood: orderDrafts.selectWorkspace reached the API and advanced the draft instead of failing locally or returning route 404

No release/tag is included.

robinbraemer and others added 4 commits September 10, 2026 14:09
Rationale: Generated custom-verb paths were interpreted as extra path parameters, making production order-draft actions unusable. Preserve OpenAPI brace templates through generation and compile only declared parameters, including embedded and wildcard forms.

Tested: mise run check (19 files, 177 tests); bun run generate:check; production dogfood selectWorkspace reached the API and advanced the draft.
Rationale: OpenAPI brace templates keep AIP custom verbs literal, while the Effect client must retain legacy colon parameter interpolation for dot-delimited and optional paths.\n\nTested: bun run test test/generated-command.test.ts test/generate-effect-api.test.ts test/effect-generator-patch.test.ts; bun run generate:check; mise run check
@robinbraemer
robinbraemer merged commit 67777d7 into main Sep 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant