-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parmeters set with in: header are not added to headers #1230
Comments
ah good call out—I think this is indeed missing. 🤔 Just from an API perspective, we do have the get('/some/url', {
headers: {
foo: 'bar',
},
params: {
header: {
typedHeader: 'value',
},
},
}); My initial take is “yes,” because probably this is rare—headers will usually be defined on |
The way it works currently is |
Ah yes—my mistake. Edited the code snippet. |
+1, just stumbled on this on my initial experimentation with this library Update: Another option, maybe, would be to extend So you could get strongly typed suggestions in addition to supporting any string keys for headers: get('/some/url', {
headers: {
'x-custom-undocumented-header': 'foo',
typedHeader: 'I am declared in OpenAPI schema',
}
}); |
Fixed in |
Description
When you have a parameter in your openAPI spec with in: header, it is not added to the headers in the request
Reproduction
openapi spec like this:
Generates a schema file like this
which I use like this:
If I look into the request in Firefox, the header parameter is not send with it. I also took a quick look at the code and I don't think this is in there either.
Expected result
Header to be added to the headers.
Checklist
The text was updated successfully, but these errors were encountered: