anitab-org / anitab-org/mentorship-backend
Add query parameter to sort users for GET /users and GET /users/verified APIs
- 主要语言
- Python
- 星标
- 200
- 派生
- 449
- PR 合并指标
- 30 天内没有已合并 PR
描述
## Description
As a user of the app,
I need to have ordering capabilities,
so that I can order the users by certain attributes.
APIs used to fetch Users, don't have an option to be sorted by a certain attribute. We want to be able to filter users by name (alphabetically order) and creation date. Both should have ascending and descending order option. The idea is having a "order" parameter.
Example of order:
"name_asc" = order by name alphabetically order ascending
"name_desc" = order by name alphabetically order descending
This ^^ is just a suggestion, up for dicsussion
Please, commit your change using our [Commit message Style Guide](https://github.com/systers/mentorship-backend/wiki/Commit-Message-Style-Guide).
## Acceptance Criteria
### Update [Required]
- [ ] Add a query parameter support to GET /users, to order users by name and creation date (both ascending and descending order).
- [ ] Update Swagger UI documentation for this API.
- [ ] Write at least one test to prove your new feature is working.
## Definition of Done
- [ ] All of the required items are completed.
- [x] Approval by 1 mentor.
## Estimation
4 hours
贡献指南
评估
这个 Issue 还没有评估数据。