Skip to content
Merged
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
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.31.0]

- Change `AgentPoolQueue` field to be optional:
- `name`
- Change `ProjectReference` field to be optional:
- `name`
- Change `ServiceEndpointProjectReference` fields to be optional:
- `description`
- `name`

## [0.30.1]

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

- Initial release.

[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.1...HEAD
[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.31.0...HEAD
[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
[0.29.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.28.0...0.29.0
Expand Down
2 changes: 1 addition & 1 deletion 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.30.1"
version = "0.31.0"
edition = "2021"
authors = ["John Batty <johnbatty@microsoft.com>"]
description = "Rust API library for Azure DevOps"
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.30.1", features = ["git", "pipelines"] }
azure_devops_rust_api = { version = "0.31.0", features = ["git", "pipelines"] }
```

## Examples
Expand Down
7 changes: 4 additions & 3 deletions azure_devops_rust_api/src/build/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ pub struct AgentPoolQueue {
#[doc = "The ID of the queue."]
pub id: i32,
#[doc = "The name of the queue."]
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Represents a reference to an agent pool."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pool: Option<TaskAgentPoolReference>,
Expand All @@ -23,11 +24,11 @@ pub struct AgentPoolQueue {
pub url: Option<String>,
}
impl AgentPoolQueue {
pub fn new(id: i32, name: String) -> Self {
pub fn new(id: i32) -> Self {
Self {
links: None,
id,
name,
name: None,
pool: None,
url: None,
}
Expand Down
19 changes: 11 additions & 8 deletions azure_devops_rust_api/src/service_endpoint/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1218,11 +1218,12 @@ impl Parameter {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProjectReference {
pub id: String,
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl ProjectReference {
pub fn new(id: String, name: String) -> Self {
Self { id, name }
pub fn new(id: String) -> Self {
Self { id, name: None }
}
}
#[doc = "The class to represent a collection of REST reference links."]
Expand Down Expand Up @@ -1664,17 +1665,19 @@ impl ServiceEndpointOAuthConfigurationReference {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceEndpointProjectReference {
#[doc = "Gets or sets description of the service endpoint."]
pub description: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[doc = "Gets or sets name of the service endpoint."]
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "projectReference")]
pub project_reference: ProjectReference,
}
impl ServiceEndpointProjectReference {
pub fn new(description: String, name: String, project_reference: ProjectReference) -> Self {
pub fn new(project_reference: ProjectReference) -> Self {
Self {
description,
name,
description: None,
name: None,
project_reference,
}
}
Expand Down
16 changes: 9 additions & 7 deletions vsts-api-patcher/src/patcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,18 +1059,20 @@ impl Patcher {
(
"serviceEndpoint.json",
"ServiceEndpointProjectReference",
// Excluded:
// description
// name
r#"[
"description",
"name",
"projectReference"
]"#,
),
(
"serviceEndpoint.json",
"ProjectReference",
// Excluded:
// name
r#"[
"id",
"name"
"id"
]"#,
),
// (
Expand Down Expand Up @@ -1313,10 +1315,10 @@ impl Patcher {
// Excluded
// _links
// url
// pool"
// name
// pool
r#"[
"id",
"name"
"id"
]"#,
),
(
Expand Down