docs(openapi): document OpenAPI path parameter syntax requirement ({i… - #1808
docs(openapi): document OpenAPI path parameter syntax requirement ({i…#1808Wadiou wants to merge 1 commit into
Conversation
…d} vs :id)
Add a `### Path parameter syntax ({id} vs :id)` section to `from-v1.mdx` with side-by-side v2 vs v1 CodeGroup examples, and a warning callout in `openapi/routing.mdx`. This clarifies that OpenAPI curly brace syntax (`/{id}`) is required in v2, while Express-style colon parameters (`/:id`) are treated as static literal paths.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
apps/content/docs/migrations/from-v1.mdx: added a### Path parameter syntax (\/{id}` vs `/:id`)subsection with v2/v1examples under## Routing Moved to OpenAPI Metadata`.apps/content/docs/openapi/routing.mdx: added a:::warningcallout under## Path Parametersclarifying that only curly-brace syntax is supported.
I verified the behavioral claims against the implementation: getDynamicPathParams in packages/openapi/src/utils.ts only recognizes segments wrapped in {...} (char codes 123/125), so Express-style :name segments are indeed treated as literal static paths and never extracted into procedure input. The wording is accurate, both files use established doc conventions (:::warning and <CodeGroup> are used throughout the docs), and the new subsection is placed under a sensible heading. Mergeable as-is.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
We don't recommend using the |
Reproduction: Path Parameter Syntax (
|
|
Does the code above actually work in v1? https://github.com/middleapi/orpc/blob/1.x/packages/openapi-client/src/adapters/standard/utils.ts#L13 In v1, I don't think it should work either. I mean, there is only partial support for the |
Minimal Reproduction (
|
|
@dinwwwh i managed to create the exact issue i was having in my project |
|
Should fix in #1818 but there no reason to keep using |
|
ofc i won't use it , it was added by the llm the first time i added orpc so when it was working fine i didn't pay attention to it anyways thanks for your attention |

docs(openapi): document OpenAPI path parameter syntax requirement (
/{id}vs/:id)Summary
### Path parameter syntax ({id} vs :id)section inapps/content/docs/migrations/from-v1.mdxwith side-by-sidev2vsv1<CodeGroup>comparisons.apps/content/docs/openapi/routing.mdxunder## Path Parameters.These updates clarify that oRPC v2 strictly requires OpenAPI curly brace syntax (
/{id}). Express-style colon parameters (/:id) are treated as literal static paths and do not extract path parameters into procedure input (422 INPUT_VALIDATION_FAILED).