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
{{ message }}
Repository navigation
Refit should emit diagnostics for invalid interfaces #1885
✨ enhancement🟠 priority: mediumReal bug in a narrower scenario, or a commonly-requested feature🧩 semantic-analysisBug reports/change requests that would require semantic analysis in the stub generator🧬 area: source-genStub source generator, Roslyn, diagnostics, MSBuild integration
Refit should emit diagnostic warnings and errors for invalid methods and interfaces. Many exceptions in RequestBuilderImplementation could be statically determined via a source generator.
Invalid url backslash
Multiple CancellationToken params
HeadersCollection must be IDictionary
Severity to be determined layer.
More advanced checks may to read the attribute values. It isn't required but I'd prefer to reference ../Refit.csproj and construct each attribute in the source generator. I don't know if this could cause issues 🤔
Would this be considered to be a breaking change? It may prevent users from building code that previously ran, although it was likely invalid.
Type-safe REST API clients for .NET, generated from annotated interfaces with build-time source generation, direct request construction, System.Text.Json defaults, and support for trimming and AOT.
✨ enhancement🟠 priority: mediumReal bug in a narrower scenario, or a commonly-requested feature🧩 semantic-analysisBug reports/change requests that would require semantic analysis in the stub generator🧬 area: source-genStub source generator, Roslyn, diagnostics, MSBuild integration
Activity
feat: add analyzer diagnostics for invalid Refit interfaces (reactive…
glennawatson commentedon Jul 15, 2026
This is addressed in the Refit 14 beta, now available on NuGet: https://www.nuget.org/packages/Refit/14.0.0-beta.1
Please give it a try - feedback ahead of the stable 14.0.0 release is very welcome.
github-actions commentedon Jul 30, 2026
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.