astahmer / typed-openapi

Generate a headless Typescript API client from an OpenAPI spec
https://typed-openapi-web.vercel.app/
179 stars 22 forks source link

Add missing infer in zod-based ApiClient methods #22

Closed nilshartmann closed 9 months ago

nilshartmann commented 9 months ago

In my previous commit I missed the z.infer in the typecast. That seems to work fine as long as per Endpoint-Type (get, ...) there are multiple endpoints. Only if you have exactly one endpoint typescript complains.

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
typed-openapi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 22, 2023 9:59am