Systers, an AnitaB.org community
Add potential error responses to Swagger UI (Backend)
Introduction
Swagger user interface, the one accessible locally through localhost:5000, does not have all the error responses properly documented. You can see the 200 HTTP code, documented as a successful message, but some APIs may return 401, 403, 404 and these are not documented. You can use annotations by from flask-restplus framework that allows you to do this.
Prerequisite:
- Have a GitHub account
- Know how to use git
- Setup and run the project on your local development environment
Steps:
- Create a copy of the project into your account GitHub by forking systers/mentorship-backend project.
- Clone the project onto your local development environment
- [Optional] Create a branch to make your changes
- Document every HTTP error code response, by exposing them on the Swagger UI per each API (e.g.: 404 for user not found when sending a new request).
- Commit your change through the interface using our Commit message Style Guide.
- Submit a Pull Request, targeting
gci-dev
branch, following the template provided in the description.
Resources:
- If you need help or get lost, post a response to our questions topic in our #gci stream.
- Pull request template at this link.
- Commit message Style Guide can be found here.
- How to fork, clone and setup remotes the project into your account wiki page can be found here.
- Swagger documentation API from flask-RESTPlus can be found here
Work Submission:
Submit a link to Pull Request (PR), with reference to #345 created with the change.
Task tags
Students who completed this task
_daksha_, asawesome07, BartekPacia, HardikJH, i_maier