Skip to content
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][NestJS] client uses incorrect type for default headers, leading to compilation errors #10615

Closed
bilalshaikh42 opened this issue Oct 17, 2021 · 0 comments · Fixed by #10616

Comments

@bilalshaikh42
Copy link
Contributor

Description

When generating a service, the default headers are set as follows:

public defaultHeaders = new Map();

However this does not match the type of the headers parameter in AxiosRequestConfig which is

Record<string,string>
openapi-generator version

5.2.1 - not a regression

Generation Details

The issue is present directly in the template of the service, located here:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache

Suggest a fix

I have created a pr to address this

bilalshaikh42 added a commit to bilalshaikh42/openapi-generator that referenced this issue Oct 21, 2021
macjohnny pushed a commit that referenced this issue Oct 21, 2021
* fix(NestJS):  use correct typing for default headers

closes #10615

* Update modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache

Co-authored-by: Alexey Makhrov <amakhrov@gmail.com>

* update

Co-authored-by: Alexey Makhrov <amakhrov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant