2022-Spring-NYU-DevOps-Shopcarts / shopcarts

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

Refactor APIs for Items #114

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

can put swagger tags (for auto-generating docs0 in a different story if need be

TimothyXu commented 2 years ago

Copying my comment in the GitHub PR for bookkeeping purposes. Most of the work is done which is great! Refactoring is fine. But 3 issues to deal with:

  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.
  2. Once this is done we should also delete most of error_handlers.py so they don't impact our nosetests coverage
  3. Unless I'm understanding HTML incorrectly due to not knowing any front end, we need to get rid of the static get route at /static/path:filename.
TimothyXu commented 2 years ago

1 and 2 done, need to possibly do 3 (please someone who knows how websites work chime in lol)