Skip to content

Commit 8af1e6f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add captureNetworkPayloads for Synthetics Browser tests (#1761)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 436b6f2 commit 8af1e6f

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19795,6 +19795,9 @@ components:
1979519795
description: A URL pattern to block during the Synthetic test.
1979619796
type: string
1979719797
type: array
19798+
captureNetworkPayloads:
19799+
description: Capture HTTP request/response headers and bodies for Fetch/XHR calls made during browser tests.
19800+
type: boolean
1979819801
checkCertificateRevocation:
1979919802
description: |-
1980019803
For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.

src/datadogV1/model/model_synthetics_test_options.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ pub struct SyntheticsTestOptions {
2121
/// Array of URL patterns to block.
2222
#[serde(rename = "blockedRequestPatterns")]
2323
pub blocked_request_patterns: Option<Vec<String>>,
24+
/// Capture HTTP request/response headers and bodies for Fetch/XHR calls made during browser tests.
25+
#[serde(rename = "captureNetworkPayloads")]
26+
pub capture_network_payloads: Option<bool>,
2427
/// For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.
2528
#[serde(rename = "checkCertificateRevocation")]
2629
pub check_certificate_revocation: Option<bool>,
@@ -118,6 +121,7 @@ impl SyntheticsTestOptions {
118121
accept_self_signed: None,
119122
allow_insecure: None,
120123
blocked_request_patterns: None,
124+
capture_network_payloads: None,
121125
check_certificate_revocation: None,
122126
ci: None,
123127
device_ids: None,
@@ -164,6 +168,12 @@ impl SyntheticsTestOptions {
164168
self
165169
}
166170

171+
#[allow(deprecated)]
172+
pub fn capture_network_payloads(mut self, value: bool) -> Self {
173+
self.capture_network_payloads = Some(value);
174+
self
175+
}
176+
167177
#[allow(deprecated)]
168178
pub fn check_certificate_revocation(mut self, value: bool) -> Self {
169179
self.check_certificate_revocation = Some(value);
@@ -349,6 +359,7 @@ impl<'de> Deserialize<'de> for SyntheticsTestOptions {
349359
let mut accept_self_signed: Option<bool> = None;
350360
let mut allow_insecure: Option<bool> = None;
351361
let mut blocked_request_patterns: Option<Vec<String>> = None;
362+
let mut capture_network_payloads: Option<bool> = None;
352363
let mut check_certificate_revocation: Option<bool> = None;
353364
let mut ci: Option<crate::datadogV1::model::SyntheticsTestCiOptions> = None;
354365
let mut device_ids: Option<Vec<String>> = None;
@@ -409,6 +420,13 @@ impl<'de> Deserialize<'de> for SyntheticsTestOptions {
409420
blocked_request_patterns =
410421
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
411422
}
423+
"captureNetworkPayloads" => {
424+
if v.is_null() {
425+
continue;
426+
}
427+
capture_network_payloads =
428+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
429+
}
412430
"checkCertificateRevocation" => {
413431
if v.is_null() {
414432
continue;
@@ -586,6 +604,7 @@ impl<'de> Deserialize<'de> for SyntheticsTestOptions {
586604
accept_self_signed,
587605
allow_insecure,
588606
blocked_request_patterns,
607+
capture_network_payloads,
589608
check_certificate_revocation,
590609
ci,
591610
device_ids,

0 commit comments

Comments
 (0)