Skip to content

[Important] Regarding Backend Review API #31

@jyeok

Description

@jyeok

I think some modification / clarification are needed:

clarification
range of rating is 0 to 5, inclusive.
form of date is YYYY-MM-DD, leading zero inclusive.

modification
When getting review(s) I think the frontend doesn't have to know the id of author, restaurant, menu. Instead it should be "author": string, "restaurant": string, "menu": string.

api/review/

  • POST : require json {"restaurant_name": string, "menu_name": string, "content": string, "rating": float}, return json {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "rating": float, "date": string}
  • GET : return json list: each element: {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "image": url, "rating": float, "date": string}

api/review/:review_id/

  • GET : return json response {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "image": url, "rating": float, "date": string}
  • PUT : require json {"restaurant_name": string, "menu_name": string, "content": string, "rating": float}
    return {"id": id, "author": id, "restaurant": id, "menu": id, "content": string, "rating": float, "date": string}

api/review/:review_id/image/

  • POST : require multipart/form-data "image":file, return {"id": id, "author": id, "restaurant": id, "menu": id, "image": url, "content": string, "rating": float, "date": string}

Metadata

Metadata

Labels

backendimplementation of backenddocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions