mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-02 13:40:54 +00:00
Allow TypeScript noImplicitAny: true (#4205)
* Allow TypeScript noImplicitAny: true * Update typescript-angular2 examples
This commit is contained in:
parent
76965594b9
commit
515e723fae
@ -44,7 +44,7 @@ export class {{classname}} {
|
||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||
for(let key in objB){
|
||||
if(objB.hasOwnProperty(key)){
|
||||
objA[key] = objB[key];
|
||||
(objA as any)[key] = (objB as any)[key];
|
||||
}
|
||||
}
|
||||
return <T1&T2>objA;
|
||||
|
@ -49,7 +49,7 @@ export class PetApi {
|
||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||
for(let key in objB){
|
||||
if(objB.hasOwnProperty(key)){
|
||||
objA[key] = objB[key];
|
||||
(objA as any)[key] = (objB as any)[key];
|
||||
}
|
||||
}
|
||||
return <T1&T2>objA;
|
||||
@ -414,17 +414,17 @@ export class PetApi {
|
||||
'application/xml'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (this.configuration.accessToken)
|
||||
{
|
||||
headers.set('Authorization', 'Bearer ' + this.configuration.accessToken);
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ export class StoreApi {
|
||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||
for(let key in objB){
|
||||
if(objB.hasOwnProperty(key)){
|
||||
objA[key] = objB[key];
|
||||
(objA as any)[key] = (objB as any)[key];
|
||||
}
|
||||
}
|
||||
return <T1&T2>objA;
|
||||
|
@ -49,7 +49,7 @@ export class UserApi {
|
||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||
for(let key in objB){
|
||||
if(objB.hasOwnProperty(key)){
|
||||
objA[key] = objB[key];
|
||||
(objA as any)[key] = (objB as any)[key];
|
||||
}
|
||||
}
|
||||
return <T1&T2>objA;
|
||||
|
@ -1,4 +1,4 @@
|
||||
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201611161801
|
||||
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201611201817
|
||||
|
||||
### Building
|
||||
|
||||
@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's.
|
||||
_published:_
|
||||
|
||||
```
|
||||
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201611161801 --save
|
||||
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201611201817 --save
|
||||
```
|
||||
|
||||
_unPublished (not recommended):_
|
||||
|
@ -49,7 +49,7 @@ export class PetApi {
|
||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||
for(let key in objB){
|
||||
if(objB.hasOwnProperty(key)){
|
||||
objA[key] = objB[key];
|
||||
(objA as any)[key] = (objB as any)[key];
|
||||
}
|
||||
}
|
||||
return <T1&T2>objA;
|
||||
@ -414,17 +414,17 @@ export class PetApi {
|
||||
'application/xml'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (this.configuration.accessToken)
|
||||
{
|
||||
headers.set('Authorization', 'Bearer ' + this.configuration.accessToken);
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ export class StoreApi {
|
||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||
for(let key in objB){
|
||||
if(objB.hasOwnProperty(key)){
|
||||
objA[key] = objB[key];
|
||||
(objA as any)[key] = (objB as any)[key];
|
||||
}
|
||||
}
|
||||
return <T1&T2>objA;
|
||||
|
@ -49,7 +49,7 @@ export class UserApi {
|
||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||
for(let key in objB){
|
||||
if(objB.hasOwnProperty(key)){
|
||||
objA[key] = objB[key];
|
||||
(objA as any)[key] = (objB as any)[key];
|
||||
}
|
||||
}
|
||||
return <T1&T2>objA;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@swagger/angular2-typescript-petstore",
|
||||
"version": "0.0.1-SNAPSHOT.201611161801",
|
||||
"version": "0.0.1-SNAPSHOT.201611201817",
|
||||
"description": "swagger client for @swagger/angular2-typescript-petstore",
|
||||
"author": "Swagger Codegen Contributors",
|
||||
"keywords": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user