Skip to content
Discussion options

You must be logged in to vote

Refit is a client-only library - it generates HTTP client implementations from interfaces and has no server-side / endpoint generation. There is no built-in way to emit ASP.NET Core endpoints or OpenAPI docs from a Refit interface.

For a Blazor WASM + ASP.NET Core SaaS, the practical flow is server-first:

  • Build the API in ASP.NET Core and let it produce the OpenAPI document (Microsoft.AspNetCore.OpenApi, or Swashbuckle/NSwag).
  • Generate the typed client from that OpenAPI spec. NSwag and Kiota both do this directly. If you specifically want Refit interfaces, tools like OpenApiToRefit can generate Refit interfaces from the spec.

So the OpenAPI document is the source of truth in the middle;…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
3 participants