openapi-scalar

Generate OpenAPI specifications and Scalar UI documentation for .NET 9+ applications.

4|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill openapi-scalar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi-scalar
Source: https://github.com/FaysilAlshareef/dotnet-ai-kit/tree/main/skills/api/openapi-scalar
Command: npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill openapi-scalar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many .NET APIs lack consistent, secure, and versioned OpenAPI documentation; this results in inaccurate client contracts, missing security metadata, and exposed documentation in production. This Skill guides teams to replace legacy Swagger setups, generate accurate OpenAPI documents, and present them with a modern Scalar UI while ensuring docs are secure and environment-aware.

Core Features & Use Cases

  • Native OpenAPI (.NET 9+) Integration: Configure Microsoft.AspNetCore.OpenApi with document transformers to populate titles, versions, and descriptions for each document.
  • Scalar API Documentation UI: Serve a modern, customizable documentation site using Scalar.AspNetCore as a replacement for Swagger UI.
  • Security & Production Safety: Add JWT or API key security scheme transformers and require authorization for documentation endpoints in non-development environments.
  • Versioning & Build-Time Generation: Register multiple OpenAPI documents for v1/v2 and optionally generate API description files at build time for CI pipelines.
  • Use Case: Migrate a project using Swashbuckle to native OpenAPI, add endpoint summaries and tags, configure a Bearer security transformer, and expose a protected Scalar UI for developer teams.

Quick Start

Configure Microsoft.AspNetCore.OpenApi with a document transformer, add a Bearer security scheme transformer, and map the Scalar API reference while requiring authorization for production.

Frequently Asked Questions about openapi-scalar

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace Swashbuckle with native OpenAPI and Scalar UI in .NET 9?

To replace Swashbuckle, configure Microsoft.AspNetCore.OpenApi with document transformers and map Scalar.AspNetCore to serve a modern API reference UI for your .NET 9+ Minimal APIs or controllers.

What is the best way to secure OpenAPI documentation endpoints in production?

Secure OpenAPI documentation in production by applying authorization requirements to the documentation endpoints and adding JWT or API key security scheme transformers to protect exposed routes in non-development environments.

How do I configure multiple OpenAPI documents for API versioning in .NET?

Register multiple OpenAPI documents for v1/v2 versions in .NET using document transformers to populate titles, versions, and descriptions, optionally generating API description files at build time for CI pipelines.

Can I add JWT Bearer security schemes to native OpenAPI specifications in .NET 9?

Yes, you can add JWT Bearer security schemes to native .NET 9 OpenAPI specifications by configuring a Bearer security scheme transformer to ensure endpoint metadata and security are accurately documented.

Does native OpenAPI in .NET 9 work with Minimal APIs and controllers?

Native OpenAPI in .NET 9 works with both Minimal APIs and controllers, applying document transformers to populate metadata, titles, and descriptions across all exposed endpoints.

Why expose Scalar UI instead of Swagger UI for API documentation?

Expose Scalar UI instead of Swagger UI to present a modern, customizable API documentation site that replaces legacy Swagger setups while ensuring docs remain secure and environment-aware.