Skip to content
Discussion options

You must be logged in to vote

There is no global flag to turn the Refit source generator off, and you do not need one. The generator only emits an implementation for interfaces whose methods carry Refit HTTP attributes (Get, Post, etc.). It does not generate anything for arbitrary interfaces.

If you are seeing broken/partial generated code, it is because some of those interfaces have Refit attributes on their methods, so Refit tries to implement them. To stop that:

  • Remove the Refit HTTP attributes from the interfaces you do not want Refit to implement, or
  • Move the interfaces that are produced by your other source generator into a separate project/assembly that does not reference Refit, or
  • Keep the Refit-attributed in…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by glennawatson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants