File tree Expand file tree Collapse file tree 17 files changed +38
-103
lines changed
modules/openapi-generator/src/main/resources/typescript-axios
echo_api/typescript-axios/build
others/typescript-axios/with-separate-models-and-api-inheritance
petstore/typescript-axios/builds
with-fake-endpoints-models-for-testing-with-http-signature
with-interfaces-and-with-single-request-param
with-npm-version-and-separate-models-and-api
with-single-request-parameters Expand file tree Collapse file tree 17 files changed +38
-103
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ generatorName: typescript-axios
22outputDir : samples/client/echo_api/typescript-axios/build
33inputSpec : modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
44templateDir : modules/openapi-generator/src/main/resources/typescript-axios
5+ httpUserAgent : EchoApi/1.0.0
56additionalProperties :
67 artifactId : echo-api-typescript-axios
78 hideGenerationTimestamp : " true"
Original file line number Diff line number Diff line change @@ -78,13 +78,17 @@ export class Configuration {
7878 this.accessToken = param.accessToken;
7979 this.basePath = param.basePath;
8080 this.serverIndex = param.serverIndex;
81+ {{#httpUserAgent} }
8182 this.baseOptions = {
83+ ...param.baseOptions,
8284 headers: {
8385 ...param.baseOptions?.headers,
84- ' User-Agent' : " OpenAPI-Generator{{#npmVersion}}/{{npmVersion}}{{/npmVersion}}/typescript-axios "
86+ ' User-Agent' : " {{httpUserAgent}} " ,
8587 } ,
86- ...param.baseOptions
87- };
88+ };{ {/httpUserAgent} }
89+ { {^httpUserAgent} }
90+ this.baseOptions = param.baseOptions;
91+ { {/httpUserAgent} }
8892 this.formDataCtor = param.formDataCtor;
8993 }
9094
Original file line number Diff line number Diff line change @@ -90,11 +90,11 @@ export class Configuration {
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
9292 this . baseOptions = {
93+ ...param . baseOptions ,
9394 headers : {
9495 ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator /1.0.0/typescript-axios"
96+ 'User-Agent' : "EchoApi /1.0.0" ,
9697 } ,
97- ...param . baseOptions
9898 } ;
9999 this . formDataCtor = param . formDataCtor ;
100100 }
Original file line number Diff line number Diff line change @@ -89,13 +89,8 @@ export class Configuration {
8989 this . accessToken = param . accessToken ;
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
92- this . baseOptions = {
93- headers : {
94- ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96- } ,
97- ...param . baseOptions
98- } ;
92+
93+ this . baseOptions = param . baseOptions ;
9994 this . formDataCtor = param . formDataCtor ;
10095 }
10196
Original file line number Diff line number Diff line change @@ -89,13 +89,8 @@ export class Configuration {
8989 this . accessToken = param . accessToken ;
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
92- this . baseOptions = {
93- headers : {
94- ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96- } ,
97- ...param . baseOptions
98- } ;
92+
93+ this . baseOptions = param . baseOptions ;
9994 this . formDataCtor = param . formDataCtor ;
10095 }
10196
Original file line number Diff line number Diff line change @@ -89,13 +89,8 @@ export class Configuration {
8989 this . accessToken = param . accessToken ;
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
92- this . baseOptions = {
93- headers : {
94- ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96- } ,
97- ...param . baseOptions
98- } ;
92+
93+ this . baseOptions = param . baseOptions ;
9994 this . formDataCtor = param . formDataCtor ;
10095 }
10196
Original file line number Diff line number Diff line change @@ -89,13 +89,8 @@ export class Configuration {
8989 this . accessToken = param . accessToken ;
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
92- this . baseOptions = {
93- headers : {
94- ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator/1.0.0/typescript-axios"
96- } ,
97- ...param . baseOptions
98- } ;
92+
93+ this . baseOptions = param . baseOptions ;
9994 this . formDataCtor = param . formDataCtor ;
10095 }
10196
Original file line number Diff line number Diff line change @@ -89,13 +89,8 @@ export class Configuration {
8989 this . accessToken = param . accessToken ;
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
92- this . baseOptions = {
93- headers : {
94- ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96- } ,
97- ...param . baseOptions
98- } ;
92+
93+ this . baseOptions = param . baseOptions ;
9994 this . formDataCtor = param . formDataCtor ;
10095 }
10196
Original file line number Diff line number Diff line change @@ -89,13 +89,8 @@ export class Configuration {
8989 this . accessToken = param . accessToken ;
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
92- this . baseOptions = {
93- headers : {
94- ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator/1.0.0/typescript-axios"
96- } ,
97- ...param . baseOptions
98- } ;
92+
93+ this . baseOptions = param . baseOptions ;
9994 this . formDataCtor = param . formDataCtor ;
10095 }
10196
Original file line number Diff line number Diff line change @@ -89,13 +89,8 @@ export class Configuration {
8989 this . accessToken = param . accessToken ;
9090 this . basePath = param . basePath ;
9191 this . serverIndex = param . serverIndex ;
92- this . baseOptions = {
93- headers : {
94- ...param . baseOptions ?. headers ,
95- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96- } ,
97- ...param . baseOptions
98- } ;
92+
93+ this . baseOptions = param . baseOptions ;
9994 this . formDataCtor = param . formDataCtor ;
10095 }
10196
You can’t perform that action at this time.
0 commit comments