2022-Spring-NYU-DevOps-Shopcarts / shopcarts

Shopcarts squad.
Apache License 2.0
2 stars 2 forks source link

Refactor APIs for Shopcarts (not include subroutines) #113

Closed kdokm closed 2 years ago

kdokm commented 2 years ago

As a developer I need to refactor the code using a more advanced framework So that I can have generated documentation automatically

Details and Assumptions

TimothyXu commented 2 years ago

sorry i just realised we still need to add the swagger tags for automatically generating docs! since you've already done a lot of work, feel free to write a separate story for the swagger tags.

kdokm commented 2 years ago

I think most tags are already done? You can see docs in .../apidocs @TimothyXu

TimothyXu commented 2 years ago

@kdokm Yes you're right sorry! It's all done

TimothyXu commented 2 years ago

Copying my comment in the other PR: Most of the work is done which is great! Refactoring is fine. But: (we can open a different story to fix this if you wish so someone else can do it)

  1. As prof said in our slack channel, A 400_BAD_REQUEST is reserved for the payload. Not the path. so we need to change all the urls back to int:shopcart_id etc. and not check for them manually. And when we try to call e.g. /shopcarts/wrongid we should get the default 404 from Flask and that's fine.