File tree 17 files changed +21
-32
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
17 files changed +21
-32
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ generatorName: typescript-axios
2
2
outputDir : samples/client/echo_api/typescript-axios/build
3
3
inputSpec : modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
4
4
templateDir : modules/openapi-generator/src/main/resources/typescript-axios
5
+ httpUserAgent : EchoApi/1.0.0
5
6
additionalProperties :
6
7
artifactId : echo-api-typescript-axios
7
8
hideGenerationTimestamp : " true"
Original file line number Diff line number Diff line change @@ -79,11 +79,13 @@ export class Configuration {
79
79
this.basePath = param.basePath;
80
80
this.serverIndex = param.serverIndex;
81
81
this.baseOptions = {
82
+ ...param.baseOptions,
82
83
headers: {
84
+ {{#httpUserAgent} }
85
+ 'User-Agent': "{ {httpUserAgent} }",
86
+ { {/httpUserAgent} }
83
87
...param.baseOptions?.headers,
84
- ' User-Agent' : " OpenAPI-Generator{{#npmVersion}}/{{npmVersion}}{{/npmVersion}}/typescript-axios"
85
88
},
86
- ...param.baseOptions
87
89
};
88
90
this.formDataCtor = param.formDataCtor;
89
91
}
Original file line number Diff line number Diff line change @@ -90,11 +90,11 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
95
+ 'User-Agent' : "EchoApi/1.0.0" ,
94
96
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/1.0.0/typescript-axios"
96
97
} ,
97
- ...param . baseOptions
98
98
} ;
99
99
this . formDataCtor = param . formDataCtor ;
100
100
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/1.0.0/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/1.0.0/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/1.0.0/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/1.0.0/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
Original file line number Diff line number Diff line change @@ -90,11 +90,10 @@ export class Configuration {
90
90
this . basePath = param . basePath ;
91
91
this . serverIndex = param . serverIndex ;
92
92
this . baseOptions = {
93
+ ...param . baseOptions ,
93
94
headers : {
94
95
...param . baseOptions ?. headers ,
95
- 'User-Agent' : "OpenAPI-Generator/typescript-axios"
96
96
} ,
97
- ...param . baseOptions
98
97
} ;
99
98
this . formDataCtor = param . formDataCtor ;
100
99
}
You can’t perform that action at this time.
0 commit comments