Share via


ValidationProblem Class

Definition

An IResult that on execution will write Problem Details HTTP API responses based on https://tools.ietf.org/html/rfc7807

public sealed class ValidationProblem : Microsoft.AspNetCore.Http.IContentTypeHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<Microsoft.AspNetCore.Http.HttpValidationProblemDetails>, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider
type ValidationProblem = class
    interface IResult
    interface IEndpointMetadataProvider
    interface IStatusCodeHttpResult
    interface IContentTypeHttpResult
    interface IValueHttpResult
    interface IValueHttpResult<HttpValidationProblemDetails>
Public NotInheritable Class ValidationProblem
Implements IContentTypeHttpResult, IEndpointMetadataProvider, IResult, IStatusCodeHttpResult, IValueHttpResult, IValueHttpResult(Of HttpValidationProblemDetails)
Inheritance
ValidationProblem
Implements

Properties

ContentType

Gets the value for the Content-Type header: application/problem+json.

ProblemDetails

Gets the HttpValidationProblemDetails instance.

StatusCode

Gets the HTTP status code: Status400BadRequest

Methods

ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Explicit Interface Implementations

IEndpointMetadataProvider.PopulateMetadata(MethodInfo, EndpointBuilder)

Populates metadata for the related Endpoint and MethodInfo.

IStatusCodeHttpResult.StatusCode
IValueHttpResult.Value
IValueHttpResult<HttpValidationProblemDetails>.Value

Applies to