3.7 KiB
Contributing to Kiota
Thanks for your interest in contributing to Kiota! We welcome contributions from everyone, regardless of skill level or experience. Here are some guidelines to help you get started:
Getting Started
To get started, you'll need to have the following tools installed:
Recommended tools
- Visual Studio Code
- Microsoft Graph PowerShell SDK, cloned into the same parent folder of this repository. This dependency is only required if you want to generate SDKs for Microsoft Graph.
- reportgenerator, if you want to be able to generate coverage reports from the pre-configured visual studio code test tasks.
Building the project
# On Linux/MacOS
sudo dotnet workload restore
# On Windows, run the following command in an elevated prompt
dotnet workload restore
# then
dotnet restore
dotnet build
Building the Kiota generator
You can build just the Kiota generator by running the following commands, which do not require elevated privileges:
dotnet restore ./src/kiota
dotnet build ./src/kiota
Running the tests
Test the Kiota command line
dotnet test ./tests/Kiota.Tests/
Test the Kiota builder
dotnet test ./tests/Kiota.Builder.Tests
Try out the generator
You can try out the generator including your local changes by running:
dotnet run -c Release --project src/kiota/kiota.csproj -- <arguments you would pass>
Contributing Code
- Fork the repository and clone it to your local machine.
- Create a new branch for your changes:
git checkout -b my-new-feature
- Make your changes and commit them:
git commit -am 'Add some feature'
- Include tests that cover your changes.
- Update the documentation to reflect your changes, where appropriate.
- Add an entry to the
CHANGELOG.md
file describing your changes if appropriate.
- Push your changes to your fork:
git push origin my-new-feature
- Create a pull request from your fork to the main repository.
gh pr create
(with the GitHub CLI)
Troubleshooting
Build errors
If you get build errors, particularly a message like this:
CSC : error CS9057: The analyzer assembly '<path>/KiotaGenerated.dll' references version '4.5.0.0' of the compiler, which is newer than the currently running version '4.4.0.0'.
try updating your .NET SDK to the latest version.
Reporting Bugs
If you find a bug in Kiota, please report it by opening a new issue in the issue tracker. Please include as much detail as possible, including steps to reproduce the bug and any relevant error messages.
License
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.