ProducesResponseTypeAttribute Classe

Definição

Um filtro que especifica o tipo do valor e status código retornado pela ação.

public ref class ProducesResponseTypeAttribute : Attribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public class ProducesResponseTypeAttribute : Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ProducesResponseTypeAttribute = class
    inherit Attribute
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
Public Class ProducesResponseTypeAttribute
Inherits Attribute
Implements IApiResponseMetadataProvider, IFilterMetadata
Herança
ProducesResponseTypeAttribute
Derivado
Atributos
Implementações

Construtores

ProducesResponseTypeAttribute(Int32)

Inicializa uma instância de ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32)

Inicializa uma instância de ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32, String, String[])

Inicializa uma instância de ProducesResponseTypeAttribute.

Propriedades

StatusCode

Obtém ou define o código de status HTTP da resposta.

Type

Obtém ou define o tipo do valor retornado por uma ação.

Implantações explícitas de interface

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Configura uma coleção de tipos de conteúdo permitidos que podem ser produzidos pela ação.

Aplica-se a