-
Notifications
You must be signed in to change notification settings - Fork 50
Move page and page_size query param validation into serializer #868
Conversation
API Developer Docs Preview: Ready https://wordpress.github.io/openverse-api/_preview/868 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
Keeping this PR as a draft as it should not be merged until we've fixed the production ES CPU usage. |
@sarayourfriend since the ES CPU usage is under control now, should we push to update, undraft and get this PR merged? |
…o remove/custom-page-param-validation
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
This can be compared against an earlier (approved) implementation in #778, so this PR should be too!
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 great using the test instructions from the prior PR.
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.
Thank you both @sarayourfriend & @dhruvkb for working on this! Looks great 💯
Fixes
Related to #857 and #843
Description
In this PR I move scattered query parameter validation into the query serializer, where it probably belongs. This has two benefits:
get_api_exception
None of these changes change the API surface.
The lines changed is also deceptive on this PR as something like 85 of the lines added or changed were in the tests.
Testing Instructions
Ensure CI passes. Checkout the branch, set up the local API following the README instructions and make some smoke test requests to ensure everything works as expected.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin