-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Is your feature request related to a problem? Please describe.
It is frustrating when registering route for query/command that contains multiple nullable parameters.
Describe the solution you'd like
public record ItemQuery(string? AppName, int ItemId) : IQuery<ItemDto>;
// this maps following route
// "apps/{appName}/items/{itemId:int}
// "apps/-/items/{itemId:int}"
app.MapQuery<ItemQuery>("apps/{appName}/items/{itemId:int}");you may configure this behavior:
app.MapQuery<ItemQuery>("apps/{appName}/items/{itemId:int}", mapNullableRoute: true, patternWhenNull: "-");
app.MapQuery<ItemQuery>("apps/{appName}/items/{itemId:int}", mapNullableRoute: false);Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request