Azure / Azure/azure-rest-api-specs
[BUG]Get Commits Documentation incorrrect
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://learn.microsoft.com/en-us/rest/api/azure/devops/git/commits/get-commits?view=azure-devops-rest-7.1&tabs=HTTP#on-a-branch
### API Spec version
7.1
### Describe the bug
as per the spec: Parameters that use the searchCriteria prefix in their name can be specified without it as query parameters, e.g. searchCriteria.$top -> $top
--> this is incorrect
### Expected behavior
to match the documentation
### Actual behavior
```
$ curl -H "authorization: bearer $token" -H "content-type: application/json" -X GET "https://dev.azure.com/Clarios/SW_Euler/_apis/git/repositories/Euler/commits?api-version=7.1&$top=1000" | jq | head
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 376 100 376 0 0 775 0 --:--:-- --:--:-- --:--:-- 775
{
"$id": "1",
"innerException": null,
"message": "TF401019: The Git repository with name or identifier 1000 does not exist or you do not have permissions for the operation you are attempting.",
"typeName": "Microsoft.TeamFoundation.Git.Server.GitRepositoryNotFoundException, Microsoft.TeamFoundation.Git.Server",
"typeKey": "GitRepositoryNotFoundException",
"errorCode": 0,
"eventId": 3000
}
```
### Reproduction Steps
can be taken from actual behavior snippet
### Environment
_No response_
Contributor guide
Research direction
Start with the linked Azure DevOps Get Commits API specification and reproduce the request shown in the issue. Locate the source for the 7.1 Get Commits documentation, verify how the $top query parameter is interpreted, and update the documentation so its parameter syntax matches the actual API behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100