reactiveui / refit

The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
https://reactiveui.github.io/refit/
MIT License
8.65k stars 744 forks source link

[Bug]: Error when using interface inherited from another interface #1884

Closed markus-renezeder closed 1 month ago

markus-renezeder commented 1 month ago

Describe the bug 🐞

When interface inherits from another interface which contains eventhandlers, I get the error: Generated.Service does not implement the interface member BaseInterface.Event

Step to reproduce

Create an interfact e.g. IDBBaseService:

  public interface IDBBaseService
  {
      event EventHandler<DBServiceEventArgs> Delete;
      event EventHandler<DBServiceEventArgs> Insert;
      event EventHandler<DBServiceEventArgs> Update;
  }

Create an interface which inherits IDBBaseService e.g. IAIPromptService:

    public interface IAIPromptService : IDBBaseService
    {
        [Get("/AIPrompt")]
        Task<IEnumerable<AIPrompt>> GetAIPromptsAsync();
    }

Reproduction repository

https://github.com/reactiveui/refit

Expected behavior

Ignore event handlers / correct handling of inherited interface

Screenshots 🖼️

No response

IDE

Visual Studio 2022

Operating system

Windows

Version

.NET 8 Blazor API

Device

Windows

Refit Version

7.2.1

Additional information ℹ️

No response

markus-renezeder commented 1 month ago

Seems to be the same problem like #1801

github-actions[bot] commented 3 weeks ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.