Skip to content
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

Added fields as query parameter #199

Merged
merged 6 commits into from
Sep 10, 2018
Merged

Added fields as query parameter #199

merged 6 commits into from
Sep 10, 2018

Conversation

PhyberApex
Copy link
Contributor

This is really a first throw of me to check if you are okay with this or if you have anything against it. I also fixed all tests and added one more test. As I am not that fluent in C# and WebAPI tho I can't really tell if this is enough.

Be sure to get back to me with any comments you have and what you need changed to make a PR possible.

~Cheers

@PhyberApex
Copy link
Contributor Author

Also I have no idea why that one test failed. It failed about 2 times on my machine as well but now it is working fine.

Copy link
Owner

@joukevandermaas joukevandermaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much! this is looking really good.

A few small comments I think we should address before merging.

/// <inheritdoc/>
public override string ToString()
{
return $"filter[{Type}]={string.Join(",", Fields)}";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should say fields instead of filter?

Copy link
Contributor Author

@PhyberApex PhyberApex Sep 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 79c9a86

@@ -68,6 +68,22 @@ public void ConditionallyAppliesFilters()

}

[Fact(DisplayName = "Uses query fieldset expressions if specified")]
public void UsesQueryFieldsetExpressions()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like tabs and spaces got mixed in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having some trouble detecting those on my machine I hope they got fixed with a0ee858

@@ -68,6 +68,22 @@ public void ConditionallyAppliesFilters()

}

[Fact(DisplayName = "Uses query fieldset expressions if specified")]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a test where we ask for a field that's not on the model (should get nothing in that case).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the test in a0ee858. I think only the attributes should be empty as id and type field are still returned which I think would be correct behaviour at this point.

Copy link
Owner

@joukevandermaas joukevandermaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! you have a very fast reaction time 😄

Thanks for seeing this through! I will publish a new pre-release with these changes in it.

@joukevandermaas joukevandermaas merged commit 3fd7e12 into joukevandermaas:master Sep 10, 2018
@PhyberApex
Copy link
Contributor Author

I guess the pre-release is held up by the failing test? Should I take a look at that as well?

~Cheers

@joukevandermaas
Copy link
Owner

@PhyberApex you're right; but it's nothing to do with your PR. I'll fix it and publish the release. Thanks!

@PhyberApex
Copy link
Contributor Author

PhyberApex commented Sep 20, 2018

Hey @joukevandermaas sorry to bother you again. Just realized that there does not seem to be a release yet. Any estimate on this one? Would be greatly appriciated! Thanks!

~Cheers

Edit:
Nvm just realized it's probably in the beta release. Any word estimate on a 1.8 release or how stable the beta of 1.8 actually is?

@joukevandermaas
Copy link
Owner

@PhyberApex it is indeed a beta release. The betas are usually pretty stable; in this specific case I think it only contains the changes from this PR (compared to stable). Before creating a stable release I'll need to (at least) add some docs for this feature.

@PhyberApex
Copy link
Contributor Author

If you need any help with that from me be sure to let me know. Would gladly take over any work related to this.

Also thanks for always being so responsive, that's not a given!

~Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants