Skip to content
Discussion options

You must be logged in to vote

There is no official Refit server-side counterpart, but a couple of community approaches fit the "define the interface once, share it" goal:

  • Refitter (https://github.com/christianhelle/refitter) generates Refit clients from OpenAPI, but it is still client-side.
  • For sharing one interface between an ASP.NET Core server and a Refit client, look at "shared contract" libraries that bind ASP.NET Core endpoints to an interface, for example:
    • SignalR-style or gRPC contract-first if you can move off REST.
    • Community projects that map controller routes from an interface (search for "ASP.NET Core interface to endpoint" / "contract-first REST"). These let the interface drive both sides.

The reason…

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