developmentseed / developmentseed/osm-teams

Inconsistent response format between `member` and `moderator` endpoints

Open
#440 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
29
Forks
4
PR merge metrics
No merged PRs in 30d

Description

The `member` endpoint is paginated while the `moderator` endpoint is not paginated. This seems fine, however, the response format is slightly different, which is a bit confusing:

Example: `https://mapping.team/api/teams/110/moderators` returns
```json
[
{
"id": 151,
"team_id": 110,
"osm_id": 1770239
},
...
]
```

While `https://mapping.team/api/teams/110/members` returns:
```json
{
"teamId": 110,
"members": {
"data": [
{
"id": 14962448,
"name": "Abdul-Nayar Rabiatu Sungumu"
},
{
"id": 4814747,
"name": "Abdul OSM"
},
...
],
"pagination": {
"total": 39,
"lastPage": 4,
"perPage": 10,
"currentPage": 1,
"from": 0,
"to": 10
}
}
}
```

The primary inconsistency here is the difference between `id` and `osm_id` between the moderators and members.

Not a bug, just something worth documenting carefully.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing API documentation or endpoint reference for the team member and moderator routes. Compare the documented response shapes with /api/teams/{team}/members and /api/teams/{team}/moderators, then document their pagination behavior and the distinction between id and osm_id.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.