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
Generating the hook results in a request without a body, as orval internally resolves this endpoint to only have the application/json request body, which is then filtered out by the include filter.
The problem seems to stem from the getResReqTypes which has a flattening operation as the last step:
What are the steps to reproduce this issue?
Say an endpoint has two valid request content types:
The essence of the issue is that orval keys on the schema reference name, so both content types need to have the same schema reference.
We want the app to prefer using the vendor content type for API versioning, so we configure an override in orval.config.ts:
What happens?
Generating the hook results in a request without a body, as orval internally resolves this endpoint to only have the application/json request body, which is then filtered out by the include filter.
The problem seems to stem from the getResReqTypes which has a flattening operation as the last step:
Where the vendor content type is lost as its uniqueKey is identical to the plain one.
What were you expecting to happen?
I was expecting a hook with a request body
Any logs, error output, etc?
Orval successfully generates the API
Any other comments?
What versions are you using?
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 7 PRO 5850U with Radeon Graphics
Memory: 30.55 GB / 62.83 GB
npmPackages:
@tanstack/react-query: ^5.29.0 => 5.61.4
orval: ^7.3.0 => 7.3.0
react: 18.3.1 => 18.3.1
The text was updated successfully, but these errors were encountered: