You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Refit does not recognize derived interfaces as a Refit-interface, if the derived interface does not contain methods decorated with a Refit attribute.
Steps To Reproduce
Create a generic Refit-interface, for example:
public interface ICrudOperations<TEntity> where TEntity : class
{
[Delete("/{id}")]
Task<IActionResult> Delete(long id);
[Get("")]
Task<TEntity> Get(long id);
[Get("")]
Task<IEnumerable<TEntity>> GetAll();
[Post("")]
Task<TEntity> Create(TEntity dto);
[Put("/{id}")]
Task<IActionResult> Update(long id, TEntity dto);
}
Now create another interface that inherits from this interface:
public interface IOrdersAPI : ICrudOperations<Order>
{
}
Now create a client based on the second interface:
RestService.For<IOrdersAPI>(url);
Refit will throw an exception because it does not recognize 'IOrdersAPI' as a Refit-interface.
Expected behavior
Stub will be generated, even if the derived interface does not specify any Refit methods itself.
The text was updated successfully, but these errors were encountered:
Describe the bug
Refit does not recognize derived interfaces as a Refit-interface, if the derived interface does not contain methods decorated with a Refit attribute.
Steps To Reproduce
RestService.For<IOrdersAPI>(url);
Refit will throw an exception because it does not recognize 'IOrdersAPI' as a Refit-interface.
Expected behavior
Stub will be generated, even if the derived interface does not specify any Refit methods itself.
The text was updated successfully, but these errors were encountered: