Skip to content

Commit cd73f2a

Browse files
api-clients-generation-pipeline[bot]nkzouci.datadog-api-spec
authored
Add synthetics browser step public_id field (#1837)
* convert field name to ts client attribute name * Regenerate client from commit 19946d35 of spec repo --------- Co-authored-by: Kevin Zou <[email protected]> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e17558a commit cd73f2a

File tree

7 files changed

+31
-19
lines changed

7 files changed

+31
-19
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-12-19 07:26:26.500720",
8-
"spec_repo_commit": "5dd2cbe4"
7+
"regenerated": "2024-12-23 16:35:39.161263",
8+
"spec_repo_commit": "19946d35"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-19 07:26:26.515806",
13-
"spec_repo_commit": "5dd2cbe4"
12+
"regenerated": "2024-12-23 16:35:39.176070",
13+
"spec_repo_commit": "19946d35"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16274,6 +16274,9 @@ components:
1627416274
params:
1627516275
description: The parameters of the step.
1627616276
type: object
16277+
public_id:
16278+
description: The public ID of the step.
16279+
type: string
1627716280
timeout:
1627816281
description: The time before declaring a step failed.
1627916282
format: int64
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-12-09T11:17:43.729Z"
1+
"2024-12-23T09:47:16.115Z"

cassettes/v1/Synthetics_2658572017/Create-a-browser-test-returns-OK-Returns-saved-rumSettings-response_515614798/recording.har

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "4e32bcaed31500170b9264bdf9de2af4",
11+
"_id": "6c8aaa45f828f0ab1b86692420d7b4b4",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,17 +32,17 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"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\"}"
35+
"text": "{\"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\"}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/browser"
3939
},
4040
"response": {
41-
"bodySize": 1462,
41+
"bodySize": 1466,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 1462,
45-
"text": "{\"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\":\"[email protected]\",\"email\":\"[email protected]\"},\"deleted_at\":null,\"monitor_id\":159881000,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"steps\":[{\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\",\"public_id\":\"yb6-rim-kwp\",\"allowFailure\":false,\"isCritical\":true}],\"stepCount\":{\"assertions\":0,\"subtests\":0,\"total\":1}}"
44+
"size": 1466,
45+
"text": "{\"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\":\"[email protected]\",\"email\":\"[email protected]\"},\"deleted_at\":null,\"monitor_id\":161011666,\"org_id\":321813,\"modified_by\":{\"name\":\"frog\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"steps\":[{\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\",\"public_id\":\"uwt-8ia-g4p\",\"allowFailure\":false,\"isCritical\":true}],\"stepCount\":{\"assertions\":0,\"subtests\":0,\"total\":1}}"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,11 +57,11 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2024-12-09T11:17:43.734Z",
61-
"time": 790
60+
"startedDateTime": "2024-12-23T09:47:16.124Z",
61+
"time": 1035
6262
},
6363
{
64-
"_id": "d7ff174d7e0965377dd6e8bdf360f422",
64+
"_id": "07f3b17b251a4a6ed38193d876d04fdd",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -85,7 +85,7 @@
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"public_ids\":[\"jj5-nke-dq2\"]}"
88+
"text": "{\"public_ids\":[\"2pq-h6b-phj\"]}"
8989
},
9090
"queryString": [],
9191
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/delete"
@@ -95,7 +95,7 @@
9595
"content": {
9696
"mimeType": "application/json",
9797
"size": 96,
98-
"text": "{\"deleted_tests\":[{\"public_id\":\"jj5-nke-dq2\",\"deleted_at\":\"2024-12-09T11:17:45.340410+00:00\"}]}\n"
98+
"text": "{\"deleted_tests\":[{\"public_id\":\"2pq-h6b-phj\",\"deleted_at\":\"2024-12-23T09:47:17.898440+00:00\"}]}\n"
9999
},
100100
"cookies": [],
101101
"headers": [
@@ -110,8 +110,8 @@
110110
"status": 200,
111111
"statusText": "OK"
112112
},
113-
"startedDateTime": "2024-12-09T11:17:44.534Z",
114-
"time": 1004
113+
"startedDateTime": "2024-12-23T09:47:17.172Z",
114+
"time": 983
115115
}
116116
],
117117
"pages": [],

features/step_definitions/request_steps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,14 @@ Then(
293293
Then(
294294
"the response {string} has field {string}",
295295
function (this: World, responsePath: string, field: string) {
296-
expect(pathLookup(this.response, responsePath)).to.have.property(field);
296+
expect(pathLookup(this.response, responsePath)).to.have.property(field.toAttributeName());
297297
}
298298
);
299299

300300
Then(
301301
"the response {string} does not have field {string}",
302302
function (this: World, responsePath: string, field: string) {
303-
expect(pathLookup(this.response, responsePath)).to.not.have.property(field);
303+
expect(pathLookup(this.response, responsePath)).to.not.have.property(field.toAttributeName());
304304
}
305305
);
306306

features/v1/synthetics.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Feature: Synthetics
6565
And the response "options.rumSettings.isEnabled" is equal to true
6666
And the response "options.rumSettings.applicationId" is equal to "mockApplicationId"
6767
And the response "options.rumSettings.clientTokenId" is equal to 12345
68+
And the response "steps[0]" has field "public_id"
6869

6970
@team:DataDog/synthetics-ct
7071
Scenario: Create a browser test returns "OK - Returns the created test details." response

packages/datadog-api-client-v1/models/SyntheticsStep.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export class SyntheticsStep {
3939
* The parameters of the step.
4040
*/
4141
"params"?: any;
42+
/**
43+
* The public ID of the step.
44+
*/
45+
"publicId"?: string;
4246
/**
4347
* The time before declaring a step failed.
4448
*/
@@ -92,6 +96,10 @@ export class SyntheticsStep {
9296
baseName: "params",
9397
type: "any",
9498
},
99+
publicId: {
100+
baseName: "public_id",
101+
type: "string",
102+
},
95103
timeout: {
96104
baseName: "timeout",
97105
type: "number",

0 commit comments

Comments
 (0)