refit icon indicating copy to clipboard operation
refit copied to clipboard

Composing multiple interfaces for one API.

Open 7amou3 opened this issue 2 years ago • 0 comments

Hello I'm using refit with the httpclientfactory, I'm wondering if it's possible to use interface composition instead of putting all endpoints in a single file.

public interface IGithubApi {
  IAccountService Account { get; }
  IRepositoryService Repository { get; }
  ....
}
public interface IAccountService {

   [Get("/account")]
   Task<string> MyEndpoint();
}

This discussion describe what I need, but it has been closed. Thank you

7amou3 avatar Aug 13 '23 06:08 7amou3