-
Notifications
You must be signed in to change notification settings - Fork 3
[CDX-352] Add preFilterExpression to RecommendationRequest #89
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
[CDX-352] Add preFilterExpression to RecommendationRequest #89
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for pre-filter expressions in recommendation requests, enabling filtering of recommendation results based on specified criteria.
Changes:
- Added
PreFilterExpressionproperty toRecommendationsRequestclass - Updated
GetRequestParametersmethod to include pre-filter expression in request parameters - Added comprehensive test coverage for the new functionality
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/constructor.io/models/Recommendations/RecommendationsRequest.cs | Added PreFilterExpression property and logic to serialize it into request parameters |
| src/Constructorio_NET.Tests/models/Recommendations/RecommendationsRequestTest.cs | Added unit test to verify pre-filter expression is correctly added to request parameters |
| src/Constructorio_NET.Tests/client/modules/RecommendationsTests.cs | Added integration tests for pre-filter expression functionality with both object-based and JSON-based expressions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Nice!! Thank you! |
HHHindawy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left a single comment that's causing tests to fail
| 'value': 'XYZ' | ||
| }" | ||
| ); | ||
| JsonPreFilterExpression preFilterExpression = new JsonPreFilterExpression( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think JsonPreFilterExpression with an upper-case F is a valid class name.
We could either use JsonPrefilterExpression now instead, or rename it everywhere to be JsonPreFilterExpression.
src/Constructorio_NET.Tests/client/modules/RecommendationsTests.cs
Outdated
Show resolved
Hide resolved
…s.cs Co-authored-by: Ahmad Mudaafi' <ahmad.mudaafi@constructor.io>
HHHindawy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.