I have searched a lot on the internet to find out the way to make constraints like The Customer Id should be a guid and required so that I can end up with [HttpGet("{customerId:guid|required}")], but unluckily don't have any solution to do like this. The document from Microsoft at https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing, section Route Constraint Reference also doesn't shed light on this. Could anyone can do the multiple constraint values like what I just describe? Thank you in advance.
requiredin route condition{customerId:required}and in action you can specify type of incommingcustomerIdlikeGet([FromRoute]Guid customerId), later you can also checkModelState.IsValid