ProducesErrorResponseTypeAttribute 클래스

정의

에 주석이 추가된 컨트롤러에서 기본적으로 반환되는 형식을 ApiControllerAttribute지정합니다.

Type 는 값이 제공되지 않을 때 클라이언트 오류(HTTP 상태 코드 4xx)에 대해 와 ProducesResponseTypeAttribute 연결된 오류 모델 형식을 지정합니다. 값이 지정되지 않은 경우 MVC는 매핑 클라이언트 오류(ClientErrorMapping)가 사용되는 경우 클라이언트 오류 형식ProblemDetails을 로 가정합니다.

애플리케이션에서 사용자 지정 오류 유형을 사용하여 응답하는 경우 이를 Attribute 사용하여 기본 오류 유형을 구성합니다.

public ref class ProducesErrorResponseTypeAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class ProducesErrorResponseTypeAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesErrorResponseTypeAttribute = class
    inherit Attribute
Public NotInheritable Class ProducesErrorResponseTypeAttribute
Inherits Attribute
상속
ProducesErrorResponseTypeAttribute
특성

생성자

ProducesErrorResponseTypeAttribute(Type)

ProducesErrorResponseTypeAttribute의 새 인스턴스를 초기화합니다.

속성

Type

기본 오류 유형을 가져옵니다.

적용 대상