ScalarInstaller — Web
Key: Scalar
Default Enabled: ✅
Package: SaveApis.Framework.Web
Purpose
Mounts the Scalar API Reference UI, serving a fully themed and pre-configured API explorer at /scalar/v1. The UI reads the OpenAPI document generated by OpenApiInstaller and provides an interactive client with authentication support.
What It Does
Application phase:
- Maps the Scalar API Reference UI with
AllowAnonymous() - Applies a fixed set of opinionated UI defaults (see below)
- If Zitadel is enabled: pre-selects the
Zitadelsecurity scheme so users can authenticate directly from the UI
Builder phase: none.
Dependencies
| Dependency | Direction | Requirement | Description |
|---|---|---|---|
AuthenticationInstaller |
After | Optional | |
AuthorizationInstaller |
After | Optional | |
ZitadelInstaller |
After | Optional | Pre-selects Zitadel security scheme |
ControllerInstaller |
After | Optional | |
OpenApiInstaller |
After | Required | Must have an OpenAPI document to render |
Configuration
This installer has no configuration options. All UI settings are applied as fixed opinionated defaults:
| Setting | Value |
|---|---|
| Theme | DeepSpace (dark, .dark forced) |
| Layout | Modern |
| Dark mode | ✅ enabled, toggle hidden |
| Default fonts | ✅ |
| HTTP client | C# / HttpClient |
| Enabled clients | HttpClient only |
| Enabled targets | CSharp only |
| Download format | JSON |
| Test request button | Visible in Development only |
| Tag sorter | Alphabetical |
| Hide models | ✅ |
| Hide client selector button | ✅ |
| Hide developer tools | Always |
| Persistent authentication | ✅ (token survives page reload) |
| MCP | Disabled |
| Scalar AI agent | Disabled |
InstallerContext Extension
installer.WithScalar(bool enabled = true);
Example — disable in production:
installer.WithScalar(false);
Notes
- The Scalar UI is always accessible anonymously, even when
ControllerInstallerappliesRequireAuthorization()globally. - The test request button is controlled by
application.Environment.IsDevelopment()at runtime — it is hidden in all non-Development environments automatically. - The Zitadel scheme check is
context.Enabled(ZitadelInstaller.Key) ?? true. Disable Zitadel explicitly withinstaller.WithZitadel(false)to remove the security scheme from the UI.
Related
- Web Framework Overview
- OpenApiInstaller — provides the OpenAPI document that Scalar renders
- ZitadelInstaller — provides the pre-selected security scheme