Map dynamic paths (e.g. with tokens and or constraints)
Is your feature request related to a problem? Please describe.
I am unable to create dynamic pipeline branches by using IApplicationBuilder.Map.
Example. I'm am trying to organize my API project by using different nested applications as described in this Damian Hickey post but I am unable to map a path that contains, for example, version tokens.
Describe the solution you'd like
Be able to map a dynamic path which contains tokens and/or route constraints. Example:
app.Map( "/branch1/{v{version:apiVersion}}/", builderConfig => {
[...]
});
Additional context
Please have a look at the following discussion. A project which reproduce the problem is available here.
Map is a simple construct designed just for matching exact paths. If you want to do more complex logic, you can use .Use and run your own code, or use routing.
We don't have any plans to add this functionality to .Map.