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.66k stars 744 forks source link

Refit should emit diagnostics for invalid interfaces #1885

Open TimothyMakkison opened 1 month ago

TimothyMakkison commented 1 month ago

Refit should emit diagnostic warnings and errors for invalid methods and interfaces. Many exceptions in RequestBuilderImplementation could be statically determined via a source generator.

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.