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

ODataUriExtensions.BuildUri ignores $apply #1045

Closed
voronov-maxim opened this Issue Jan 25, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@voronov-maxim
Contributor

voronov-maxim commented Jan 25, 2018

ODataUriExtensions.BuildUri does not add $apply to the uri.

Assemblies affected

Microsoft.OData.Core, Version=7.4.0.20119

Reproduce steps

[Fact]
public void BuildUrlWithApplyGroupBy()
{
    var query = new Uri("http://gobbledygook/People?$apply=groupby((FirstName))");
    var parser = new ODataUriParser(HardCodedTestModel.TestModel, ServiceRoot, query);
    ODataUri uri = parser.ParseUri();

    Uri res = uri.BuildUri(ODataUrlKeyDelimiter.Parentheses);
    Assert.Equal(query, res);
}

Expected result

uri should be ?$apply=groupby((FirstName))

Actual result

uri is empty

@AlanWong-MS

This comment has been minimized.

Contributor

AlanWong-MS commented Jan 25, 2018

Thanks for filing this issue! I stepped into the code and yep, looks like we're missing the parsing logic for $apply in the BuildUri implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment