ProducesErrorResponseTypeAttribute 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
에 주석이 추가된 컨트롤러에서 기본적으로 반환되는 형식을 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 |
기본 오류 유형을 가져옵니다. |