IntersectMBO / IntersectMBO/govtool

Refactor Backend APIs to follow REST standard

Open
#1,034 0 comments 0 reactions 0 assignees View on GitHub
⚙ Backend
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.