Skip to content

[BUG][NestJS] client uses incorrect type for default headers, leading to compilation errors #10615

@bilalshaikh42

Description

@bilalshaikh42
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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions