cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger. C#. net core. How i can add parent interface of controller to generated client code?

Highlighted

Swagger. C#. net core. How i can add parent interface of controller to generated client code?

Greetings!

How i can add parent interface of controller to generated client code?(Type script)

Example:

public class ProviderController : ApiController, IGlosOperations<ProviderDto>   (C#)
now swagger generate this:

export interface IGlosProviderClient {
    create(dto: ProviderDto): Observable<number>;
    update(dto: ProviderDto): Observable<number>;
    getList(): Observable<ProviderDto[]>;
    get(id: number): Observable<ProviderDto>;
}
export class GlosProviderClient implements IGlosProviderClient 

 

i want to generate IGlosOperations<ProviderDto> on client

Something like this: 

export interface IGlosOperations<BaseDto> {
    create(dto: BaseDto): Observable<number>;
    update(dto: BaseDto): Observable<number>;
    getList(): Observable<BaseDto[]>;
    get(id: number): Observable<BaseDto>;
}
export class GlosProviderClient implements IGlosOperations<ProviderDto>

 

Is it possible?

Best 

Wiktor

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors
Top Kudoed Posts