Properly support different FromBody.AllowEmpty
settings
#34567
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
Priority:3
Work that is nice to have
Milestone
The
FromBody
attribute currently accepts a boolean allowEmpty value that allows the developer to determine whether or not the route will accept an empty body as part of the request.The attribute currently assumes that both
EmptyBodyBehavior.Default
andEmptyBodyBehavior.Disallow
map toallowEmpty = false
which is problematic when we want to discern scenarios where a developer explicitly set theallowEmpty
parameter vs scenarios where we are using the implied value.We'll need to update the codepath to discern when a user set the
AllowEmpty
attribute to support overriding the optionality configuration that was inferred from the code.See #34505 (comment) for more info.
The text was updated successfully, but these errors were encountered: