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

Support base interfaces defined in external assemblies #1846

Open
alrz opened this issue Sep 27, 2024 · 0 comments
Open

Support base interfaces defined in external assemblies #1846

alrz opened this issue Sep 27, 2024 · 0 comments

Comments

@alrz
Copy link

alrz commented Sep 27, 2024

Currently, you cannot stack Roslyn source generators to operate on generated code. As a workaround I opted into running my own generators in a separate project. That is, the refit interface is generated elsewhere, however this requires the refit generator to recognize external interfaces.

Project 1 (lib):

// <auto-generated/>
interface IExternalInterface {
  [Get("/")]
  Task<string> MyApi();
}

Project 2 (host):

// this should be recognized as a refit interface
// maybe require a [RefitInterface] attribute to hint
interface IMyApi : IExternalInterface;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant