ProducesErrorResponseTypeAttribute Classe

Definição

Especifica o tipo retornado por padrão por controladores anotados com ApiControllerAttribute.

Type especifica o tipo de modelo de erro associado a um ProducesResponseTypeAttribute para um erro de cliente (Código de Status HTTP 4xx) quando nenhum valor é fornecido. Quando nenhum valor é especificado, o MVC pressupõe que o tipo de erro do cliente seja ProblemDetails, se erros de cliente de mapeamento (ClientErrorMapping) forem usados.

Use isso Attribute para configurar o tipo de erro padrão se o aplicativo usar um tipo de erro personalizado para responder.

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
Herança
ProducesErrorResponseTypeAttribute
Atributos

Construtores

ProducesErrorResponseTypeAttribute(Type)

Inicializa uma nova instância de ProducesErrorResponseTypeAttribute.

Propriedades

Type

Obtém o tipo de erro padrão.

Aplica-se a