Documentation: API path parameter naming #4693
Labels
issue/confirmed
Issue has been reviewed and confirmed to be present or accepted to be implemented
modifies/api
This PR adds API routes or modifies them
type/docs
This PR mainly updates/creates documentation
Description
All the path parameters in swagger (POST & GET are counted as one occurence)
45 {repo}
44 {owner}
22 {id}
20 {username}
12 {org}
8 {index}
2 {filepath}
1 {user}
1 {token}
1 {sha}
1 {ref}
1 {follower}
1 {followee}
1 {collaborator}
1 {branch}
1 {attachment_id}
1 {archive}
(
jq -r '.paths | keys' swagger.v1.json | grep -o '\{[^\}]*\}' | sort | uniq -c | sort -rn
)As you can see there are 22 id and 8 index path parameter occurences in the swagger file. Most other parameters are distinctive and understandable form the first look. I'd recommend to rename these parameters to something easily understandable.
Just one example:
rename the parameter:
{id} -> {milestone_id}
(seeattachment_id
)changing the description:
"id of the milestone" -> "id as obtainable from /repos/{owner}/{repo}/milestones"
The text was updated successfully, but these errors were encountered: