kromm77 icon

Untitled

kromm77 | PRO | 08/28/19 11:22:15 AM UTC | 0 ⭐ | 11729 👁️ | Never ⏰ | []
ECMAScript |

550 B

|

None

|

0 👍

/

0 👎

https://github.com/RicoSuter/NSwag/wiki/TypeScriptClientGenerator 
 
aggiungere in nswag 
 
extensionCode: "path.file.ts"
clientBaseClass : "ServiceBase" 
 
 
 
creo un file path.file.ts  ( non aggiungere import in test perchè viene solo copiato un testa a client.ts generato )
 
```ts
export class ServiceBase { 
 
    protected transformResult(url: string, response: AxiosResponse, processor: (response: AxiosResponse) => Promise<any>): Promise<any> { 
        response.data=        response.data.result;
        return processor(response);
    }
}
```

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎