-
-
Notifications
You must be signed in to change notification settings - Fork 298
feat(openapi-ts): add orpc plugin for generating oRPC contracts #3264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
|
|
@hyoban is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3264 +/- ##
==========================================
- Coverage 35.74% 35.50% -0.24%
==========================================
Files 454 457 +3
Lines 34650 34970 +320
Branches 2475 2475
==========================================
+ Hits 12385 12417 +32
- Misses 22236 22524 +288
Partials 29 29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@hey-api/codegen-core
@hey-api/nuxt
@hey-api/openapi-ts
@hey-api/types
@hey-api/vite-plugin
commit: |
| * | ||
| * @default (id) => `${id}Contract` | ||
| */ | ||
| contractNameBuilder?: (operationId: string) => string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following current options:
- contractNameBuilder
- defaultTag
- groupKeyBuilder
- operationKeyBuilder
- routerName
Sound awful lot like the Structure API for SDK operations. I'd suggest looking at the Output section in SDK docs (all the way to Auth), that should give you an idea how much control people can get with those options. The configuration is here and implementation entry point is here.
Co-authored-by: Lubos <lubos@heyapi.dev>
Co-authored-by: Lubos <lubos@heyapi.dev>
| }), | ||
| query: z.optional(z.never()), | ||
| headers: z.optional(z.object({ | ||
| 'X-Request-Id': z.optional(z.string()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for better compatiblity, header should be lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you share any details about which services might be incompatible with this casing? I would've actually defaulted to X-Request-ID based on what I see elsewhere https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node.js HTTP servers normalize header keys to lowercase. This isn't an issue when the contract is only used with the fetch adapter, but it could be problematic if users use it with the oRPC Node adapter server.
No description provided.