-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adds support for encoded filters for API use #556
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Our linter upgraded to Ruby 3.1 syntax automatically and started writing backwards-incompatible syntax changes into our files. We needed fixes in the new linter so I decided to roll with the punches.
The API will now accept a filter encoded in base64url from either the querystring or from body parameters. This allows a simpler invocation of a filter endpoint via a GET rquest. Fixes #555
Allcharles
approved these changes
Feb 4, 2022
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.
Looks good, I much enjoy the smaller PRs. Makes it easier to track whats being done. Although I would have preferred this split into two separate PRs, however i suspect they were a package deal by the time you realised
Co-authored-by: Charles Alleman <charles@alleman.com.au>
Added a test case for complex characters and produced a better error message for a bad json payload.
Our PR was incorporated into arel_extensions. The monkey patch was no longer needed.
Most of the failures occurred due to the Rails 7 upgrade
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds support for encoded filters for API use.
The API will now accept a filter encoded in base64url from either the query string or from body parameters.
This allows a simpler invocation of a filter endpoint via a GET request.
Fixes #555.
Changes
Adds support for decoding filters from the request parameter
filter_encoded
. A decoded filter is deep-merged into the hash of other request parameters.Wiki also updated with new documentation: https://github.com/QutEcoacoustics/baw-server/wiki/API:-Filtering#advanced-filtering-with-a-query-string-parameter
Problems
Rails 7 and Ruby 3.1 upgrades bundled in. You can ignore those changes in your review (just review the last commit).
Visual Changes
N/A
Final Checklist