Feature/fix inconsistencies in mobile api #267
Merged
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 PR aims to fix most of the inconsistencies found by CoffeeIT in our mobile api endpoints. I opted for 'quick fixes' instead of rewriting the entire mobile_api app, because edubadges is legacy anyway and it will be replaced soonish. In educredentials we'll make sure to use the full power of DRF and make everything as consistent as possible.
The document provided by CoffeeIT has a detailed overview of various inconsistencies and a checklist at the bottom. This PR fixes the first 3.
The last 2 are a bit different:
The error messages 'error' vs 'detail' mostly comes from the older views that are reused. It feels like a bit of an overkill to rewrite those entire endpoints, just to get the error field name named correctly.Edit: Discussed with Okke: The authentication error messages do not come from EduID and also not from our mobile authentication backend. So I asked about this in the slack with CoffeeIT
Before we deploy this, I want to write them a detailed overview of everything that changed, so they can update their code quickly