anitab-org / mentorship-backend

Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the backend of this system.
https://mentorship-backend-temp.herokuapp.com/
GNU General Public License v3.0
196 stars 449 forks source link

fix: Swagger documentation HTTP code display #1129

Closed RiddhiAthreya closed 3 years ago

RiddhiAthreya commented 3 years ago

Description

Changed the swagger documentation to display the error codes for all the endpoints

Fixes #1128

Type of Change:

How Has This Been Tested?

An example of the change Screenshot (182)

Checklist:

epicadk commented 3 years ago

@isabelcosta please approve the workflow run.

isabelcosta commented 3 years ago

@RiddhiAthreya amazing work fixing the HTTP code rendering on swagger πŸ‘πŸΎ πŸŽ‰ πŸ™ŒπŸΎ Just one comment, I see the lint is failing. Could you just run lint on the files you changed. Here are the instructions on how to pip install and run black lint tool πŸ‘‰πŸΎ https://github.com/anitab-org/mentorship-backend#auto-formatting-with-black

RiddhiAthreya commented 3 years ago

@isabelcosta thanks! done!

codecov[bot] commented 3 years ago

Codecov Report

Merging #1129 (a39b527) into develop (721f4dc) will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1129      +/-   ##
===========================================
+ Coverage    92.90%   92.95%   +0.04%     
===========================================
  Files           38       38              
  Lines         2073     2073              
===========================================
+ Hits          1926     1927       +1     
+ Misses         147      146       -1     
Impacted Files Coverage Ξ”
app/api/resources/mentorship_relation.py 97.09% <ΓΈ> (+0.58%) :arrow_up:
app/api/resources/task_comment.py 100.00% <ΓΈ> (ΓΈ)
app/api/resources/user.py 90.41% <ΓΈ> (ΓΈ)
app/api/resources/task.py 100.00% <100.00%> (ΓΈ)
isabelcosta commented 3 years ago

The changes made in this PR were tested locally. Following are the results:

  1. Code review - Done

  2. All possible responses (positive and negative tests) were tested as below:

    • Opened and verified PUT /task_comment Screenshot/gif:
      right HTTP code are showing on Swagger

      Expected Result: values show as numeric values instead of displaying the name of the enum being used Actual Result: HTTP values show as numeric

  3. Additional Comments: I tested via a Review App of Heroku: https://dashboard.heroku.com/pipelines/6ca457ca-1598-4fcd-b4bd-7ac5d70f6dde

  4. Status of PR Changed to: Ready to Merge.

welcome[bot] commented 3 years ago

Woohoo!🎊 Congrats on merging your first contribution to mentorship-backend!✨ Your code is officially a part of AnitaB.org Open Source now!! Time for a celebration πŸ™ŒπŸŽ‰βš‘οΈ Feel free to explore more on this project.πŸ€— Join us on AnitaB.org Open Source Zulip. 🀝 We have different streams for each active repository for discussions. πŸ‘©πŸ½β€πŸ’»πŸ§‘πŸΌβ€πŸ’» Do join our weekly check-in stream to share your weekly goals and the awesome work you did here.πŸ˜ƒ

Now that you've completed this, you can help someone else take their first step!

Check out projects stream on Zulip and the `First Timers Only` issues to check if someone needs help to figure out their problem or need some feedbacks. Reach out and be encouraging and friendly! πŸ˜„ πŸŽ‰

People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! πŸ˜„ πŸŽ‰

Create a welcoming issue for someone else or review their pull requests! πŸ˜„ πŸŽ‰

isabelcosta commented 3 years ago

Thank you for your contribution @RiddhiAthreya πŸ€—