Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
There are a number of ways to make it unnecessary to pass an argument corresponding to a given parameter. We should think about what we want to do in these scenarios with RDG.
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/{purple:int}", HandleRequest);
app.Run();
static string HandleRequest(int purple, int orange = 1) => "Hello World!";
static string HandleRequest(int purple, [System.Runtime.InteropServices.OptionalAttribute] int orange) => "Hello World!";
static string HandleRequest(int purple, params int[] orange) => "Hello World!";
Describe the solution you'd like
I see that parameters can't already be flagged as optional:
// Endpoint Parameter: purple (Type = int, IsOptional = False, IsParsable = True, Source = RouteOrQuery)
Maybe we just need to recognize more forms of optionality?
Additional context
No response