dotnet / dotnet/AspNetCore.Docs
Documentation around missing query parameter of type string[] needs to be updated.
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
### 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:
```cs
[FromQuery] string[] names = null,
```
The following documentation should therefore be updated:

### 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
Contributor guide
Assessment
This issue has not been assessed yet.