Share via


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
[<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
Inheritance
ProducesResponseTypeAttribute
Derived
Attributes
Implements

Constructors

ProducesResponseTypeAttribute(Int32)

Initializes an instance of ProducesResponseTypeAttribute.

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

Initializes an instance of ProducesResponseTypeAttribute.

ProducesResponseTypeAttribute(Type, Int32)

Initializes an instance of ProducesResponseTypeAttribute.

Properties

StatusCode

Gets or sets the HTTP status code of the response.

Type

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

Explicit Interface Implementations

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Configures a collection of allowed content types which can be produced by the action.

Applies to