Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.11 KB

asp0024.md

File metadata and controls

32 lines (23 loc) · 1.11 KB
title ms.date description author monikerRange ms.author uid
ASP0024: A route handler has multiple parameters with the [FromBody] attribute
03/28/2023
Learn about analysis rule ASP0024: A route handler has multiple parameters with the [FromBody] attribute
tdykstra
>= aspnetcore-8.0
tdykstra
diagnostics/asp0024

ASP0024: Route handler has multiple parameters with the [FromBody] attribute

Value
Rule ID ASP0024
Category Usage
Fix is breaking or non-breaking Non-breaking

Cause

A route handler has multiple parameters with the [FromBody] attribute or a parameter with an [AsParameters] attribute where the parameter type contains multiple members with [FromBody] attributes.

Rule description

Route handler has multiple parameters with the [FromBody] attribute.

How to fix violations

To fix a violation of this rule, remove [FromBody] attributes from all but one parameter.

When to suppress warnings

Do not suppress a warning from this rule.