fix(NestJS): use correct typing for default headers (#10616)

* 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>
This commit is contained in:
Bilal Shaikh
2021-10-21 01:57:31 -04:00
committed by GitHub
parent 108e8e513a
commit 4c8279e3f2
4 changed files with 4 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ export class {{classname}} {
{{/withInterfaces}}
protected basePath = '{{{basePath}}}';
public defaultHeaders = new Map()
public defaultHeaders: Record<string,string> = {};
public configuration = new Configuration();
constructor(protected httpClient: HttpService, @Optional() configuration: Configuration) {

View File

@@ -23,7 +23,7 @@ import { Configuration } from '../configuration';
export class PetService {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders = new Map()
public defaultHeaders: Record<string,string> = {};
public configuration = new Configuration();
constructor(protected httpClient: HttpService, @Optional() configuration: Configuration) {

View File

@@ -22,7 +22,7 @@ import { Configuration } from '../configuration';
export class StoreService {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders = new Map()
public defaultHeaders: Record<string,string> = {};
public configuration = new Configuration();
constructor(protected httpClient: HttpService, @Optional() configuration: Configuration) {

View File

@@ -22,7 +22,7 @@ import { Configuration } from '../configuration';
export class UserService {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders = new Map()
public defaultHeaders: Record<string,string> = {};
public configuration = new Configuration();
constructor(protected httpClient: HttpService, @Optional() configuration: Configuration) {