diff --git a/aspnetcore/release-notes/aspnetcore-11.md b/aspnetcore/release-notes/aspnetcore-11.md index 4800a84d2575..15fcea34c09a 100644 --- a/aspnetcore/release-notes/aspnetcore-11.md +++ b/aspnetcore/release-notes/aspnetcore-11.md @@ -5,7 +5,7 @@ author: wadepickett description: Learn about the new features in ASP.NET Core in .NET 11. ms.author: wpickett ms.custom: mvc -ms.date: 05/19/2026 +ms.date: 06/09/2026 uid: aspnetcore-11 --- # What's new in ASP.NET Core in .NET 11 @@ -48,6 +48,8 @@ This section describes new features for OpenAPI. [!INCLUDE[](~/release-notes/aspnetcore-11/includes/file-result-openapi-preview4.md)] +[!INCLUDE[](~/release-notes/aspnetcore-11/includes/openapi-schema-improvements-preview-5.md)] + ## Authentication and authorization This section describes new features for authentication and authorization. @@ -82,6 +84,8 @@ This section describes miscellaneous new features in .NET 11. [!INCLUDE[](~/release-notes/aspnetcore-11/includes/rate-limiting-retry-after-preview-4.md)] +[!INCLUDE[](~/release-notes/aspnetcore-11/includes/kestrel-trailer-header-timeouts-preview-5.md)] + ## Breaking changes Use the articles in [Breaking changes in .NET](/dotnet/core/compatibility/breaking-changes) to find breaking changes that might apply when upgrading an app to a newer version of .NET. diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/kestrel-trailer-header-timeouts-preview-5.md b/aspnetcore/release-notes/aspnetcore-11/includes/kestrel-trailer-header-timeouts-preview-5.md new file mode 100644 index 000000000000..4c97d354d06f --- /dev/null +++ b/aspnetcore/release-notes/aspnetcore-11/includes/kestrel-trailer-header-timeouts-preview-5.md @@ -0,0 +1,10 @@ +### Kestrel applies trailer header timeouts + +Kestrel now applies to fragmented HTTP/2 and HTTP/3 trailer headers that don't finish sending the header block. The same timeout that protects initial request headers now also prevents connections from staying open indefinitely while Kestrel waits for trailer `HEADERS` frames to complete. + +```csharp +builder.WebHost.ConfigureKestrel(options => +{ + options.Limits.RequestHeadersTimeout = TimeSpan.FromSeconds(10); +}); +``` diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/openapi-schema-improvements-preview-5.md b/aspnetcore/release-notes/aspnetcore-11/includes/openapi-schema-improvements-preview-5.md new file mode 100644 index 000000000000..551612d8c7a6 --- /dev/null +++ b/aspnetcore/release-notes/aspnetcore-11/includes/openapi-schema-improvements-preview-5.md @@ -0,0 +1,21 @@ +### OpenAPI schemas better match ASP.NET Core behavior + +OpenAPI generation now handles several schema cases more accurately. Non-body enum parameters keep the original C# enum member names even when HTTP JSON options configure a naming policy, because query, route, header, and form binding use `Enum.TryParse` rather than JSON serialization. Array schema reference IDs now use valid component names such as `stringArray` and `TodoArray` instead of names with array syntax. + +```csharp +builder.Services.ConfigureHttpJsonOptions(options => +{ + options.SerializerOptions.Converters.Add( + new JsonStringEnumConverter(JsonNamingPolicy.KebabCaseLower)); +}); + +app.MapGet("/orders", (OrderStatus status) => Results.Ok(status)); +``` + +With this configuration, a body schema can still describe `OrderStatus.PendingReview` as `pending-review`, while the query parameter schema describes the accepted value as `PendingReview`. + +Minimal API endpoints can support multiple extension method calls for the same status code—for example, to specify that a 200 response may arrive as `application/json` or `text/plain` with different schemas. The same support applies to MVC controllers via multiple [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attributes. + +In prior releases, the framework collapsed each status code to a single response type and silently dropped the rest, making it impossible to describe endpoints that serve multiple content types. now preserves every declared response type with deterministic ordering, and the generated OpenAPI document emits separate content entries per media type—or an `anyOf` schema when multiple types share the same content type. + +Thank you [@marcominerva](https://github.com/marcominerva) for the array schema reference contribution!