diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/openapi-aot.md b/aspnetcore/release-notes/aspnetcore-9/includes/openapi-aot.md index 45b4257872..ef54881f87 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/openapi-aot.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/openapi-aot.md @@ -1,8 +1,6 @@ ### Microsoft.AspNetCore.OpenApi supports trimming and Native AOT -The new built-in OpenAPI support in ASP.NET Core now also supports trimming and Native AOT. - -### Get started +OpenAPI in ASP.NET Core supports trimming and native AOT. The following steps create and publish an OpenAPI app with trimming and native AOT: Create a new ASP.NET Core Web API (Native AOT) project. @@ -16,13 +14,7 @@ Add the Microsoft.AspNetCore.OpenAPI package. dotnet add package Microsoft.AspNetCore.OpenApi --prerelease ``` -For this preview, you also need to add the latest Microsoft.OpenAPI package to avoid trimming warnings. - -```console -dotnet add package Microsoft.OpenApi -``` - -Update *Program.cs* to enable generating OpenAPI documents. +Update `Program.cs` to enable generating OpenAPI documents. ```diff + builder.Services.AddOpenApi(); @@ -37,5 +29,3 @@ Publish the app. ```console dotnet publish ``` - -The app publishes using Native AOT without warnings.