feat(openapi-ts): add orpc plugin for generating oRPC contracts#3264
feat(openapi-ts): add orpc plugin for generating oRPC contracts#3264hyoban wants to merge 23 commits intohey-api:mainfrom
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.
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.
for better compatiblity, header should be lowercase
There was a problem hiding this comment.
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.
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.