Skip to content

api/{rofl_apps,evm_tokens}: Filter by multiple name fragments#1026

Merged
ptrus merged 1 commit into
mainfrom
ptrus/feature/rofl-name-multi
May 29, 2025
Merged

api/{rofl_apps,evm_tokens}: Filter by multiple name fragments#1026
ptrus merged 1 commit into
mainfrom
ptrus/feature/rofl-name-multi

Conversation

@ptrus

@ptrus ptrus commented May 29, 2025

Copy link
Copy Markdown
Member

Fixes: #1015

Change is backrwads compatible, providing a single name term works as before.

TODO:

  • also do for evm tokens

@ptrus ptrus requested a review from csillag May 29, 2025 07:25
@ptrus ptrus force-pushed the ptrus/feature/rofl-name-multi branch from a1b6279 to cdbc917 Compare May 29, 2025 07:31
@ptrus ptrus requested a review from Copilot May 29, 2025 07:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request enhances the ROFL apps API by adding support for filtering by multiple name fragments while maintaining backwards compatibility with single-term filters. Key changes include updating test cases and expected responses for multiple names, dynamically constructing the SQL query in the queries module, and adding client-side validation and API specification updates for the new name filtering functionality.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/e2e_regression/eden_testnet_2025/test_cases.sh Adds a new test case for filtering by multiple names
tests/e2e_regression/eden_testnet_2025/expected/sapphire_rofl_app_by_multiple_names.{headers,body} Provides expected output for the new filter
storage/client/queries/queries.go Replaces the static query with a dynamic SQL query generator for multiple name substrings
storage/client/client.go Adds validation for the number of name filters and updates query assembly
api/spec/v1.yaml Updates API spec to support an array of name strings with a maxItems constraint
.changelog/1026.feature.md Documents the feature update

Comment thread storage/client/client.go Outdated
Comment thread api/spec/v1.yaml Outdated
@ptrus ptrus changed the title api/rofl_apps: Filter by multiple name fragments api/{rofl_apps,evm_tokens}: Filter by multiple name fragments May 29, 2025
@ptrus ptrus force-pushed the ptrus/feature/rofl-name-multi branch from cdbc917 to a8c3d7e Compare May 29, 2025 09:28
@ptrus ptrus requested a review from Copilot May 29, 2025 11:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds support for filtering by multiple name fragments in both the ROFL apps and EVM tokens API endpoints while maintaining backwards compatibility for a single name filter.

  • Updated end-to-end tests and expected responses to validate multiple name filters
  • Modified storage client functions to enforce a maximum of 6 name fragments and updated the query logic accordingly
  • Revised the OpenAPI spec to reflect an array-based query parameter for name filtering and added corresponding changelog entries

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/e2e_regression/eden_testnet_2025/test_cases.sh Added a test case for filtering ROFL apps by multiple names
tests/e2e_regression/eden_2025/test_cases.sh Added test cases for filtering EVM tokens by name and multiple names
tests/e2e_regression/eden/test_cases.sh Added test cases for filtering EVM tokens by name and multiple names
storage/client/client.go Implemented filter validation to ensure the number of name fragments does not exceed 6 and updated query construction
api/spec/v1.yaml Updated the API specification to accept an array of strings for the name filter with a maximum of 6 items
.changelog/1026.feature.2.md Added changelog entry for EVM tokens filtering (note potential naming inconsistency)
.changelog/1026.feature.1.md Added changelog entry for ROFL apps filtering
Comments suppressed due to low confidence (1)

.changelog/1026.feature.2.md:1

  • Consider correcting the typo in the changelog entry from 'api/emv_tokens' to 'api/evm_tokens' to maintain consistency with the API endpoint naming.
api/emv_tokens: Support filtering by multiple name fragments

@ptrus ptrus force-pushed the ptrus/feature/rofl-name-multi branch from a8c3d7e to 37f3cd4 Compare May 29, 2025 11:41
@ptrus ptrus merged commit 1a0d920 into main May 29, 2025
20 checks passed
@ptrus ptrus deleted the ptrus/feature/rofl-name-multi branch May 29, 2025 11:47
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.

API: more flexible text search

2 participants