Draft
Conversation
ryanrath
requested changes
Jul 29, 2024
nsafwan
commented
Jul 29, 2024
Author
nsafwan
left a comment
There was a problem hiding this comment.
Missing 'r' and snake_case for want_public_user have been fixed. And yes, that check is failing because of pulled code from get_dw_descripter.php.
This file contains hidden or 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
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.
Description
Allows users without an authentication token to access the raw data API. Migrating the dw_descripter to the Rest stack through the route
/rest/v1/warehouse/search/dw_descripter. Added new test cases for the new dw_descripter endpoint and modifying the test for the raw data endpoint to now pass for requests with empty token in accordance to the modifications.Two new exception classes were added for token authentication:
classes/Rest/Exceptions/BadTokenException.phpclasses/Rest/Exceptions/EmptyTokenException.phpMotivation and Context
Since the raw data endpoint is used for the data catalog, this would allow for public/non logged in users to view the entries available to them without a token. Migrating the dw_descripter endpoint allows for this same behavior and places it in the same place as the rest of the API functionality. Adding the new exception classes separates
UnauthorizedHttpExceptionfor more nuanced behavior depending on empty or invalid token.Tests performed
Automated tests. Modified tests to test for the changed functionality and added new test for the migrated endpoint.
Checklist: