What is the best way to support API versioning in this package? #1064
Replies: 2 comments 1 reply
-
|
ORPC doesn't have built-in, prescriptive API versioning, but it gives you all the extension points you need to implement it cleanly. The most common approach is to structure your routers/contracts by version (for example, When generating your OpenAPI spec, you can set the version in the If you need more advanced versioning (like header-based or media-type versioning), you can use plugins or custom adapters—ORPC's plugin system is designed for this kind of extensibility. The key is to keep each version's contract and handler isolated, and use the OpenAPI tooling to generate distinct specs for each version. This approach is flexible and aligns with how ORPC is designed to be extended. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
My recommendation is each version has its own router/contract and handler, and use different prefix to route them /api/v1 /api/v2 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am wondering about how other have thought about incorporating versioning of API's in ORPC? Its an amazing tool and the OPEN API tooling is first class but providing a API usually means you will want to support versioning at some point if 3rd parties are consuming the API.
Beta Was this translation helpful? Give feedback.
All reactions