1 instantiation of ProducesErrorResponseTypeAttribute
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
44
var defaultErrorTypeAttribute = new
ProducesErrorResponseTypeAttribute
(defaultErrorType);
15 references to ProducesErrorResponseTypeAttribute
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
ApiResponseTypeProvider.cs (2)
55
if (action.Properties.TryGetValue(typeof(
ProducesErrorResponseTypeAttribute
), out result))
57
defaultErrorType = ((
ProducesErrorResponseTypeAttribute
)result!).Type;
EndpointMetadataApiDescriptionProvider.cs (2)
332
var
errorMetadata = endpointMetadata.GetMetadata<
ProducesErrorResponseTypeAttribute
>();
Microsoft.AspNetCore.Mvc.Core (11)
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
44
var
defaultErrorTypeAttribute = new ProducesErrorResponseTypeAttribute(defaultErrorType);
ApplicationModels\ApiConventionApplicationModelConvention.cs (9)
14
/// <item><description><see cref="
ProducesErrorResponseTypeAttribute
"/> that applies to the action.</description></item>
25
public ApiConventionApplicationModelConvention(
ProducesErrorResponseTypeAttribute
defaultErrorResponseType)
31
/// Gets the default <see cref="
ProducesErrorResponseTypeAttribute
"/> that is associated with an action
34
public
ProducesErrorResponseTypeAttribute
DefaultErrorResponseType { get; }
78
var
errorTypeAttribute =
79
action.Attributes.OfType<
ProducesErrorResponseTypeAttribute
>().FirstOrDefault() ??
80
action.Controller.Attributes.OfType<
ProducesErrorResponseTypeAttribute
>().FirstOrDefault() ??
81
action.Controller.ControllerType.Assembly.GetCustomAttribute<
ProducesErrorResponseTypeAttribute
>() ??
84
action.Properties[typeof(
ProducesErrorResponseTypeAttribute
)] = errorTypeAttribute;
ProducesErrorResponseTypeAttribute.cs (1)
22
/// Initializes a new instance of <see cref="
ProducesErrorResponseTypeAttribute
"/>.