File tree Expand file tree Collapse file tree 10 files changed +33
-7
lines changed
modules/openapi-generator/src/main/resources/typescript-nestjs
typescript-nestjs-v6-provided-in-root/builds/default
typescript-nestjs-v8-provided-in-root/builds/default Expand file tree Collapse file tree 10 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,12 @@ export class {{classname}} {
6262 protected basePath = '{ {{basePath} }}';
6363 public defaultHeaders: Record<string ,string > = { } ;
6464 public configuration = new Configuration();
65+ protected httpClient: HttpService;
6566
66- constructor(protected httpClient: HttpService, @Optional() configuration: Configuration) {
67+ constructor(httpClient: HttpService, @Optional() configuration: Configuration) {
6768 this.configuration = configuration || this.configuration;
6869 this.basePath = configuration?.basePath || this.basePath;
70+ this.httpClient = configuration?.httpClient || httpClient;
6971 }
7072
7173 /**
Original file line number Diff line number Diff line change 1+ import type { HttpService } from '@nestjs/axios';
12import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
23
34export interface ConfigurationParameters {
@@ -7,6 +8,7 @@ export interface ConfigurationParameters {
78 accessToken?: string | Promise<string > | (() => string | Promise<string >);
89 basePath?: string;
910 withCredentials?: boolean;
11+ httpClient?: HttpService;
1012}
1113
1214export class Configuration {
@@ -16,6 +18,7 @@ export class Configuration {
1618 accessToken?: string | Promise<string > | (() => string | Promise<string >);
1719 basePath?: string;
1820 withCredentials?: boolean;
21+ httpClient?: HttpService;
1922
2023 constructor(configurationParameters: ConfigurationParameters = { } ) {
2124 this.apiKeys = configurationParameters.apiKeys;
@@ -24,6 +27,7 @@ export class Configuration {
2427 this.accessToken = configurationParameters.accessToken;
2528 this.basePath = configurationParameters.basePath;
2629 this.withCredentials = configurationParameters.withCredentials;
30+ this.httpClient = configurationParameters.httpClient;
2731 }
2832
2933 /**
Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ export class PetService {
2626 protected basePath = 'http://petstore.swagger.io/v2' ;
2727 public defaultHeaders : Record < string , string > = { } ;
2828 public configuration = new Configuration ( ) ;
29+ protected httpClient : HttpService ;
2930
30- constructor ( protected httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
31+ constructor ( httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
3132 this . configuration = configuration || this . configuration ;
3233 this . basePath = configuration ?. basePath || this . basePath ;
34+ this . httpClient = configuration ?. httpClient || httpClient ;
3335 }
3436
3537 /**
Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ export class StoreService {
2525 protected basePath = 'http://petstore.swagger.io/v2' ;
2626 public defaultHeaders : Record < string , string > = { } ;
2727 public configuration = new Configuration ( ) ;
28+ protected httpClient : HttpService ;
2829
29- constructor ( protected httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
30+ constructor ( httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
3031 this . configuration = configuration || this . configuration ;
3132 this . basePath = configuration ?. basePath || this . basePath ;
33+ this . httpClient = configuration ?. httpClient || httpClient ;
3234 }
3335
3436 /**
Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ export class UserService {
2525 protected basePath = 'http://petstore.swagger.io/v2' ;
2626 public defaultHeaders : Record < string , string > = { } ;
2727 public configuration = new Configuration ( ) ;
28+ protected httpClient : HttpService ;
2829
29- constructor ( protected httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
30+ constructor ( httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
3031 this . configuration = configuration || this . configuration ;
3132 this . basePath = configuration ?. basePath || this . basePath ;
33+ this . httpClient = configuration ?. httpClient || httpClient ;
3234 }
3335
3436 /**
Original file line number Diff line number Diff line change 1+ import type { HttpService } from '@nestjs/axios' ;
12import { ModuleMetadata , Type } from '@nestjs/common/interfaces' ;
23
34export interface ConfigurationParameters {
@@ -7,6 +8,7 @@ export interface ConfigurationParameters {
78 accessToken ?: string | Promise < string > | ( ( ) => string | Promise < string > ) ;
89 basePath ?: string ;
910 withCredentials ?: boolean ;
11+ httpClient ?: HttpService ;
1012}
1113
1214export class Configuration {
@@ -16,6 +18,7 @@ export class Configuration {
1618 accessToken ?: string | Promise < string > | ( ( ) => string | Promise < string > ) ;
1719 basePath ?: string ;
1820 withCredentials ?: boolean ;
21+ httpClient ?: HttpService ;
1922
2023 constructor ( configurationParameters : ConfigurationParameters = { } ) {
2124 this . apiKeys = configurationParameters . apiKeys ;
@@ -24,6 +27,7 @@ export class Configuration {
2427 this . accessToken = configurationParameters . accessToken ;
2528 this . basePath = configurationParameters . basePath ;
2629 this . withCredentials = configurationParameters . withCredentials ;
30+ this . httpClient = configurationParameters . httpClient ;
2731 }
2832
2933 /**
Original file line number Diff line number Diff line change @@ -27,10 +27,12 @@ export class PetService {
2727 protected basePath = 'http://petstore.swagger.io/v2' ;
2828 public defaultHeaders : Record < string , string > = { } ;
2929 public configuration = new Configuration ( ) ;
30+ protected httpClient : HttpService ;
3031
31- constructor ( protected httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
32+ constructor ( httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
3233 this . configuration = configuration || this . configuration ;
3334 this . basePath = configuration ?. basePath || this . basePath ;
35+ this . httpClient = configuration ?. httpClient || httpClient ;
3436 }
3537
3638 /**
Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ export class StoreService {
2626 protected basePath = 'http://petstore.swagger.io/v2' ;
2727 public defaultHeaders : Record < string , string > = { } ;
2828 public configuration = new Configuration ( ) ;
29+ protected httpClient : HttpService ;
2930
30- constructor ( protected httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
31+ constructor ( httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
3132 this . configuration = configuration || this . configuration ;
3233 this . basePath = configuration ?. basePath || this . basePath ;
34+ this . httpClient = configuration ?. httpClient || httpClient ;
3335 }
3436
3537 /**
Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ export class UserService {
2626 protected basePath = 'http://petstore.swagger.io/v2' ;
2727 public defaultHeaders : Record < string , string > = { } ;
2828 public configuration = new Configuration ( ) ;
29+ protected httpClient : HttpService ;
2930
30- constructor ( protected httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
31+ constructor ( httpClient : HttpService , @Optional ( ) configuration : Configuration ) {
3132 this . configuration = configuration || this . configuration ;
3233 this . basePath = configuration ?. basePath || this . basePath ;
34+ this . httpClient = configuration ?. httpClient || httpClient ;
3335 }
3436
3537 /**
Original file line number Diff line number Diff line change 1+ import type { HttpService } from '@nestjs/axios' ;
12import { ModuleMetadata , Type } from '@nestjs/common/interfaces' ;
23
34export interface ConfigurationParameters {
@@ -7,6 +8,7 @@ export interface ConfigurationParameters {
78 accessToken ?: string | Promise < string > | ( ( ) => string | Promise < string > ) ;
89 basePath ?: string ;
910 withCredentials ?: boolean ;
11+ httpClient ?: HttpService ;
1012}
1113
1214export class Configuration {
@@ -16,6 +18,7 @@ export class Configuration {
1618 accessToken ?: string | Promise < string > | ( ( ) => string | Promise < string > ) ;
1719 basePath ?: string ;
1820 withCredentials ?: boolean ;
21+ httpClient ?: HttpService ;
1922
2023 constructor ( configurationParameters : ConfigurationParameters = { } ) {
2124 this . apiKeys = configurationParameters . apiKeys ;
@@ -24,6 +27,7 @@ export class Configuration {
2427 this . accessToken = configurationParameters . accessToken ;
2528 this . basePath = configurationParameters . basePath ;
2629 this . withCredentials = configurationParameters . withCredentials ;
30+ this . httpClient = configurationParameters . httpClient ;
2731 }
2832
2933 /**
You can’t perform that action at this time.
0 commit comments