How to make a route parameter optional in Azure Function
You can express that a parameter is optional in the route template itself.
For the route above, you can just change your template to the following:
ResolveKey/{key}/{resolver?}
You can find more information about optional routes and default values here
Azure Functions now support regular expressions. You can change your routing template to
ResolveKey/{key}/{*resolver}