I always do the following:
//Configure User Defined REST Paths Routes .Add<DTO1>("/service/function/{argument}") .Add<DTO2>("/service/commonsegment/{Function*}")
the mapping for DT1 is the "base" mapping, one URL corresponds to the DTO.
in DTO2 you will need a key called "Function", which will give you the name of the first "not common" segment of the URL, any other segments specified in the URL will be mapped to your DTO2, if possible (if it has a property compliance). Thus, you open new functions / arguments, without changing the web server itself, but only the implementation of support (which can / should be located on an external dll).
Hope this helps.
source share