Skip to content

Conversation

@hyoban
Copy link
Contributor

@hyoban hyoban commented Jan 23, 2026

🎯 Changes

oRPC features a Contract-first mode that allows contracts to be defined in advance that comply with the OpenAPI specification, followed by separate implementations for the frontend and backend.

In this PR, we have introduced the oRPC plugin to generate oRPC Contracts from OpenAPI. This is useful for projects that do not use TypeScript with an oRPC backend.

If you don't want to introduce this plugin, please feel free to close this PR.

To pass the CI, we will need #2368.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is for the docs (no release).

@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2026

🦋 Changeset detected

Latest commit: 0c77396

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@kubb/plugin-orpc Major
@kubb/cli Major
@kubb/core Major
@kubb/mcp Major
@kubb/oas Major
@kubb/plugin-client Major
@kubb/plugin-cypress Major
@kubb/plugin-faker Major
@kubb/plugin-mcp Major
@kubb/plugin-msw Major
@kubb/plugin-oas Major
@kubb/plugin-react-query Major
@kubb/plugin-redoc Major
@kubb/plugin-solid-query Major
@kubb/plugin-svelte-query Major
@kubb/plugin-swr Major
@kubb/plugin-ts Major
@kubb/plugin-vue-query Major
@kubb/plugin-zod Major
kubb Patch
unplugin-kubb Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hyoban hyoban marked this pull request as ready for review January 23, 2026 15:07
@dosubot
Copy link

dosubot bot commented Jan 23, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 23, 2026

More templates

@kubb/cli

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/cli@2367

@kubb/core

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/core@2367

kubb

npm i https://pkg.pr.new/kubb-labs/kubb@2367

@kubb/mcp

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/mcp@2367

@kubb/oas

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/oas@2367

@kubb/plugin-client

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-client@2367

@kubb/plugin-cypress

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-cypress@2367

@kubb/plugin-faker

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-faker@2367

@kubb/plugin-mcp

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-mcp@2367

@kubb/plugin-msw

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-msw@2367

@kubb/plugin-oas

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-oas@2367

@kubb/plugin-orpc

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-orpc@2367

@kubb/plugin-react-query

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-react-query@2367

@kubb/plugin-redoc

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-redoc@2367

@kubb/plugin-solid-query

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-solid-query@2367

@kubb/plugin-svelte-query

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-svelte-query@2367

@kubb/plugin-swr

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-swr@2367

@kubb/plugin-ts

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-ts@2367

@kubb/plugin-vue-query

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-vue-query@2367

@kubb/plugin-zod

npm i https://pkg.pr.new/kubb-labs/kubb/@kubb/plugin-zod@2367

unplugin-kubb

npm i https://pkg.pr.new/kubb-labs/kubb/unplugin-kubb@2367

commit: 7cf07c9

@hyoban hyoban marked this pull request as draft January 24, 2026 03:22
@hyoban hyoban mentioned this pull request Jan 24, 2026
4 tasks
@hyoban hyoban marked this pull request as ready for review January 24, 2026 17:21
@nasoooor29
Copy link

nasoooor29 commented Jan 24, 2026

hello @hyoban thanks for the great plugin i really liked it

i just knew about kubb today so i spent the whole day tinkering it was perfect

i just have a request (if it's fine with you), can you make the extention make something like a subrouter based on the tags?
maybe something like this

to be honest it's just a preference thing but if you can do it it would be great 🫡

https://github.com/nasoooor29/orpc-contract-creator/blob/main/generated/visory/contract.ts#L1096-L1172

sorry i didn't know it was already implemented i didn't see it on the example of the changed files inside the PR

"@kubb/plugin-zod": "workspace:*",
"@kubb/react-fabric": "catalog:"
},
"devDependencies": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need peer dependency for @kubb/react-fabric here lik we have for other plugins

* Name of the exported router object.
* @default 'router'
*/
routerName?: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this mean only one router is possible per openapi file? That is not per router/definitionId?

@stijnvanhulle
Copy link
Collaborator

We will also need some docs so new users can understand what the orpc plugin is about. Also have not yet used Orpc so not 100% sure if everything will work fine. I will try the examples to see what it is about. Thanks for the request and the implementation of this new plugin, approach this a lot!

@hyoban
Copy link
Contributor Author

hyoban commented Jan 26, 2026

Thank you very much for your review. There are still some shortcomings in this PR, and I am happy to fix them and add documentation.

@stijnvanhulle
Copy link
Collaborator

@hyoban thanks, let me know if you need any help here. Also we did some changes so best to pull main and do another pnpm i to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants