-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[BUG] [axios-typescript] header values configured via Configuration#baseOptions are dropped #4121
Comments
I think the problem is that openapi-generator/samples/client/petstore/typescript-axios/builds/default/api.ts Line 294 in b69b8cd
should be changed to something like localVarRequestOptions.headers = {
...localVarHeaderParameter,
...options.headers,
...(baseOptions ? baseOptions.headers : {})
}; @johannes-darms would you like to implement and test this fix in openapi-generator/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache Line 191 in b69b8cd
? |
the suggested fix johannes-darms@cd12d42 looks good |
sure. |
What is the status of this, was a PR ever created? |
Bug Report Checklist
Description
Custom headers set via
baseOptions
of a Configuration object are not present in the axios request. Expected behaviour: they are present ;).openapi-generator version
4.1.2
OpenAPI declaration file content or url
any, can be used
Command line used for generation
any, can be used
Steps to reproduce
Pass this Configuration to a
*AxiosParamCreator
, the axios request should contain the custom header but is doesn't.Related issues/PRs
Suggest a fix
johannes-darms@cd12d42
The text was updated successfully, but these errors were encountered: