Skip to content

Properly support different FromBody.AllowEmpty settings #34567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
captainsafia opened this issue Jul 20, 2021 · 2 comments
Open

Properly support different FromBody.AllowEmpty settings #34567

captainsafia opened this issue Jul 20, 2021 · 2 comments
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

Comments

@captainsafia
Copy link
Member

captainsafia commented Jul 20, 2021

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.

@ghost
Copy link

ghost commented Jul 23, 2021

Thanks for contacting us.

We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@rafikiassumani-msft rafikiassumani-msft added the Priority:3 Work that is nice to have label Jul 23, 2021
@captainsafia captainsafia added old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels and removed area-runtime labels Jul 27, 2021
@rafikiassumani-msft rafikiassumani-msft modified the milestones: 6.0-rc1, Backlog Jul 27, 2021
@ghost
Copy link

ghost commented Jul 27, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@amcasey amcasey added the area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc label Jun 2, 2023
@captainsafia captainsafia removed the old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants