Share via


ProducesDefaultResponseTypeAttribute Class

Definition

A filter that specifies the Type for all HTTP status codes that are not covered by ProducesResponseTypeAttribute.

public ref class ProducesDefaultResponseTypeAttribute sealed : Attribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiDefaultResponseMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class ProducesDefaultResponseTypeAttribute : Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDefaultResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesDefaultResponseTypeAttribute = class
    inherit Attribute
    interface IApiDefaultResponseMetadataProvider
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
Public NotInheritable Class ProducesDefaultResponseTypeAttribute
Inherits Attribute
Implements IApiDefaultResponseMetadataProvider, IFilterMetadata
Inheritance
ProducesDefaultResponseTypeAttribute
Attributes
Implements

Constructors

ProducesDefaultResponseTypeAttribute()

Initializes an instance of ProducesResponseTypeAttribute.

ProducesDefaultResponseTypeAttribute(Type)

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