-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routingold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone
Description
The ProblemDetails class defines an Extensions property that allows the user to configure the ProblemDetails object with additional metadata.
The Results.Problem extension method does not accept an extensions parameter for setting this leaving the user with no options to return a ProblemDetails with a custom Extensions.
Note: this change will require an API change.
aspnetcore/src/Http/Http.Results/src/Results.cs
Lines 475 to 495 in f7dc5e2
| public static IResult Problem( | |
| string? detail = null, | |
| string? instance = null, | |
| int? statusCode = null, | |
| string? title = null, | |
| string? type = null) | |
| { | |
| var problemDetails = new ProblemDetails | |
| { | |
| Detail = detail, | |
| Instance = instance, | |
| Status = statusCode, | |
| Title = title, | |
| Type = type | |
| }; | |
| return new ObjectResult(problemDetails) | |
| { | |
| ContentType = "application/problem+json", | |
| }; | |
| } |
Metadata
Metadata
Assignees
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routingold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels