Query params shouldn't accept Record<string, unknown>
#1247
Labels
bug 🔥
Something isn't working
prioritized 🚚
This issue has been prioritized and will be worked on soon
Milestone
Description
The lib is generating a union with
Record<string, unknown>
for query parameters, which doesn't throw type errors when the query schema changes.never
.I realized it also happens for
body
if it isn't defined (check the sample code). I think it should benever
when it isn't defined.Maybe add a configuration like
--use-never
to default any unset value tonever
.Reproducible example or configuration
Check App.tsx:73
https://stackblitz.com/edit/hey-api-client-fetch-example-ssbzuv?file=src%2FApp.tsx&view=editor
OpenAPI specification (optional)
Use the example above.
System information (optional)
@hey-api/openapi-ts: v0.53.6
The text was updated successfully, but these errors were encountered: