Bugfix: seperated mixed up V1/V2 endpoints#890
Open
calumbell wants to merge 2 commits intoopen5e:stagingfrom
Open
Bugfix: seperated mixed up V1/V2 endpoints#890calumbell wants to merge 2 commits intoopen5e:stagingfrom
calumbell wants to merge 2 commits intoopen5e:stagingfrom
Conversation
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
This PR fixes a bug on the API where the
/and/v1endpoints were displaying a mix of V1 and V2 Views:Before (
stagingbranch on the beta API site, note the mix of v1 and v2 endpoints):After (this branch):
The bug was being caused by DRF getting confused over V1 and V2 having the same name during URL compliation. The issue was addressed by authoring an explicit API root for API V1 so that V1 and V2 endpoints can be easily seperated.
These changes were made in the
api/urls.pyfile, the remaining changes were updates to the V1 tests so that they would work correctly with the new canonical V1 endpoints now living behind the/v1/subroute.Related Issue
Closes #888
How was this tested?
pytest(all tests passing, eventually!)