Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changes

## [0.32.0]

### Changes

- Update `azure_core` and `azure_identity` to 0.30.
- Changes to handle API changes in `azure_core`:
- Replace `azure_core::http::RawResponse` with `azure_core::http::BufResponse`
- Add extra parameter when creating new `azure_core::http::Pipeline`

## [0.31.0]

### Changes

- Change `AgentPoolQueue` field to be optional:
- `name`
- Change `ProjectReference` field to be optional:
Expand All @@ -19,6 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.30.1]

### Changes

- Change `ServiceEndpoint` field to be optional:
- `description`
- Change `AgentPoolQueue` field to be optional:
Expand Down Expand Up @@ -624,7 +639,8 @@ breaking changes over previous versions.

- Initial release.

[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.31.0...HEAD
[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.32.0...HEAD
[0.32.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.31.0...0.32.0
[0.31.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.1...0.31.0
[0.30.1]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.0...0.30.1
[0.30.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.29.0...0.30.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub fn create_client(modules: &[String], endpoint: Option<&str>) -> Result<Token
pub(crate) fn scopes(&self) -> Vec<&str> {
self.scopes.iter().map(String::as_str).collect()
}
pub(crate) async fn send(&self, request: &mut azure_core::http::Request) -> azure_core::Result<azure_core::http::RawResponse> {
pub(crate) async fn send(&self, request: &mut azure_core::http::Request) -> azure_core::Result<azure_core::http::BufResponse> {
let context = azure_core::http::Context::default();
self.pipeline.send(&context, request).await
}
Expand All @@ -155,6 +155,7 @@ pub fn create_client(modules: &[String], endpoint: Option<&str>) -> Result<Token
options,
Vec::new(),
Vec::new(),
None
);
Self {
endpoint,
Expand Down
2 changes: 1 addition & 1 deletion autorust/codegen/src/codegen_operations/response_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl ToTokens for ResponseCode {
};

let raw_response_fn = quote! {
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
};
Expand Down
8 changes: 4 additions & 4 deletions azure_devops_rust_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[package]
name = "azure_devops_rust_api"
version = "0.31.0"
version = "0.32.0"
edition = "2021"
authors = ["John Batty <[email protected]>"]
description = "Rust API library for Azure DevOps"
Expand All @@ -21,7 +21,7 @@ rust-version = "1.80.0"
doctest = false

[dependencies]
azure_core = { version = "0.27", default-features = true }
azure_core = { version = "0.28", default-features = true }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
bytes = "1"
Expand All @@ -39,15 +39,15 @@ once_cell = "1"
uuid = { version = "1", features = ["serde", "v4", "js"] }

[dev-dependencies]
azure_identity = "0.27"
azure_identity = "0.28"
tokio = { version = "1", features = ["full"] }
anyhow = "1"
tracing-subscriber = "0.3"

[features]
default = ["reqwest"]
reqwest = ["azure_core/reqwest"]
reqwest_rustls = ["azure_core/reqwest_rustls"]
#reqwest_rustls = ["azure_core/reqwest_rustls"]
no-default-tag = []
accounts = []
approvals_and_checks = []
Expand Down
2 changes: 1 addition & 1 deletion azure_devops_rust_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Example application `Cargo.toml` dependency spec showing how to specify desired
```toml
[dependencies]
...
azure_devops_rust_api = { version = "0.31.0", features = ["git", "pipelines"] }
azure_devops_rust_api = { version = "0.32.0", features = ["git", "pipelines"] }
```

## Examples
Expand Down
12 changes: 6 additions & 6 deletions azure_devops_rust_api/examples/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ use azure_core::http::{
Context, Request,
};
use azure_devops_rust_api::Credential;
use azure_identity::DefaultAzureCredential;
use azure_identity::AzureCliCredential;
use std::sync::Arc;

fn authenticate_with_default_credential() -> Result<Credential> {
println!("Authenticate using auto-refreshing DefaultAzureCredential");
let default_azure_credential = DefaultAzureCredential::new()?;
fn authenticate_with_cli_credential() -> Result<Credential> {
println!("Authenticate using Azure CLI credential");
let azure_cli_credential = AzureCliCredential::new(None)?;

Ok(Credential::from_token_credential(default_azure_credential))
Ok(Credential::from_token_credential(azure_cli_credential))
}

#[allow(dead_code)]
Expand All @@ -26,7 +26,7 @@ pub fn get_credential() -> Result<Credential> {
println!("Authenticate using PAT provided via $ADO_TOKEN");
Ok(Credential::from_pat(token))
}
_ => authenticate_with_default_credential(),
_ => authenticate_with_cli_credential(),
}
}

Expand Down
5 changes: 3 additions & 2 deletions azure_devops_rust_api/src/accounts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Client {
pub(crate) async fn send(
&self,
request: &mut azure_core::http::Request,
) -> azure_core::Result<azure_core::http::RawResponse> {
) -> azure_core::Result<azure_core::http::BufResponse> {
let context = azure_core::http::Context::default();
self.pipeline.send(&context, request).await
}
Expand All @@ -121,6 +121,7 @@ impl Client {
options,
Vec::new(),
Vec::new(),
None,
);
Self {
endpoint,
Expand Down Expand Up @@ -165,7 +166,7 @@ pub mod accounts {
pub async fn into_body(self) -> azure_core::Result<models::AccountList> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down
31 changes: 16 additions & 15 deletions azure_devops_rust_api/src/approvals_and_checks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Client {
pub(crate) async fn send(
&self,
request: &mut azure_core::http::Request,
) -> azure_core::Result<azure_core::http::RawResponse> {
) -> azure_core::Result<azure_core::http::BufResponse> {
let context = azure_core::http::Context::default();
self.pipeline.send(&context, request).await
}
Expand All @@ -121,6 +121,7 @@ impl Client {
options,
Vec::new(),
Vec::new(),
None,
);
Self {
endpoint,
Expand Down Expand Up @@ -230,7 +231,7 @@ pub mod pipeline_permissions {
) -> azure_core::Result<models::ResourcePipelinePermissionsList> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -338,7 +339,7 @@ pub mod pipeline_permissions {
) -> azure_core::Result<models::ResourcePipelinePermissions> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -448,7 +449,7 @@ pub mod pipeline_permissions {
) -> azure_core::Result<models::ResourcePipelinePermissions> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -685,7 +686,7 @@ pub mod check_configurations {
pub async fn into_body(self) -> azure_core::Result<models::CheckConfigurationList> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -818,7 +819,7 @@ pub mod check_configurations {
pub async fn into_body(self) -> azure_core::Result<models::CheckConfiguration> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -920,7 +921,7 @@ pub mod check_configurations {
pub async fn into_body(self) -> azure_core::Result<models::CheckConfiguration> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1032,7 +1033,7 @@ pub mod check_configurations {
pub async fn into_body(self) -> azure_core::Result<models::CheckConfiguration> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1131,7 +1132,7 @@ pub mod check_configurations {
#[derive(Debug)]
pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
impl Response {
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1239,7 +1240,7 @@ pub mod check_configurations {
pub async fn into_body(self) -> azure_core::Result<models::CheckConfigurationList> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1401,7 +1402,7 @@ pub mod check_evaluations {
pub async fn into_body(self) -> azure_core::Result<models::CheckSuite> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1513,7 +1514,7 @@ pub mod check_evaluations {
pub async fn into_body(self) -> azure_core::Result<models::CheckSuite> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1694,7 +1695,7 @@ pub mod approvals {
pub async fn into_body(self) -> azure_core::Result<models::ApprovalList> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1847,7 +1848,7 @@ pub mod approvals {
pub async fn into_body(self) -> azure_core::Result<models::ApprovalList> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down Expand Up @@ -1949,7 +1950,7 @@ pub mod approvals {
pub async fn into_body(self) -> azure_core::Result<models::Approval> {
self.0.into_body().await
}
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
self.0.into()
}
}
Expand Down
Loading