This video discusses the four options available for creating API documentation in .NET 9, following Microsoft’s removal of Swagger UI from their API projects
Here’s a breakdown of the four solutions presented:
- Swagger UI: This option involves adding the Swashbuckle.AspNetCore.SwaggerUI NuGet package and configuring it in your program file. It provides a familiar interface for interacting with and testing your API endpoints.
- Redoc: This option focuses on providing a clean and professional-looking documentation site for your API. It’s implemented by adding the Swashbuckle.AspNetCore.ReDoc NuGet package and configuring the program file. While it excels at documentation, it doesn’t offer built-in API execution within the interface.
- NSwag: This option, implemented by adding the NSwag.AspNetCore package, offers capabilities beyond just documentation, such as client code generation. It can be configured to look like either Swagger UI or Redoc, offering flexibility in presentation.
- Scaler: This option, implemented by adding the Scaler.AspNetCore package, is favored by the video creator for its functionality and ease of use. It allows for easy testing of API endpoints within the browser and provides curl commands and client code snippets in various languages for different API calls.
The video emphasizes that each option has its strengths and can be chosen based on specific needs. The creator expresses a personal preference for Scaler due to its functionality while acknowledging that Redoc might be better suited for public-facing documentation sites.

Leave a Reply