feat: add search_query parameter to operations api #1539
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR adds the search_query parameter to the Operations Feeds GET endpoint.
Closes: #1442
Expected behavior:
When the search_query parameter is populated, the feeds are filtered using the LIKE function on the feed field.stable_id, feed.feed_name, feed.provider
Testing tips:
From our AI friend
This pull request adds a general search query filter to the
get_feedsAPI endpoint, allowing users to search feeds by stable ID, feed name, or provider. The implementation includes changes to the API specification, backend query logic, and test coverage to support and verify the new search functionality.API and Query Enhancements:
search_queryparameter to theget_feedsendpoint in the OpenAPI specification (docs/OperationsAPI.yaml), enabling clients to perform general searches against feed stable ID, feed name, and provider.get_feeds_queryto filter feeds using the providedsearch_query, matching against stable ID, feed name, and provider fields with case-insensitive partial matches. [1] [2]get_feedsimplementation to accept and pass the newsearch_queryparameter to the query helper. [1] [2]Test and Data Improvements:
functions-python/operations_api/tests/conftest.py) [1] [2] [3]functions-python/operations_api/tests/feeds_operations/impl/test_get_feeds.py)Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything