microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Analyzer for RequestInformation
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Let's pick on one example from https://github.com/microsoftgraph/dotnet-aad-query-sample/blob/main/GraphDataService/GraphDataService.cs
public IAsyncEnumerable<Group> GetGroups(string[] select, string filter, string[] orderBy, string search)
{
var requestInfo = _graphClient.Groups
.ToGetRequestInformation(rc =>
{
rc.Headers = EventualConsistencyHeader;
rc.QueryParameters.Count = true;
rc.QueryParameters.Select = select;
rc.QueryParameters.Filter = filter;
rc.QueryParameters.Orderby = orderBy;
rc.QueryParameters.Search = search;
});
LastUrl = WebUtility.UrlDecode(requestInfo.URI.AbsoluteUri);
return requestInfo.ToAsyncEnumerable<Group, GroupCollectionResponse>(_graphClient.RequestAdapter);
}
Here - obviously - the eventual consistency header is set. However, having a Roslyn analyzer/fix that would tell me if I actually forgot it in a call where it should have been added to RequestInformation would be great (eg the ASP.NET team does ship such best practices or deprecated patterns analyzers).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the RequestInformation usage shown in GraphDataService/GraphDataService.cs and investigate how the .NET SDK represents the eventual consistency header. Define which requests require the header and how a Roslyn analyzer and code fix would identify and address missing usage; done means those patterns are diagnosed reliably with an actionable fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100