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" />
                    
Directory.Packages.props
<PackageReference Include="Scalar.Kiota.Extension" />
                    
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.Kiota.Extension --version 1.0.0-preview.6
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=Scalar.Kiota.Extension&version=1.0.0-preview.6&prerelease
                    
Install as a Cake Tool

.NET 10 NuGet License codecov

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 usage
  • CSharp - .NET client
  • Python - Python client
  • Java - Java client
  • Go - Go client
  • PHP - PHP client
  • Ruby - Ruby client
  • Swift - Swift client
  • CLI - 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

  1. Downloads OpenAPI spec from /openapi/v1.json
  2. Generates SDKs using Kiota CLI (auto-installed if missing)
  3. For TypeScript: creates package.json, installs dependencies, bundles with esbuild
  4. Creates config.js that exposes the SDK to Scalar's "Try It" feature
  5. 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

License

This project is licensed under the MIT License.

Product 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.

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