Skip to content

Use nullibility to infer optionality of service and body parameters #32375

Closed
@halter73

Description

@halter73
app.MapPost("/todos", (Todo? todo) => { 
// ...
app.MapGet("/something", (IService? service) => { 
// ...

In cases like the above, we could use the nullability of the Todo and IService parameters to determine weather to request body and service are optional.

See #31658 (comment)

Metadata

Metadata

Assignees

Labels

Priority:1Work that is critical for the release, but we could probably ship withoutarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcblockedThe work on this issue is blocked due to some dependencyenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-minimal-actionsController-like actions for endpoint routinghelp wantedUp for grabs. We would accept a PR to help resolve this issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions