-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partially resolving one of multiple query parameters results in malformed template. #79
Comments
Thanks very much for reporting this and for the repro. We'll take a look! |
Quick note verifying a repro. I can verify that this is the current behaviour. The reference implementation in Tavis.UriTemplates produces the same result with the equivalent code. Tavis.UriTemplates.UriTemplate template2 = new("https://example.org/{?foo,bar}", true);
template2.SetParameter("foo", 42);
Console.WriteLine(template2.Resolve());
There are no specs that validate this case. |
It seems that there is no proper support for "new style" partial template resolution in Tavis.UriTemplates. I have added some code which produces non-malformed URI templates, but it breaks the multivariable template up into components to deal with the possibility of missing items "in the middle" of the list. |
This is resolved in 8f53924 |
Which I have accidentally pushed to main. Clearly the branch protection is not correct here! I'll sort this out and issue a PR. |
@wertzui Thanks for the bug report; can you have a look at the PR and validate that it "works for you". |
When resolving one of multiple query parameters, the result is missing
{&
Results in
But should be
The text was updated successfully, but these errors were encountered: