Microsoft.AspNetCore.OpenApi 9.0.4

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.AspNetCore.OpenApi --version 9.0.4
                    
NuGet\Install-Package Microsoft.AspNetCore.OpenApi -Version 9.0.4
                    
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="Microsoft.AspNetCore.OpenApi" Version="9.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="9.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
                    
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 Microsoft.AspNetCore.OpenApi --version 9.0.4
                    
#r "nuget: Microsoft.AspNetCore.OpenApi, 9.0.4"
                    
#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.
#addin nuget:?package=Microsoft.AspNetCore.OpenApi&version=9.0.4
                    
Install Microsoft.AspNetCore.OpenApi as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.OpenApi&version=9.0.4
                    
Install Microsoft.AspNetCore.OpenApi as a Cake Tool

About

Microsoft.AspNetCore.OpenApi is a NuGet package that provides built-in support for generating OpenAPI documents from minimal or controller-based APIs in ASP.NET Core.

Key Features

  • Supports viewing generated OpenAPI documents at runtime via a parameterized endpoint (/openapi/{documentName}.json)
  • Supports generating an OpenAPI document at build-time
  • Supports customizing the generated document via document transformers

How to Use

To start using Microsoft.AspNetCore.OpenApi in your ASP.NET Core application, follow these steps:

Installation

dotnet add package Microsoft.AspNetCore.OpenApi

Configuration

In your Program.cs file, register the services provided by this package in the DI container and map the provided OpenAPI document endpoint in the application.

var builder = WebApplication.CreateBuilder();

// Registers the required services
builder.Services.AddOpenApi();

var app = builder.Build();

// Adds the /openapi/{documentName}.json endpoint to the application
app.MapOpenApi();

app.Run();

For more information on configuring and using Microsoft.AspNetCore.OpenApi, refer to the official documentation.

Main Types

The main types provided by this library are:

  • OpenApiOptions: Options for configuring OpenAPI document generation.
  • IDocumentTransformer: Transformer that modifies the OpenAPI document generated by the library.

Feedback & Contributing

Microsoft.AspNetCore.OpenApi is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (450)

Showing the top 5 NuGet packages that depend on Microsoft.AspNetCore.OpenApi:

Package Downloads
Rystem.Api

Rystem.Api helps you to integrate Api Server and Automated Client for Aspect-Oriented programming.

Indice.AspNetCore

Package Description

devprime.stack.web

DevPrime Web

IntelliTect.Coalesce

Core framework library for IntelliTect.Coalesce

IntelliTect.Coalesce.CodeGeneration

Core code generation library for IntelliTect.Coalesce

GitHub repositories (182)

Showing the top 20 popular GitHub repositories that depend on Microsoft.AspNetCore.OpenApi:

Repository Stars
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
JustArchiNET/ArchiSteamFarm
C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 10 Preview 2, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
dotnet/eShop
A reference .NET application implementing an eCommerce site
RicoSuter/NSwag
The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
fullstackhero/dotnet-starter-kit
Production Grade Cloud-Ready .NET 9 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
domaindrivendev/Swashbuckle.AspNetCore
Swagger tools for documenting API's built on ASP.NET Core
AssetRipper/AssetRipper
GUI Application to work with engine assets, asset bundles, and serialized files
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
microsoft/fluentui-blazor
Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
oskardudycz/EventSourcing.NetCore
Examples and Tutorials of Event Sourcing in .NET
SciSharp/LLamaSharp
A C#/.NET library to run LLM (🦙LLaMA/LLaVA) on your local device efficiently.
thomhurst/TUnit
A modern, fast and flexible .NET testing framework
davidfowl/TodoApp
Todo application with ASP.NET Core Blazor WASM, Minimal APIs and Authentication
microsoft/dotnet-podcasts
.NET reference application shown at .NET Conf featuring ASP.NET Core, Blazor, .NET MAUI, Microservices, Orleans, Playwright, and more!
MicrosoftLearning/AZ-204-DevelopingSolutionsforMicrosoftAzure
AZ-204: Developing solutions for Microsoft Azure
evolutionary-architecture/evolutionary-architecture-by-example
Navigate the complex landscape of .NET software architecture with our step-by-step, story-like guide. Unpack the interplay between modular monoliths, microservices, domain-driven design, and various architectural patterns. Go beyond the one-size-fits-all solutions and understand how to blend these approaches based on your unique needs.
Version Downloads Last updated
10.0.0-preview.3.25172.1 583 4/10/2025
10.0.0-preview.2.25164.1 3,681 3/18/2025
10.0.0-preview.1.25120.3 4,236 2/25/2025
9.0.4 50,454 4/8/2025
9.0.3 740,171 3/11/2025
9.0.2 1,096,970 2/11/2025
9.0.1 1,013,972 1/14/2025
9.0.0 2,688,702 11/12/2024
9.0.0-rc.2.24474.3 68,104 10/8/2024
9.0.0-rc.1.24452.1 31,296 9/10/2024
9.0.0-preview.7.24406.2 12,958 8/13/2024
9.0.0-preview.6.24328.4 9,377 7/9/2024
9.0.0-preview.5.24306.11 11,397 6/11/2024
9.0.0-preview.4.24267.6 7,118 5/21/2024
9.0.0-preview.3.24172.13 10,680 4/11/2024
9.0.0-preview.2.24128.4 6,360 3/12/2024
9.0.0-preview.1.24081.5 5,296 2/13/2024
8.0.15 16,538 4/8/2025
8.0.14 256,632 3/11/2025
8.0.13 384,676 2/11/2025
8.0.12 565,492 1/14/2025
8.0.11 1,657,825 11/12/2024
8.0.10 3,097,217 10/8/2024
8.0.8 3,561,409 8/13/2024
8.0.7 2,679,761 7/9/2024
8.0.6 3,587,219 5/28/2024
8.0.5 1,293,737 5/14/2024
8.0.4 2,948,399 4/9/2024
8.0.3 2,791,455 3/12/2024
8.0.2 2,539,293 2/13/2024
8.0.1 3,003,932 1/9/2024
8.0.0 5,083,956 11/14/2023
8.0.0-rc.2.23480.2 101,674 10/10/2023
8.0.0-rc.1.23421.29 50,691 9/12/2023
8.0.0-preview.7.23375.9 63,199 8/8/2023
8.0.0-preview.6.23329.11 39,945 7/11/2023
8.0.0-preview.5.23302.2 17,732 6/13/2023
8.0.0-preview.4.23260.4 113,900 5/16/2023
8.0.0-preview.3.23177.8 16,250 4/11/2023
8.0.0-preview.2.23153.2 8,378 3/14/2023
8.0.0-preview.1.23112.2 5,801 2/21/2023
7.0.20 281,454 5/28/2024
7.0.19 104,705 5/14/2024
7.0.18 170,294 4/9/2024
7.0.17 151,014 3/12/2024
7.0.16 228,543 2/13/2024
7.0.15 351,021 1/9/2024
7.0.14 768,035 11/14/2023
7.0.13 1,268,857 10/24/2023
7.0.12 998,357 10/10/2023
7.0.11 1,455,625 9/12/2023
7.0.10 1,964,262 8/8/2023
7.0.9 1,703,761 7/11/2023
7.0.8 729,972 6/22/2023
7.0.7 1,099,641 6/13/2023
7.0.5 3,431,859 4/11/2023
7.0.4 1,525,804 3/14/2023
7.0.3 1,774,819 2/14/2023
7.0.2 1,554,488 1/10/2023
7.0.1 1,061,988 12/13/2022
7.0.0 1,826,397 11/7/2022
7.0.0-rc.2.22476.2 28,895 10/11/2022
7.0.0-rc.1.22427.2 25,319 9/14/2022
7.0.0-preview.7.22376.6 11,171 8/9/2022
7.0.0-preview.6.22330.3 8,568 7/12/2022
7.0.0-preview.5.22303.8 10,131 6/14/2022
7.0.0-preview.4.22251.1 7,583 5/10/2022