forked from loafle/openapi-generator-original
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:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user