If you find any issues then please raise them via Github.
This repo auto-generates a Rust Azure DevOps API crate (azure_devops_rust_api
) from the Azure DevOps OpenAPI spec vsts-rest-api-specs
.
This repo contains:
- autorust: A tool to autogenerate the
azure_devops_rust_api
crate from the OpenAPI spec. - vsts-api-patcher: A tool to patch the OpenAPI spec. This modifies the original OpenAPI spec to fix known issues and/or improve the generated code.
- azure_devops_rust_api: The autogenerated crate.
For documentation on usage of the generated crate, see the azure_devops_rust_api
:
- Checkout this repo
- Run
./build.sh
- The API crate is generated into the
azure_devops_rust_api
directory.
The generated crate is manually published to the public Rust crate registry (crates.io) as azure_devops_rust_api
.
The Azure DevOps OpenAPI spec is included as a git submodule linked to a specific version
of vsts-rest-api-specs
.
You can view the current version (commit id) being used:
$ git submodule status
312bb8d4aabf70f096b3357ce382b5d91ce38574 vsts-rest-api-specs (heads/master)
To update the version to the latest revision:
git submodule update --remote vsts-rest-api-specs
git add .
git commit -m "Updated vsts-rest-api-specs to latest revision"
# Build and test!
./build.sh
cargo clippy --all-features -- --deny warnings
cargo clippy --all-features --examples -- --deny warnings
# Inspect the differences in the generated code
git diff
- The Azure DevOps OpenAPI spec
vsts-rest-api-specs
is pulled in at build time via a git submodule. - There are issues/bugs with the OpenAPI spec, so it is patched using
vsts-api-patcher
to generatevsts-rest-api-specs.patched
, which is used for the code generation. - The client code generation is done using a modified version of
autorust
, a component from azure-sdk-for-rust.autorust
is MIT licensedautorust
includes anopenapi
module, which is also MIT licensed
- Generates crate for API version 7.1 (latest API version).
- The azure-devops-python-api can be a useful reference when investigating API issues.
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 [email protected] with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.