ProducesErrorResponseTypeAttribute クラス
定義
で注釈が付けられたコントローラーによって既定で返される型を指定し ApiControllerAttribute ます。
TypeProducesResponseTypeAttribute値が指定されていない場合に、クライアントエラー (HTTP ステータスコード 4xx) のに関連付けられたエラーモデルの種類を指定します。 値が指定されていない場合、MVC では、クライアントエラーの種類として、 ProblemDetails マッピングクライアントエラー () が使用されていると想定され ClientErrorMapping ます。
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 |
既定のエラーの種類を取得します。 |