You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type error can be seen when hovering the options object passed to $api(...) in the server/routes/test.get.ts file.
Describe the bug
openapi-typescript generates types based on the openapi schema which uses the singular form of headers (i.e. header instead). This seems to be used directly when typing the options you can pass to the $api function exposed by nuxt-api-party. This means, that a type error arises when I do something like the following:
The code works as intended, but the schema requires that the headers prop is called header instead, which will result in a runtime error since that is not how headers are passed to $api().
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered:
Environment
Windows_NT
v22.13.1
3.15.2
3.20.0
2.10.4
[email protected]
-
extends
,modules
,ssr
,css
,runtimeConfig
,future
,compatibilityDate
,postcss
,primevue
@primevue/[email protected]
,@nuxt/test-utils/[email protected]
,@nuxt/[email protected]
,[email protected]
,@vueuse/[email protected]
,[email protected]
,[email protected]
-
Reproduction
https://stackblitz.com/edit/github-xdmxkcqn?file=routes%2Ftest.get.ts
Type error can be seen when hovering the options object passed to
$api(...)
in theserver/routes/test.get.ts
file.Describe the bug
openapi-typescript
generates types based on the openapi schema which uses the singular form ofheaders
(i.e.header
instead). This seems to be used directly when typing the options you can pass to the$api
function exposed bynuxt-api-party
. This means, that a type error arises when I do something like the following:The code works as intended, but the schema requires that the
headers
prop is calledheader
instead, which will result in a runtime error since that is not how headers are passed to$api()
.Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: