Skip to content

Conversation

@pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Jul 8, 2021

  • Type-forward ProblemDetails to Http.Extensions
  • Introduce HttpValidationProblemDetails to support validation details
  • Remove IResult from StatusCodeResult

Fixes #34169

* Type-forward ProblemDetails to Http.Extensions
* Introduce HttpValidationProblemDetails to support validation details
* Remove IResult from StatusCodeResult

Fixes #34169
/// A <see cref="ProblemDetails"/> for validation errors.
/// </summary>
[JsonConverter(typeof(HttpValidationProblemDetailsJsonConverter))]
public class HttpValidationProblemDetails : ProblemDetails
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sealed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

namespace Microsoft.AspNetCore.Mvc
{
-   public class ValidationProblemDetails : ProblemDetails
+   public class ValidationProblemDetails : HttpValidationProblemDetails
    {
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to not doing this - it just felt like a good way to help move the feature over to Http.Extensions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally thinking we would have ProblemDetails derive from something in the core ProblemDetailsBase.

@pranavkm pranavkm requested a review from halter73 July 9, 2021 18:50
@pranavkm pranavkm merged commit 885cbe3 into main Jul 10, 2021
@pranavkm pranavkm deleted the prkrishn/problem-details branch July 10, 2021 03:49
@ghost ghost added this to the 6.0-preview7 milestone Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ProblemDetails helpers to minimal actions

4 participants