Skip to content
Sean Reeise edited this page Jun 16, 2024 · 15 revisions

Contributing

This project welcomes all who would like to contribute. There are multiple ways to get involved. For the most part the current contributors are also users of the crate, so most contributions are code related. But there are plenty of tasks that can be taken up for anyone wanting to contribute and help regardless.

New Contributors

There are currently several tickets for first time contributors. There are also a lot of different areas that can be improved that do not need expertise in the project.

You can also generate new APIs that have not yet been generated by using graph-codegen. See the wiki on Generating APIs if your interested.

In general this project is pretty easy to work on if your familiar with the basics of Http clients and different ways of calling APIs. The API client methods are generated using a combination of codgen and macros. You can learn more about the api client macros in the macro wiki guide

The graph-http crate is where the main impl of request/response features are including streams, downloading/uploading, etc.

Tests Running On Pull Requests:

When you first open a pull request the tests will probably fail due to non-maintainers not having access to the application secrets stored in GitHub when the action is run on the tests. GitHub blocks actions from accessing these for forks and the GitHub action is running on pull requests. Unfortunately this also means its difficult to verify your change without manual intervention. A maintainer will pull down your change and run the tests locally to verify. Note that when you are running these tests locally you are really only running 1/4 of the total tests. You need the Active Directory credentials to run the others. These cannot just be given out as you can probably imagine and this is also something Microsoft has provided as a service free of charge (developer sandbox) so we have to be respectful to Microsoft and careful with who gets access to this.

Following Common Practices

This project generally follows the same patterns/practices as other sdks for Microsoft Graph and Identity Platform and will continue to try to do so in the future within reason.

Crates Making Up The Project:

  • graph-http: Request/response execution and features including http client abstractions, streams, downloading/uploading, paging, etc.
  • graph-oauth: Microsoft Identity Platform client SDK. Includes auth flow builders for Authentication and Authorization.
  • src (main crate): Houses all api client methods generated and the client itself.
  • graph-codegen: Parsing OpenApi configs and the macro writing of api clients
  • graph-core: Houses code that is used by multiple or all of the individual crates in this repoository.

Contributing Continued

For some common things almost anyone can do and is greatly appreciated:

  • Contribute documentation and suggest ways to further enhance documentation.
  • Ask and answer discussions in the Discussions tab.
  • Contribute to the wiki. The wiki is the place where the technical aspects of the crate and its inner workings are documented.
  • Write Rust code examples using this crate.
  • Write detailed issues and provide knowledge on how to implement features or fix bugs.