Skip to content

Commit 82f7090

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix spelling error for bindings (#369)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 54baf20 commit 82f7090

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-11-07 21:30:03.834993",
8-
"spec_repo_commit": "66d9d069"
7+
"regenerated": "2024-11-07 22:36:08.858711",
8+
"spec_repo_commit": "8233abfb"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-11-07 21:30:03.853594",
13-
"spec_repo_commit": "66d9d069"
12+
"regenerated": "2024-11-07 22:36:08.877721",
13+
"spec_repo_commit": "8233abfb"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15897,7 +15897,8 @@ components:
1589715897
minimum: 300
1589815898
type: integer
1589915899
verbosity:
15900-
description: The level of verbosity for the mobile test.
15900+
description: The level of verbosity for the mobile test. This field can
15901+
not be set by a user.
1590115902
format: int32
1590215903
maximum: 5
1590315904
minimum: 0
@@ -17007,12 +17008,12 @@ components:
1700717008
SyntheticsTestRestrictionPolicyBinding:
1700817009
description: Objects describing the binding used for a mobile test.
1700917010
properties:
17010-
principals:
17011-
$ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingPrincipals'
17011+
principal:
17012+
$ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingPrincipal'
1701217013
relation:
1701317014
$ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingRelation'
1701417015
type: object
17015-
SyntheticsTestRestrictionPolicyBindingPrincipals:
17016+
SyntheticsTestRestrictionPolicyBindingPrincipal:
1701617017
description: List of principals for a mobile test binding.
1701717018
items:
1701817019
description: A principal for a mobile test binding.

src/datadogV1/model/model_synthetics_mobile_test_options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub struct SyntheticsMobileTestOptions {
6060
/// The frequency at which to run the Synthetic test (in seconds).
6161
#[serde(rename = "tick_every")]
6262
pub tick_every: i64,
63-
/// The level of verbosity for the mobile test.
63+
/// The level of verbosity for the mobile test. This field can not be set by a user.
6464
#[serde(rename = "verbosity")]
6565
pub verbosity: Option<i32>,
6666
#[serde(flatten)]

src/datadogV1/model/model_synthetics_test_restriction_policy_binding.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use std::fmt::{self, Formatter};
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct SyntheticsTestRestrictionPolicyBinding {
1414
/// List of principals for a mobile test binding.
15-
#[serde(rename = "principals")]
16-
pub principals: Option<Vec<String>>,
15+
#[serde(rename = "principal")]
16+
pub principal: Option<Vec<String>>,
1717
/// The type of relation for the binding.
1818
#[serde(rename = "relation")]
1919
pub relation: Option<crate::datadogV1::model::SyntheticsTestRestrictionPolicyBindingRelation>,
@@ -27,15 +27,15 @@ pub struct SyntheticsTestRestrictionPolicyBinding {
2727
impl SyntheticsTestRestrictionPolicyBinding {
2828
pub fn new() -> SyntheticsTestRestrictionPolicyBinding {
2929
SyntheticsTestRestrictionPolicyBinding {
30-
principals: None,
30+
principal: None,
3131
relation: None,
3232
additional_properties: std::collections::BTreeMap::new(),
3333
_unparsed: false,
3434
}
3535
}
3636

37-
pub fn principals(mut self, value: Vec<String>) -> Self {
38-
self.principals = Some(value);
37+
pub fn principal(mut self, value: Vec<String>) -> Self {
38+
self.principal = Some(value);
3939
self
4040
}
4141

@@ -79,7 +79,7 @@ impl<'de> Deserialize<'de> for SyntheticsTestRestrictionPolicyBinding {
7979
where
8080
M: MapAccess<'a>,
8181
{
82-
let mut principals: Option<Vec<String>> = None;
82+
let mut principal: Option<Vec<String>> = None;
8383
let mut relation: Option<
8484
crate::datadogV1::model::SyntheticsTestRestrictionPolicyBindingRelation,
8585
> = None;
@@ -91,11 +91,11 @@ impl<'de> Deserialize<'de> for SyntheticsTestRestrictionPolicyBinding {
9191

9292
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
9393
match k.as_str() {
94-
"principals" => {
94+
"principal" => {
9595
if v.is_null() {
9696
continue;
9797
}
98-
principals = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
98+
principal = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
9999
}
100100
"relation" => {
101101
if v.is_null() {
@@ -120,7 +120,7 @@ impl<'de> Deserialize<'de> for SyntheticsTestRestrictionPolicyBinding {
120120
}
121121

122122
let content = SyntheticsTestRestrictionPolicyBinding {
123-
principals,
123+
principal,
124124
relation,
125125
additional_properties,
126126
_unparsed,

tests/scenarios/features/v1/synthetics.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Feature: Synthetics
128128
@generated @skip @team:DataDog/synthetics-ct
129129
Scenario: Create a mobile test returns "- JSON format is wrong" response
130130
Given new "CreateSyntheticsMobileTest" request
131-
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
131+
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
132132
When the request is sent
133133
Then the response status is 400 - JSON format is wrong
134134

@@ -147,7 +147,7 @@ Feature: Synthetics
147147
@generated @skip @team:DataDog/synthetics-ct
148148
Scenario: Create a mobile test returns "Test quota is reached" response
149149
Given new "CreateSyntheticsMobileTest" request
150-
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
150+
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
151151
When the request is sent
152152
Then the response status is 402 Test quota is reached
153153

@@ -361,15 +361,15 @@ Feature: Synthetics
361361
Scenario: Edit a Mobile test returns "- JSON format is wrong" response
362362
Given new "UpdateMobileTest" request
363363
And request contains "public_id" parameter from "REPLACE.ME"
364-
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
364+
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
365365
When the request is sent
366366
Then the response status is 400 - JSON format is wrong
367367

368368
@generated @skip @team:DataDog/synthetics-ct
369369
Scenario: Edit a Mobile test returns "- Synthetic Monitoring is not activated for the user" response
370370
Given new "UpdateMobileTest" request
371371
And request contains "public_id" parameter from "REPLACE.ME"
372-
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
372+
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
373373
When the request is sent
374374
Then the response status is 404 - Synthetic Monitoring is not activated for the user
375375

0 commit comments

Comments
 (0)