Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions aspnetcore/fundamentals/openapi/aspnetcore-openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,14 @@ Create a new ASP.NET Core Web API (Native AOT) project.
dotnet new webapiaot
```

:::moniker-end

:::moniker range="= aspnetcore-9.0"

Add the Microsoft.AspNetCore.OpenAPI package.

```console
dotnet add package Microsoft.AspNetCore.OpenApi --prerelease
dotnet add package Microsoft.AspNetCore.OpenApi
```

Update `Program.cs` to enable generating OpenAPI documents.
Expand All @@ -255,12 +259,12 @@ var app = builder.Build();
+ app.MapOpenApi();
```

:::moniker-end

Publish the app.

```console
dotnet publish
```

:::moniker-end

[!INCLUDE[](~/fundamentals/openapi/includes/aspnetcore-openapi6-8.md)]