Specs update suggestions
Author: nhannqghCreated Apr 28, 2021Updated Jan 1, 2022
LabelsStatus: RFCStatus: Approvedv2 changelog
Frontend
- Could we remove # character from url? I think the url will look better without #.
Backend
- Use abstract keywork in responses to make them more abstract and reusable.
- For example, with get single article api we can return:
{ "data": { ... } }instead of
{ "article": { ... } }- With get list of articles api we can return:
{ "data": [ ... ], "total": 20 }instead of
{ "articles": { ... }, articlesCount: 20 }- And the same for update, create responses
- Server also return messages for create, update, delete, favorite,.. requests. For example: {..., message: "article created successfully"}
- A create api should only return created id, frontend need to call api with the id to get what it needs
Source: realworld-apps/realworld