Skip to content

ADR-009: Scalar.AspNetCore — Interactive API Documentation

Date: 2026-02-26 Authors: Jean-Francois Meyers Scope: granit-dotnet (Granit.ApiDocumentation)

The platform REST APIs require an interactive documentation interface for developers and integrators. Since .NET 9, Microsoft removed Swashbuckle (Swagger UI) from the default template in favor of Microsoft.AspNetCore.OpenApi for OpenAPI spec generation.

The documentation UI choice must natively integrate with the new .NET 10 OpenAPI pipeline without depending on Swashbuckle.

Scalar.AspNetCore as the interactive OpenAPI documentation UI.

  • License: MIT
  • Advantage: native Microsoft.AspNetCore.OpenApi integration (.NET 9+), modern and responsive UI, built-in “try it”, customizable themes, API search, OpenAPI 3.1 support
  • Configuration: app.MapScalarApiReference() — one line
  • Advantage: historical standard, very wide adoption
  • Disadvantage: Swashbuckle is abandoned (last release 2023, removed from .NET 9 template by Microsoft), dependency on NSwag for spec generation (overlap with Microsoft.AspNetCore.OpenApi), dated UI
  • License: MIT
  • Advantage: elegant static documentation, three-column layout
  • Disadvantage: no native “try it” (read-only), requires custom integration with the .NET OpenAPI pipeline, less interactive
  • License: MIT
  • Advantage: lightweight, web component, themes
  • Disadvantage: smaller community, no official .NET integration, irregular maintenance
  • License: Apache-2.0
  • Advantage: modern UI, API design support
  • Disadvantage: SaaS-oriented (Stoplight Studio), non-official .NET integration, advanced features are paid
CriterionScalarSwagger UIReDocRapiDocElements
LicenseMITMITMITMITApache-2.0
.NET 10 integrationNativeAbandonedCustomCustomCustom
Interactive try-itYesYesNoYesYes
Modern UIYesNoYesYesYes
Active maintenanceYesNo (2023)YesIrregularYes
.NET configuration1 line~10 linesCustomCustomCustom
OpenAPI 3.1YesPartialYesYesYes
  • Native integration with Microsoft.AspNetCore.OpenApi (zero Swashbuckle)
  • Modern UI with try-it, search, and themes
  • Minimal configuration (app.MapScalarApiReference())
  • Compatible with Asp.Versioning (multiple versions in the spec)
  • Active maintenance and regular releases
  • Scalar is less known than Swagger UI (familiarization curve for the team)
  • Relatively recent project (2023) — less track record than Swagger UI
  • Some advanced features (mocking, testing) are in Scalar Cloud (SaaS)