Skip to content
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

Documentation around missing query parameter of type string[] needs to be updated. #33588

Open
sntnupl opened this issue Sep 11, 2024 · 0 comments

Comments

@sntnupl
Copy link

sntnupl commented Sep 11, 2024

Description

Post .NET 8 (and probably in .NET 7 as well), if the actual query parameter is absent in the URI, the following code will result in a null value being bound to the parameter:

[FromQuery] string[] names = null,

The following documentation should therefore be updated:
image

Page URL

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-8.0#optional-parameters

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/minimal-apis.md

Document ID

b09824ab-b051-75a1-13b7-b0e281cc46e0

Article author

@Rick-Anderson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants