Skip to content

Commit 441920d

Browse files
authored
Release 0.31.0. Make more name and description fields optional. (#673)
1 parent 02b3376 commit 441920d

File tree

6 files changed

+38
-21
lines changed

6 files changed

+38
-21
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.31.0]
11+
12+
- Change `AgentPoolQueue` field to be optional:
13+
- `name`
14+
- Change `ProjectReference` field to be optional:
15+
- `name`
16+
- Change `ServiceEndpointProjectReference` fields to be optional:
17+
- `description`
18+
- `name`
19+
1020
## [0.30.1]
1121

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

615625
- Initial release.
616626

617-
[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.1...HEAD
627+
[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.31.0...HEAD
628+
[0.31.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.1...0.31.0
618629
[0.30.1]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.0...0.30.1
619630
[0.30.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.29.0...0.30.0
620631
[0.29.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.28.0...0.29.0

azure_devops_rust_api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[package]
55
name = "azure_devops_rust_api"
6-
version = "0.30.1"
6+
version = "0.31.0"
77
edition = "2021"
88
authors = ["John Batty <[email protected]>"]
99
description = "Rust API library for Azure DevOps"

azure_devops_rust_api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Example application `Cargo.toml` dependency spec showing how to specify desired
6767
```toml
6868
[dependencies]
6969
...
70-
azure_devops_rust_api = { version = "0.30.1", features = ["git", "pipelines"] }
70+
azure_devops_rust_api = { version = "0.31.0", features = ["git", "pipelines"] }
7171
```
7272

7373
## Examples

azure_devops_rust_api/src/build/models.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ pub struct AgentPoolQueue {
1414
#[doc = "The ID of the queue."]
1515
pub id: i32,
1616
#[doc = "The name of the queue."]
17-
pub name: String,
17+
#[serde(default, skip_serializing_if = "Option::is_none")]
18+
pub name: Option<String>,
1819
#[doc = "Represents a reference to an agent pool."]
1920
#[serde(default, skip_serializing_if = "Option::is_none")]
2021
pub pool: Option<TaskAgentPoolReference>,
@@ -23,11 +24,11 @@ pub struct AgentPoolQueue {
2324
pub url: Option<String>,
2425
}
2526
impl AgentPoolQueue {
26-
pub fn new(id: i32, name: String) -> Self {
27+
pub fn new(id: i32) -> Self {
2728
Self {
2829
links: None,
2930
id,
30-
name,
31+
name: None,
3132
pool: None,
3233
url: None,
3334
}

azure_devops_rust_api/src/service_endpoint/models.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,11 +1218,12 @@ impl Parameter {
12181218
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12191219
pub struct ProjectReference {
12201220
pub id: String,
1221-
pub name: String,
1221+
#[serde(default, skip_serializing_if = "Option::is_none")]
1222+
pub name: Option<String>,
12221223
}
12231224
impl ProjectReference {
1224-
pub fn new(id: String, name: String) -> Self {
1225-
Self { id, name }
1225+
pub fn new(id: String) -> Self {
1226+
Self { id, name: None }
12261227
}
12271228
}
12281229
#[doc = "The class to represent a collection of REST reference links."]
@@ -1664,17 +1665,19 @@ impl ServiceEndpointOAuthConfigurationReference {
16641665
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16651666
pub struct ServiceEndpointProjectReference {
16661667
#[doc = "Gets or sets description of the service endpoint."]
1667-
pub description: String,
1668+
#[serde(default, skip_serializing_if = "Option::is_none")]
1669+
pub description: Option<String>,
16681670
#[doc = "Gets or sets name of the service endpoint."]
1669-
pub name: String,
1671+
#[serde(default, skip_serializing_if = "Option::is_none")]
1672+
pub name: Option<String>,
16701673
#[serde(rename = "projectReference")]
16711674
pub project_reference: ProjectReference,
16721675
}
16731676
impl ServiceEndpointProjectReference {
1674-
pub fn new(description: String, name: String, project_reference: ProjectReference) -> Self {
1677+
pub fn new(project_reference: ProjectReference) -> Self {
16751678
Self {
1676-
description,
1677-
name,
1679+
description: None,
1680+
name: None,
16781681
project_reference,
16791682
}
16801683
}

vsts-api-patcher/src/patcher.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,18 +1059,20 @@ impl Patcher {
10591059
(
10601060
"serviceEndpoint.json",
10611061
"ServiceEndpointProjectReference",
1062+
// Excluded:
1063+
// description
1064+
// name
10621065
r#"[
1063-
"description",
1064-
"name",
10651066
"projectReference"
10661067
]"#,
10671068
),
10681069
(
10691070
"serviceEndpoint.json",
10701071
"ProjectReference",
1072+
// Excluded:
1073+
// name
10711074
r#"[
1072-
"id",
1073-
"name"
1075+
"id"
10741076
]"#,
10751077
),
10761078
// (
@@ -1313,10 +1315,10 @@ impl Patcher {
13131315
// Excluded
13141316
// _links
13151317
// url
1316-
// pool"
1318+
// name
1319+
// pool
13171320
r#"[
1318-
"id",
1319-
"name"
1321+
"id"
13201322
]"#,
13211323
),
13221324
(

0 commit comments

Comments
 (0)