Class ResponseTypeAttribute
- Namespace
- System.Web.Http.Description
- Assembly
- System.Web.Http.dll
Use this to specify the entity type returned by an action when the declared return type is HttpResponseMessage or IHttpActionResult. The ResponseType will be read by ApiExplorer when generating ApiDescription.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class ResponseTypeAttribute : Attribute
- Inheritance
-
ResponseTypeAttribute
- Inherited Members
Constructors
ResponseTypeAttribute(Type)
Initializes a new instance of the ResponseTypeAttribute class.
public ResponseTypeAttribute(Type responseType)
Parameters
responseType
TypeThe response type.
Properties
ResponseType
Gets the response type.
public Type ResponseType { get; }