IntersectMBO / IntersectMBO/govtool
Refactor Backend APIs to follow REST standard
- Dominant language
- HTML
- Stars
- 21
- Forks
- 29
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 7
Description
### Why
The Swagger interface for API is available here:
https://govtool.cardanoapi.io/swagger-ui/
The api follow non-standard naming and the paths contain redundant words like 'list' 'get' etc.
E.g. This is how current DRep APIs look like
```
GET /drep/list -> List all DReps in the network
GET /drep/info/{drepId} -> Get detail about particular DRep
GET /drep/get-voting-power/{drepId} -> Get voting power of a DRep
GET /drep/getVotes/{drepId} -> Get votes casted by a DRep
```
### What
Refactor the api to follow proper naming conventions.
Guideline : https://restfulapi.net/resource-naming/
### How
More standard and consistent way to represent those resource should be used.
Example for DRep resources.
```
GET /dreps -> List all DReps in the network
GET /dreps/{drepId} -> Get detail about particular DRep
GET /dreps/{drepId}/voting-power -> Get voting power of a DRep
GET /dreps/{drepId}/votes -> Get votes casted by a DRep
```
Contributor guide
Assessment
This issue has not been assessed yet.