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 and EmptyBodyBehavior.Disallow map to allowEmpty = false which is problematic when we want to discern scenarios where a developer explicitly set the allowEmpty 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
FromBodyattribute 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.DefaultandEmptyBodyBehavior.Disallowmap toallowEmpty = falsewhich is problematic when we want to discern scenarios where a developer explicitly set theallowEmptyparameter vs scenarios where we are using the implied value.We'll need to update the codepath to discern when a user set the
AllowEmptyattribute to support overriding the optionality configuration that was inferred from the code.See #34505 (comment) for more info.