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
Inheriting an empty interface from a base interface with refit methods causing it to not be detected. Seems like this issue occurs during roselyn code generation because no classes are generated for the derived interface(s)
Step to reproduce
using System;using System.Threading;using System.Threading.Tasks;using Refit;publicinterfaceIBaseService{[Get("/resources")]Task<string>GetResource(stringid);}publicinterfaceIDerivedServiceA:IBaseService{}publicclassProgram{publicstaticvoidMain(){varapi= RestService.For<IDerivedServiceA>("https://example.com");
Console.WriteLine(api.GetResource("abc"));}}
No error about doesn't look like a Refit interface. Provided example should only stumble when trying to do the actual API call because the api doesn't exist
Screenshots 🖼️
No response
IDE
Visual Studio 2022
Operating system
No response
Version
No response
Device
No response
Refit Version
7.0.0
Additional information ℹ️
Probably happens on other (older) versions too. Reproduced it with 7.0.0 in my minimal sample
The text was updated successfully, but these errors were encountered:
My use case was multiple apis where only the healthcheck was interesting combined with dependency injection, where I needed different interfaces for different apis.
As a workaround I added a dummy endpoint to IDerivedServiceA
Describe the bug 🐞
Inheriting an empty interface from a base interface with refit methods causing it to not be detected. Seems like this issue occurs during roselyn code generation because no classes are generated for the derived interface(s)
Step to reproduce
(Tested at https://dotnetfiddle.net/ with refit package installed)
Reproduction repository
No response
Expected behavior
No error about
doesn't look like a Refit interface
. Provided example should only stumble when trying to do the actual API call because the api doesn't existScreenshots 🖼️
No response
IDE
Visual Studio 2022
Operating system
No response
Version
No response
Device
No response
Refit Version
7.0.0
Additional information ℹ️
Probably happens on other (older) versions too. Reproduced it with 7.0.0 in my minimal sample
The text was updated successfully, but these errors were encountered: