You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vartemplate=newUriTemplate("http://localhost/{/x}",false)varvalues=template.GetParameters("http://localhost/foo/1/");// currently values is null, should bind x to "foo/1"
Hey @hnafar multi-segment path parameters is something we would definitely like to add in OAS 3.1 (see list here )
And therefore yes, I would love to see support for it in Tavis.UriTemplate. Unfortunately, I don't have time to work on it right now. If you want to give it a try, then I would start by looking at this test:
public void OptionalPathParam()
{
var uri = new Uri("/foo/yuck/bob", UriKind.RelativeOrAbsolute);
var template = new UriTemplate("/foo{/bar}/bob");
var parameters = template.GetParameters(uri);
Assert.Equal("yuck", parameters["bar"]);
}
Add support for parsing wildcard parameter in UriTemplate. From https://github.com/dotnet/corefx/issues/24652#issuecomment-381698515
see https://tools.ietf.org/html/rfc6570#section-3.2.6
also see OAI/OpenAPI-Specification#291 for a related discussion
Will be happy to work on this and make a pull request if you point me in the right direction
The text was updated successfully, but these errors were encountered: