Scalar.Kiota.Extension
1.0.0-preview.6
This is a prerelease version of Scalar.Kiota.Extension.
dotnet add package Scalar.Kiota.Extension --version 1.0.0-preview.6
NuGet\Install-Package Scalar.Kiota.Extension -Version 1.0.0-preview.6
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.Kiota.Extension" Version="1.0.0-preview.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Scalar.Kiota.Extension" Version="1.0.0-preview.6" />
<PackageReference Include="Scalar.Kiota.Extension" />
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.Kiota.Extension --version 1.0.0-preview.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Scalar.Kiota.Extension, 1.0.0-preview.6"
#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.Kiota.Extension@1.0.0-preview.6
#: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.Kiota.Extension&version=1.0.0-preview.6&prerelease
#tool nuget:?package=Scalar.Kiota.Extension&version=1.0.0-preview.6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Scalar.Kiota.Extension
Automates Kiota SDK generation and integrates it with Scalar API documentation for ASP.NET Core minimal APIs with native AOT support.
Installation
dotnet add package Scalar.Kiota.Extension --prerelease
Quick Start
using Scalar.Kiota.Extension;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddScalarWithKiota();
var app = builder.Build();
app.MapScalarWithKiota("/api");
await app.RunAsync();
Configuration
builder.Services.AddScalarWithKiota(options =>
{
options.WithTitle("My API") // Default: "{ApplicationName} API"
.WithTheme(ScalarTheme.Saturn) // Default: Saturn
.WithSdkName("MyApiClient") // Default: "ApiClient"
.WithLanguages("TypeScript", "CSharp") // Default: ["TypeScript"]
.WithOutputPath("./custom-output") // Default: "wwwroot/.scalar-kiota"
.WithOpenDocsOnStartup(); // Default: false
options.BundleTypeScript = true; // Default: true
options.DocumentationPath = "/docs"; // Default: null (uses pattern)
});
Available Languages
TypeScript
- Bundled with esbuild for browser usageCSharp
- .NET clientPython
- Python clientJava
- Java clientGo
- Go clientPHP
- PHP clientRuby
- Ruby clientSwift
- Swift clientCLI
- Command line client
Available Themes
ScalarTheme.Default
, ScalarTheme.Alternate
, ScalarTheme.Moon
, ScalarTheme.Purple
, ScalarTheme.Solarized
,
ScalarTheme.BluePlanet
, ScalarTheme.Saturn
, ScalarTheme.Kepler
, ScalarTheme.Mars
, ScalarTheme.DeepSpace
How It Works
- Downloads OpenAPI spec from
/openapi/v1.json
- Generates SDKs using Kiota CLI (auto-installed if missing)
- For TypeScript: creates package.json, installs dependencies, bundles with esbuild
- Creates config.js that exposes the SDK to Scalar's "Try It" feature
- Only regenerates when OpenAPI spec changes (SHA256 hash-based caching)
Generated Structure
wwwroot/.scalar-kiota/
├── openapi.json # Downloaded spec
├── config.js # Scalar integration
├── sdk.js # Bundled TypeScript (if enabled)
├── .spec.hash # Cache validation
└── [language]/ # Generated SDK sources
Requirements
- Download .NET 10.0 Preview
- Install Node.js (for TypeScript bundling)
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net10.0 is compatible. 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.
-
net10.0
- Microsoft.AspNetCore.OpenApi (>= 10.0.0-preview.6.25358.103)
- Scalar.AspNetCore (>= 2.6.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0-preview.6 | 106 | 7/28/2025 |
1.0.0-preview.1 | 93 | 7/28/2025 |