ctaggart / azure-devops-rust-api

Rust API crate for the Azure DevOps API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azure DevOps Rust API Generator

This is an unofficial Azure DevOps Rust API crate generator.

It is in early development and only a subset of function has been tested, so there will be issues and breaking changes.

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.

Status

Repo overview

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.

Usage of generated azure_devops_rust_api crate

For documentation on usage of the generated crate, see the azure_devops_rust_api:

Build

Publishing

The generated crate is manually published to the public Rust crate registry (crates.io) as azure_devops_rust_api.

Managing the version of the OpenAPI spec

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
# Build and test!
./build.sh

Once you are happy with the update, commit the changes:

git add .
git commit -m "Updated vsts-rest-api-specs to latest revision"

Notes

  • 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 generate vsts-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 licensed
    • autorust includes an openapi module, which is also MIT licensed
  • Generates crate for API version 7.1 (latest API version).

Contributing

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.

Trademarks

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.

About

Rust API crate for the Azure DevOps API

License:MIT License


Languages

Language:Rust 100.0%Language:Jinja 0.0%Language:Shell 0.0%