fix: rename filterOptions to filters and implement filter expression … #13
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.
This pull request refactors how filters are represented and formatted in request parameters, introducing a more expressive and composable filter system. The main changes include replacing the old
FilterOptiondata class with a sealed interface and expression classes, updating the request parameter classes to use the new filter system, and adding comprehensive tests.Filter system redesign
FilterOptiondata class with a sealed interface and several expression classes (FieldFilterExpression,ValueFilterExpression,FunctionFilterExpression,AndExpression,OrExpression) inFilterExpression.kt, allowing for more flexible and composable filter logic.AbstractRequestParametersandRequestParametersWithIncludesclasses inRequestParameters.ktto use the newfiltersproperty (a list ofFilterOption) instead offilterOptions, and changed how filters are formatted into query parameters using the new expression system. [1] [2] [3]API and usage updates
filterOptionstofiltersin request parameter classes, such asFormSchemaRequestParametersandFormSubmissionVersionRequestParameters, to match the new filter system. [1] [2]emptyMap<String, String>()toemptyMap()inFormSubmissionsRouter.ktfor clarity.Testing
RequestParametersFiltersTest.ktto verify correct formatting of complex filter expressions, ensuring the new filter system works as intended.…classes