Member-only story

Scalar: Swagger UI Alternative

Davut Dursun
Mar 10, 2025

--

Access without membership: Here

As of .NET 9, Swagger is no longer included by default.
So how can we view our endpoints?

Scalar is a modern alternative to Swagger UI. In this article, I’ll share some of the features I really like about Scalar.

In the image above, you can see an example of the /register endpoint from the auth endpoints introduced with .NET 8, which I mentioned in my previous article.

You can easily view all the required parameters, responses, and sample request structures for different programming languages. Additionally, you can test requests effortlessly by filling in the necessary data.

Login Example

In the image above, you can also see a sample request and response for the /login endpoint.

builder.Services.AddOpenApi();

if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
app.MapScalarApiReference();
}

Share your experiences in the comments below!
For more updates and information, feel free to follow me.

Davut Dursun
LinkedIn

--

--

No responses yet

Write a response