Scalar.AspNetCore 2.0.5

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Scalar.AspNetCore --version 2.0.5
                    
NuGet\Install-Package Scalar.AspNetCore -Version 2.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Scalar.AspNetCore" Version="2.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Scalar.AspNetCore" Version="2.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Scalar.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Scalar.AspNetCore --version 2.0.5
                    
#r "nuget: Scalar.AspNetCore, 2.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Scalar.AspNetCore@2.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Scalar.AspNetCore&version=2.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Scalar.AspNetCore&version=2.0.5
                    
Install as a Cake Tool

Scalar .NET API Reference Integration

Version Downloads Discord

This .NET package Scalar.AspNetCore provides an easy way to render beautiful API references based on OpenAPI/Swagger documents.

Made possible by the wonderful work of @captainsafia on building the integration and docs written for the Scalar & .NET integration. Thanks to @xC0dex for making it awesome.

dotnet

Migration Guide

If you are upgrading from 1.x.x to 2.x.x, please refer to the migration guide.

Usage

  1. Install the package
dotnet add package Scalar.AspNetCore --version 2.0.*

We release new versions frequently to bring you the latest features and bug fixes. To reduce the noise in your project file, we recommend using a wildcard for the patch version, e.g., 2.0.*.

  1. Add the using directive
using Scalar.AspNetCore;
  1. Configure your application

Add the following to Program.cs based on your OpenAPI generator:

For .NET 9 using Microsoft.AspNetCore.OpenApi:

builder.Services.AddOpenApi();

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

For .NET 8 using Swashbuckle:

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

if (app.Environment.IsDevelopment())
{
    app.UseSwagger(options =>
    {
        options.RouteTemplate = "/openapi/{documentName}.json";
    });
    app.MapScalarApiReference();
}

For .NET 8 using NSwag:

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddOpenApiDocument();

if (app.Environment.IsDevelopment())
{
    app.UseOpenApi(options =>
    {
        options.Path = "/openapi/{documentName}.json";
    });
    app.MapScalarApiReference();
}

That’s it! 🎉 With the default settings, you can now access the Scalar API reference at /scalar to see the API reference for the v1 document. Alternatively, you can navigate to /scalar/{documentName} (e.g., /scalar/v2) to view the API reference for a specific document.

Configuration

For a full configuration guide and examples, including OAuth integration and custom settings, refer to the dotnet integration documentation.

Development

Local

  1. Download .NET 9.0
  2. Jump to the package folder: cd integrations/aspnetcore
  3. Do a fresh build: dotnet build
  4. Run the tests: dotnet test

And see it in action here:

  1. Switch to the playground: cd playground/Scalar.AspNetCore.Playground
  2. Start the playground: dotnet run
  3. Open this URL in the browser: http://localhost:5056/scalar/

Docker

If you don't have the SDK installed or want to run the playground under a subpath, you can use Docker Compose:

  1. Run Docker Compose: docker compose up --build
  2. Open this URL in the browser: http://localhost:8080/api/scalar/

Community

We are API nerds. You too? Let’s chat on Discord: https://discord.gg/scalar

License

The source code in this repository is licensed under MIT.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (137)

Showing the top 5 NuGet packages that depend on Scalar.AspNetCore:

Package Downloads
Rystem.Api.Server

Rystem.Api helps you to integrate Api Server and Automated Client for Aspect-Oriented programming.

Scalar.AspNetCore.Microsoft

Provides OpenAPI transformers for Microsoft.AspNetCore.OpenApi that enable Scalar-specific extensions in your OpenAPI document.

devprime.stack.web

DevPrime Web

Scalar.AspNetCore.Swashbuckle

Provides OpenAPI filters for Swashbuckle.AspNetCore.SwaggerGen that enable Scalar-specific extensions in your OpenAPI document.

Mii.Rinjani.Gateway.Commons

Package Description

GitHub repositories (71)

Showing the top 20 popular GitHub repositories that depend on Scalar.AspNetCore:

Repository Stars
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
ardalis/CleanArchitecture
Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 10
JustArchiNET/ArchiSteamFarm
C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
dotnet/eShop
A reference .NET application implementing an eCommerce site
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
fullstackhero/dotnet-starter-kit
Production Grade Cloud-Ready .NET 10 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
FastEndpoints/FastEndpoints
A light-weight REST API development framework for ASP.NET 8 and newer.
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
evolutionary-architecture/evolutionary-architecture-by-example
Navigate the complex landscape of .NET software architecture with our step-by-step, story-like guide. Unpack the interplay between modular monoliths, microservices, domain-driven design, and various architectural patterns. Go beyond the one-size-fits-all solutions and understand how to blend these approaches based on your unique needs.
dotnet/aspnet-api-versioning
Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
AIDotNet/OpenDeepWiki
OpenDeepWiki is the open-source version of the DeepWiki project, aiming to provide a powerful knowledge management and collaboration platform. The project is mainly developed using C# and TypeScript, supporting modular design, and is easy to expand and customize.
davidfowl/TodoApp
Todo application with ASP.NET Core Blazor WASM, Minimal APIs and Authentication
ErsatzTV/legacy
Open-source platform that transforms your personal media library into live, custom TV channels.
exceptionless/Exceptionless
Exceptionless application
webprofusion/certify
Professional ACME Client for Windows (and now cross-platform via Certify Management Hub). Certificate Management UI, powered by Let's Encrypt and compatible with all ACME v2 CAs. Used by over 150,000 organisations. Download from certifytheweb.com
GZTimeWalker/GZCTF
The GZ::CTF project, an open source CTF platform.
SteveDunn/Vogen
A semi-opinionated library which is a source generator and a code analyser. It Source generates Value Objects
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
meysamhadeli/booking-microservices
A practical microservices with the latest technologies and architectures like Vertical Slice Architecture, Event Sourcing, CQRS, DDD, gRpc, MongoDB, RabbitMq, Masstransit, and Aspire in .Net 10.
Version Downloads Last Updated
2.14.9 79 4/30/2026
2.14.8 13,243 4/29/2026
2.14.7 3,436 4/29/2026
2.14.6 36,182 4/27/2026
2.14.5 41,623 4/27/2026
2.14.4 71,296 4/23/2026
2.14.3 56,032 4/22/2026
2.14.2 7,453 4/21/2026
2.14.1 110,057 4/18/2026
2.14.0 73,520 4/16/2026
2.13.22 151,712 4/11/2026
2.13.21 35,551 4/9/2026
2.13.20 179,667 4/4/2026
2.13.19 26,949 4/3/2026
2.13.18 123,872 3/31/2026
2.13.17 102,651 3/29/2026
2.13.16 27,717 3/28/2026
2.13.15 126,099 3/25/2026
2.13.14 53,707 3/24/2026
2.0.5 31,124 1/27/2025
Loading failed