forked from loafle/openapi-generator-original
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) {
|
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||||
for(let key in objB){
|
for(let key in objB){
|
||||||
if(objB.hasOwnProperty(key)){
|
if(objB.hasOwnProperty(key)){
|
||||||
objA[key] = objB[key];
|
(objA as any)[key] = (objB as any)[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <T1&T2>objA;
|
return <T1&T2>objA;
|
||||||
|
@ -49,7 +49,7 @@ export class PetApi {
|
|||||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||||
for(let key in objB){
|
for(let key in objB){
|
||||||
if(objB.hasOwnProperty(key)){
|
if(objB.hasOwnProperty(key)){
|
||||||
objA[key] = objB[key];
|
(objA as any)[key] = (objB as any)[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <T1&T2>objA;
|
return <T1&T2>objA;
|
||||||
@ -414,17 +414,17 @@ export class PetApi {
|
|||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
|
|
||||||
// authentication (api_key) required
|
|
||||||
if (this.configuration.apiKey)
|
|
||||||
{
|
|
||||||
headers.set('api_key', this.configuration.apiKey);
|
|
||||||
}
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (this.configuration.accessToken)
|
if (this.configuration.accessToken)
|
||||||
{
|
{
|
||||||
headers.set('Authorization', 'Bearer ' + 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) {
|
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||||
for(let key in objB){
|
for(let key in objB){
|
||||||
if(objB.hasOwnProperty(key)){
|
if(objB.hasOwnProperty(key)){
|
||||||
objA[key] = objB[key];
|
(objA as any)[key] = (objB as any)[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <T1&T2>objA;
|
return <T1&T2>objA;
|
||||||
|
@ -49,7 +49,7 @@ export class UserApi {
|
|||||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||||
for(let key in objB){
|
for(let key in objB){
|
||||||
if(objB.hasOwnProperty(key)){
|
if(objB.hasOwnProperty(key)){
|
||||||
objA[key] = objB[key];
|
(objA as any)[key] = (objB as any)[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <T1&T2>objA;
|
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
|
### Building
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's.
|
|||||||
_published:_
|
_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):_
|
_unPublished (not recommended):_
|
||||||
|
@ -49,7 +49,7 @@ export class PetApi {
|
|||||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||||
for(let key in objB){
|
for(let key in objB){
|
||||||
if(objB.hasOwnProperty(key)){
|
if(objB.hasOwnProperty(key)){
|
||||||
objA[key] = objB[key];
|
(objA as any)[key] = (objB as any)[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <T1&T2>objA;
|
return <T1&T2>objA;
|
||||||
@ -414,17 +414,17 @@ export class PetApi {
|
|||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
|
|
||||||
// authentication (api_key) required
|
|
||||||
if (this.configuration.apiKey)
|
|
||||||
{
|
|
||||||
headers.set('api_key', this.configuration.apiKey);
|
|
||||||
}
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (this.configuration.accessToken)
|
if (this.configuration.accessToken)
|
||||||
{
|
{
|
||||||
headers.set('Authorization', 'Bearer ' + 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) {
|
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||||
for(let key in objB){
|
for(let key in objB){
|
||||||
if(objB.hasOwnProperty(key)){
|
if(objB.hasOwnProperty(key)){
|
||||||
objA[key] = objB[key];
|
(objA as any)[key] = (objB as any)[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <T1&T2>objA;
|
return <T1&T2>objA;
|
||||||
|
@ -49,7 +49,7 @@ export class UserApi {
|
|||||||
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
private extendObj<T1,T2>(objA: T1, objB: T2) {
|
||||||
for(let key in objB){
|
for(let key in objB){
|
||||||
if(objB.hasOwnProperty(key)){
|
if(objB.hasOwnProperty(key)){
|
||||||
objA[key] = objB[key];
|
(objA as any)[key] = (objB as any)[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <T1&T2>objA;
|
return <T1&T2>objA;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@swagger/angular2-typescript-petstore",
|
"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",
|
"description": "swagger client for @swagger/angular2-typescript-petstore",
|
||||||
"author": "Swagger Codegen Contributors",
|
"author": "Swagger Codegen Contributors",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user