diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c49474d..ad1b40c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Change `ServiceEndpoint` field to be optional: + - `description` + ## [0.30.0] ### Changes diff --git a/azure_devops_rust_api/examples/service_endpoint.rs b/azure_devops_rust_api/examples/service_endpoint.rs index 0427667e..190eec62 100644 --- a/azure_devops_rust_api/examples/service_endpoint.rs +++ b/azure_devops_rust_api/examples/service_endpoint.rs @@ -32,8 +32,10 @@ async fn main() -> Result<()> { // Display the returned service endpoints for endpoint in service_endpoints.iter() { println!( - "{:38} {:40} {}", - endpoint.id, endpoint.name, endpoint.description + "{:38} {:40} {:?}", + endpoint.id, + endpoint.name, + endpoint.description.as_deref().unwrap_or("") ); } diff --git a/azure_devops_rust_api/src/service_endpoint/models.rs b/azure_devops_rust_api/src/service_endpoint/models.rs index 02ea6e50..78877644 100644 --- a/azure_devops_rust_api/src/service_endpoint/models.rs +++ b/azure_devops_rust_api/src/service_endpoint/models.rs @@ -1312,7 +1312,8 @@ pub struct ServiceEndpoint { pub created_by: IdentityRef, pub data: serde_json::Value, #[doc = "Gets or sets the description of endpoint."] - pub description: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, #[doc = "This is a deprecated field."] #[serde( rename = "groupScopeId", @@ -1364,7 +1365,6 @@ impl ServiceEndpoint { authorization: EndpointAuthorization, created_by: IdentityRef, data: serde_json::Value, - description: String, id: String, is_ready: bool, is_shared: bool, @@ -1378,7 +1378,7 @@ impl ServiceEndpoint { authorization, created_by, data, - description, + description: None, group_scope_id: None, id, is_ready, diff --git a/vsts-api-patcher/src/patcher.rs b/vsts-api-patcher/src/patcher.rs index d10c2a31..05d725ad 100644 --- a/vsts-api-patcher/src/patcher.rs +++ b/vsts-api-patcher/src/patcher.rs @@ -1042,11 +1042,11 @@ impl Patcher { // Excluded // administratorsGroup // operationStatus + // description r#"[ "authorization", "createdBy", "data", - "description", "id", "isReady", "isShared",