It appears the Nancy codebase doesn't use either nor does it use the ParameterSegmentInformation class, I'm not sure if the regex should be fixed or if this is just obsolete code that hasn't been removed yet.
I'm attempting to use these functions to add path parameters to automatically generated documentation, I'd prefer to use the actual parsing code and I'd love to get instances of IRouteSegmentConstraint but that doesn't seem possible without a URL.
Steps to Reproduce
Looking at the unit tests there are the following cases:
The following two Nancy extension methods use a regex that doesn't support route segment constraints (e.g.
{id:int}
):Nancy.Extensions.StringExtensions.IsParameterized(string segment)
Nancy.Extensions.StringExtensions.GetParameterDetails(string segment)
The regex supports curly segments with a name, then an optional default prefixed by
?
:{(?<name>[A-Za-z0-9_]*)(?:\?(?<default>[A-Za-z0-9_-]*))?}
It appears the Nancy codebase doesn't use either nor does it use the
ParameterSegmentInformation
class, I'm not sure if the regex should be fixed or if this is just obsolete code that hasn't been removed yet.I'm attempting to use these functions to add path parameters to automatically generated documentation, I'd prefer to use the actual parsing code and I'd love to get instances of
IRouteSegmentConstraint
but that doesn't seem possible without a URL.Steps to Reproduce
Looking at the unit tests there are the following cases:
While something like this will fail:
System Configuration
The regex and extension methods are unchanged between 1.x-WorkingBranch and master.