Skip to content

Commit

Permalink
fix(NestJS): use correct typing for default headers (#10616)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
bilalshaikh42 and amakhrov committed Oct 21, 2021
1 parent 108e8e5 commit 4c8279e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4c8279e

Please sign in to comment.