Is it a best practice to use NSwag generated code for calls to a local web API?

This page summarizes the projects mentioned and recommended in the original post on /r/dotnet

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • 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.

  • This is a clean approach. I did something similar to this. One thing that I did differently was to use refit https://github.com/reactiveui/refit to generate my api client. The cool thing about refit is you just make an interface with some attributes and the package will generate the implementation.

  • RestEase

    Easy-to-use typesafe REST API client library for .NET Standard 1.1 and .NET Framework 4.5 and higher, which is simple and customisable. Inspired by Refit

  • I haven't tried this myself, but to take it a step further from just sharing request types you could try using RestEase.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts