What problem does it solve?
Scalar provides a modern, interactive API documentation UI that replaces Swagger UI for .NET 10 projects, delivering faster rendering, built-in themes, and integrated code generation while avoiding common security and token-inefficiency pitfalls.
Core Features & Use Cases
- Swagger replacement: MapScalarApiReference serves interactive OpenAPI 3.1 documentation with a familiar developer experience and better performance.
- Developer-friendly defaults: Recommend development-only exposure, authentication prefill for test tokens, and clear guidance for disabling external proxies for sensitive APIs.
- Customization and multi-doc support: Configure themes, classic or modern layouts, custom route prefixes, and register multiple OpenAPI documents for versioned APIs.
- Production safety: Use RequireAuthorization and OpenAPI document transformers for security schemes rather than embedding credentials into the UI.
Quick Start
Add MapScalarApiReference behind an IsDevelopment guard in your application startup to serve interactive API docs for your OpenAPI endpoints.