Closed melloware closed 1 week ago
Hi @melloware, Please give me some time to think about this response.
Yep converting to draft was just seeing if that is what the OP meant!
@melloware Thanks, the PR looks good to me. I think Orval doesn't need to check to add the headers to the response only when custom headers are detected in openapi.yaml. Headers should be included by default.
@soartec-lab you are more familiar with this code did you want to submit a PR and I can close this one?
OK changes made
@melloware
Thanks!
can you regenerate the fetch
client and update the custom-fetch
implement in sample apps ?
@soartec-lab not sure what you mean by regenerate but i updated orval.config.js
and custom-fetch.js
in samples directory.
@melloware
Sorry for confusing you. To be more precise, I would like you to regenerate the sample app using the following command.
cd samples
yarn generate-api --force
Your change adds headers
to returnType
, so the returnType
of the sample app generated by orval should also be updated.
Weird when I run that command in samples I get..
Tasks: 0 successful, 21 total
Cached: 0 cached, 21 total
Time: 1.957s
Failed: react-query-basic#generate-api, react-query-form-data#generate-api, react-query-form-url-encoded#generate-api
ERROR run failed: command exited (1)
Would you like to just merge this PR and then you can take a look?
@melloware Can I run it and put commits on this branch ?
Oh sure thing my branch should be editable for you!
@melloware
Can you try cherry-pick
this ?
https://github.com/orval-labs/orval/pull/1699/commits/13533d5d1e8ab2776653c642547cfe65419855c3
Or if you like, you can switch to this PR.
Fix #1694 add response headers in fetch client