From cf89cf2ad3114bd52f14123b33c0efdd52f7eee9 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 23 Dec 2024 16:41:17 +0000 Subject: [PATCH] Regenerate client from commit 19946d35 of spec repo --- .apigentools-info | 8 ++++---- .generator/schemas/v1/openapi.yaml | 3 +++ src/datadogV1/model/model_synthetics_step.rs | 17 +++++++++++++++++ ...OK-Returns-saved-rumSettings-response.frozen | 2 +- ...s-OK-Returns-saved-rumSettings-response.json | 12 ++++++------ tests/scenarios/features/v1/synthetics.feature | 1 + 6 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 94393347e..abc44614b 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:20.419256", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-23 16:35:38.708989", + "spec_repo_commit": "19946d35" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:20.435562", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-23 16:35:38.724544", + "spec_repo_commit": "19946d35" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index dc238c59a..1a448cf0f 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -16274,6 +16274,9 @@ components: params: description: The parameters of the step. type: object + public_id: + description: The public ID of the step. + type: string timeout: description: The time before declaring a step failed. format: int64 diff --git a/src/datadogV1/model/model_synthetics_step.rs b/src/datadogV1/model/model_synthetics_step.rs index 31f267b6b..4e0526492 100644 --- a/src/datadogV1/model/model_synthetics_step.rs +++ b/src/datadogV1/model/model_synthetics_step.rs @@ -32,6 +32,9 @@ pub struct SyntheticsStep { /// The parameters of the step. #[serde(rename = "params")] pub params: Option>, + /// The public ID of the step. + #[serde(rename = "public_id")] + pub public_id: Option, /// The time before declaring a step failed. #[serde(rename = "timeout")] pub timeout: Option, @@ -55,6 +58,7 @@ impl SyntheticsStep { name: None, no_screenshot: None, params: None, + public_id: None, timeout: None, type_: None, additional_properties: std::collections::BTreeMap::new(), @@ -97,6 +101,11 @@ impl SyntheticsStep { self } + pub fn public_id(mut self, value: String) -> Self { + self.public_id = Some(value); + self + } + pub fn timeout(mut self, value: i64) -> Self { self.timeout = Some(value); self @@ -147,6 +156,7 @@ impl<'de> Deserialize<'de> for SyntheticsStep { let mut no_screenshot: Option = None; let mut params: Option> = None; + let mut public_id: Option = None; let mut timeout: Option = None; let mut type_: Option = None; let mut additional_properties: std::collections::BTreeMap< @@ -204,6 +214,12 @@ impl<'de> Deserialize<'de> for SyntheticsStep { } params = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } + "public_id" => { + if v.is_null() { + continue; + } + public_id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } "timeout" => { if v.is_null() { continue; @@ -242,6 +258,7 @@ impl<'de> Deserialize<'de> for SyntheticsStep { name, no_screenshot, params, + public_id, timeout, type_, additional_properties, diff --git a/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.frozen b/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.frozen index f2906cd9b..3c0fb9e94 100644 --- a/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.frozen +++ b/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.frozen @@ -1 +1 @@ -2024-12-09T11:17:43.729Z \ No newline at end of file +2024-12-23T09:47:16.115Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.json b/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.json index a58c2b189..497246b87 100644 --- a/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.json +++ b/tests/scenarios/cassettes/v1/synthetics/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"method\":\"GET\",\"url\":\"https://datadoghq.com\"},\"setCookie\":\"name:test\"},\"locations\":[\"aws:us-east-2\"],\"message\":\"Test message\",\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1733743063\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"steps\":[{\"allowFailure\":false,\"isCritical\":true,\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\"}],\"tags\":[\"testing:browser\"],\"type\":\"browser\"}", + "string": "{\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"method\":\"GET\",\"url\":\"https://datadoghq.com\"},\"setCookie\":\"name:test\"},\"locations\":[\"aws:us-east-2\"],\"message\":\"Test message\",\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1734947236\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"steps\":[{\"allowFailure\":false,\"isCritical\":true,\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\"}],\"tags\":[\"testing:browser\"],\"type\":\"browser\"}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"public_id\":\"jj5-nke-dq2\",\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1733743063\",\"status\":\"paused\",\"type\":\"browser\",\"tags\":[\"testing:browser\"],\"created_at\":\"2024-12-09T11:17:44.348239+00:00\",\"modified_at\":\"2024-12-09T11:17:44.348239+00:00\",\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"method\":\"GET\",\"url\":\"https://datadoghq.com\"},\"setCookie\":\"name:test\"},\"message\":\"Test message\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"locations\":[\"aws:us-east-2\"],\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":159881000,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"steps\":[{\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\",\"public_id\":\"yb6-rim-kwp\",\"allowFailure\":false,\"isCritical\":true}],\"stepCount\":{\"assertions\":0,\"subtests\":0,\"total\":1}}", + "string": "{\"public_id\":\"2pq-h6b-phj\",\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1734947236\",\"status\":\"paused\",\"type\":\"browser\",\"tags\":[\"testing:browser\"],\"created_at\":\"2024-12-23T09:47:16.924773+00:00\",\"modified_at\":\"2024-12-23T09:47:16.924773+00:00\",\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"method\":\"GET\",\"url\":\"https://datadoghq.com\"},\"setCookie\":\"name:test\"},\"message\":\"Test message\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"locations\":[\"aws:us-east-2\"],\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":161011666,\"org_id\":321813,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"steps\":[{\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\",\"public_id\":\"uwt-8ia-g4p\",\"allowFailure\":false,\"isCritical\":true}],\"stepCount\":{\"assertions\":0,\"subtests\":0,\"total\":1}}", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "OK" } }, - "recorded_at": "Mon, 09 Dec 2024 11:17:43 GMT" + "recorded_at": "Mon, 23 Dec 2024 09:47:16 GMT" }, { "request": { "body": { - "string": "{\"public_ids\":[\"jj5-nke-dq2\"]}", + "string": "{\"public_ids\":[\"2pq-h6b-phj\"]}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "response": { "body": { - "string": "{\"deleted_tests\":[{\"public_id\":\"jj5-nke-dq2\",\"deleted_at\":\"2024-12-09T11:17:45.340410+00:00\"}]}\n", + "string": "{\"deleted_tests\":[{\"public_id\":\"2pq-h6b-phj\",\"deleted_at\":\"2024-12-23T09:47:17.898440+00:00\"}]}\n", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Mon, 09 Dec 2024 11:17:43 GMT" + "recorded_at": "Mon, 23 Dec 2024 09:47:16 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/features/v1/synthetics.feature b/tests/scenarios/features/v1/synthetics.feature index 3a6b14a29..c6962b4db 100644 --- a/tests/scenarios/features/v1/synthetics.feature +++ b/tests/scenarios/features/v1/synthetics.feature @@ -65,6 +65,7 @@ Feature: Synthetics And the response "options.rumSettings.isEnabled" is equal to true And the response "options.rumSettings.applicationId" is equal to "mockApplicationId" And the response "options.rumSettings.clientTokenId" is equal to 12345 + And the response "steps[0]" has field "public_id" @team:DataDog/synthetics-ct Scenario: Create a browser test returns "OK - Returns the created test details." response