ProducesResponseTypeAttribute ProducesResponseTypeAttribute ProducesResponseTypeAttribute ProducesResponseTypeAttribute Class

Definition

A filter that specifies the type of the value and status code returned by the action.

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
type ProducesResponseTypeAttribute = class
    inherit Attribute
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
Public Class ProducesResponseTypeAttribute
Inherits Attribute
Implements IApiResponseMetadataProvider, IFilterMetadata
Inheritance
ProducesResponseTypeAttributeProducesResponseTypeAttributeProducesResponseTypeAttributeProducesResponseTypeAttribute
Attributes
Implements

Constructors

ProducesResponseTypeAttribute(Int32) ProducesResponseTypeAttribute(Int32) ProducesResponseTypeAttribute(Int32) ProducesResponseTypeAttribute(Int32)

Initializes an instance of ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32) ProducesResponseTypeAttribute(Type, Int32) ProducesResponseTypeAttribute(Type, Int32) ProducesResponseTypeAttribute(Type, Int32)

Initializes an instance of ProducesResponseTypeAttribute.

Properties

StatusCode StatusCode StatusCode StatusCode

Gets or sets the HTTP status code of the response.

Type Type Type Type

Gets or sets the type of the value returned by an action.

Explicit Interface Implementations

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection) IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection) IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection) IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Applies to