-
Notifications
You must be signed in to change notification settings - Fork 24.7k
What's new in ASP.NET Core in .NET 11 Preview 5 #37241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
7
commits into
main
Choose a base branch
from
copilot/agent-gen-whats-new-aspnet-core-net11-preview5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+36
−1
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
208dd94
Initial plan
Copilot f21684b
Add Preview 5 What's New include files for Kestrel and OpenAPI
Copilot dc9f8f9
Improve readability of OpenAPI schema improvements include file
Copilot 00cef02
Potential fix for pull request finding
wadepickett b0b6923
Potential fix for pull request finding
wadepickett 0b0e97c
Apply suggestions from code review
wadepickett e27e050
Apply suggestion from @wadepickett
wadepickett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...lease-notes/aspnetcore-11/includes/kestrel-trailer-header-timeouts-preview-5.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ### Kestrel applies trailer header timeouts | ||
|
|
||
| Kestrel now applies <xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerLimits.RequestHeadersTimeout> 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); | ||
| }); | ||
| ``` |
21 changes: 21 additions & 0 deletions
21
...e/release-notes/aspnetcore-11/includes/openapi-schema-improvements-preview-5.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <xref:System.Text.Json.Serialization.JsonStringEnumConverter> 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 <xref:Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.Produces%2A> 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. <xref:Microsoft.AspNetCore.Mvc.ApiExplorer> 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! | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.