Skip to content

Commit 6b90928

Browse files
committed
Use generic overload
1 parent b1c4427 commit 6b90928

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonApiDotNetCore.OpenApi.Swashbuckle/JsonApiActionDescriptorCollectionProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ private static void SetConsumes(ActionDescriptor descriptor, Type requestType, J
315315
string contentType = mediaType.ToString();
316316

317317
if (descriptor is ControllerActionDescriptor controllerActionDescriptor &&
318-
controllerActionDescriptor.MethodInfo.GetCustomAttributes(typeof(ConsumesAttribute)).Any())
318+
controllerActionDescriptor.MethodInfo.GetCustomAttributes<ConsumesAttribute>().Any())
319319
{
320320
// A custom JSON:API action method with [Consumes] on it. Hide the attribute from Swashbuckle, so it uses our data in API Explorer.
321321
controllerActionDescriptor.MethodInfo = new MethodInfoWrapper(controllerActionDescriptor.MethodInfo, [typeof(ConsumesAttribute)]);

0 commit comments

Comments
 (0)