WiktorNowikow
5 years agoVisitor
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