This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Auto-generates a Rust Azure DevOps API crate (azure_devops_rust_api) from the Azure DevOps OpenAPI spec (vsts-rest-api-specs, included as a git submodule). The pipeline is:
vsts-api-patcher— readsvsts-rest-api-specs/, patches known issues in the OpenAPI JSON, writesvsts-rest-api-specs.patched/autorust— readsvsts-rest-api-specs.patched/, generates Rust source intoazure_devops_rust_api/src/azure_devops_rust_api— the generated crate, compiled and published to crates.io
./build.sh# Run patcher only (from repo root)
cd vsts-api-patcher && cargo run --release && cd ..
# Run code generator only (from repo root)
cd autorust && cargo run --bin ado-autorust --release && cd ..
# Build generated crate
cd azure_devops_rust_api && cargo build --all-features && cd ..cargo clippy --all-features -- --deny warnings
cargo clippy --all-features --examples -- --deny warningscd azure_devops_rust_api
cargo check --all-features
cargo check --all-features --examples./publish.shDo NOT edit generated files directly — they are overwritten by ./build.sh:
azure_devops_rust_api/src/<module>/mod.rs— generated API operationsazure_devops_rust_api/src/<module>/models.rs— generated model types
Hand-written source (edit these directly):
azure_devops_rust_api/src/auth.rs—Credentialenum (PAT + OAuth)azure_devops_rust_api/src/date_time.rs— datetime serde helpersazure_devops_rust_api/src/telemetry.rs— telemetry pipeline policyazure_devops_rust_api/src/headers.rs— common header helpersazure_devops_rust_api/src/artifacts_download/— Universal Package download client (dedup protocol)
autorust/ado-autorust/src/main.rs— entry point; maps each OpenAPI spec file to an output moduleautorust/codegen/src/codegen_operations/— generates API operation code (clients, builders, responses)create_client_and_builder.rs— Pipeline/Transport/RetryOptions usagerequest_builder_send.rs— Pipeline::send() callsrequest_builder_into_future.rs— into_body()/into_model() callsresponse_code.rs— Response type definitions
autorust/codegen/src/codegen_models.rs— generates model structs/enumsautorust/autorust.toml— config for boxed/optional/invalid properties (fixes recursive type issues)
src/main.rs— walks spec files, calls patcher, writes patched JSONsrc/patcher.rs— all spec patches; patching logic keyed on spec filename
Each Azure DevOps API area is a separate feature-gated module (e.g. git, build, wit). All features are listed in azure_devops_rust_api/Cargo.toml. API version is 7.1.
See SKILL.md for the full process. Key files affected by breaking changes:
- Codegen:
autorust/codegen/src/codegen_operations/files (then re-run./build.sh) - Hand-written:
azure_devops_rust_api/src/auth.rs,telemetry.rs,date_time.rs
See SKILL.md for the full process. Files to update: azure_devops_rust_api/Cargo.toml (version), azure_devops_rust_api/README.md (version in example snippet), CHANGELOG.md.
git submodule update --remote vsts-rest-api-specs
git add .
git commit -m "Updated vsts-rest-api-specs to latest revision"
./build.sh
cargo clippy --all-features -- --deny warnings
cargo clippy --all-features --examples -- --deny warnings- Dependency updates:
Update azure_core, azure_identity to X.Y - Releases:
Release X.Y.0 - No conventional commit prefixes