Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Refit interfaces do not implement base interface non refit methods #1801

Open
TimothyMakkison opened this issue Sep 3, 2024 · 1 comment
Labels

Comments

@TimothyMakkison
Copy link
Contributor

TimothyMakkison commented Sep 3, 2024

Describe the bug 🐞

Generated refit interfaces are invalid if the base interface has a non refit method.

Step to reproduce

// 'Generated.IGeneratedInterface' does not implement interface member 'IBaseInterface.NonRefitMethod()'
var gitHubApi = RestService.For<IGeneratedInterface>("https://api.github.com");

public interface IGeneratedInterface : IBaseInterface
{
    [Get("/users")]
    Task<string> Get();
}

public interface IBaseInterface
{
    void NonRefitMethod();
}

Reproduction repository

https://github.com/reactiveui/refit

Expected behavior

Refit should generate stub implementations which throw an error when called to satisfy the interface. Similar to how non refit methods are handled in non derived refit interfaces.

IDE

Rider Windows

@TimothyMakkison TimothyMakkison changed the title [Bug]: Refit tnterface do not implemt base interface non refit methods [Bug]: Refit interfaces do not implement base interface non refit methods Sep 3, 2024
@TimothyMakkison
Copy link
Contributor Author

Related #1687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant