Skip to content

Commit 35e0e54

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ed2597a8 of spec repo
1 parent 68095bc commit 35e0e54

File tree

6 files changed

+51
-12
lines changed

6 files changed

+51
-12
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-09-26 19:34:36.100160",
8-
"spec_repo_commit": "83debf9e"
7+
"regenerated": "2024-09-30 09:16:34.558744",
8+
"spec_repo_commit": "ed2597a8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-26 19:34:36.115212",
13-
"spec_repo_commit": "83debf9e"
12+
"regenerated": "2024-09-30 09:16:34.573491",
13+
"spec_repo_commit": "ed2597a8"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15767,6 +15767,9 @@ components:
1576715767
params:
1576815768
description: The parameters of the step.
1576915769
type: object
15770+
public_id:
15771+
description: The public ID of the step.
15772+
type: string
1577015773
timeout:
1577115774
description: The time before declaring a step failed.
1577215775
format: int64

api/datadogV1/model_synthetics_step.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ type SyntheticsStep struct {
2020
NoScreenshot *bool `json:"noScreenshot,omitempty"`
2121
// The parameters of the step.
2222
Params interface{} `json:"params,omitempty"`
23+
// The public ID of the step.
24+
PublicId *string `json:"public_id,omitempty"`
2325
// The time before declaring a step failed.
2426
Timeout *int64 `json:"timeout,omitempty"`
2527
// Step type used in your Synthetic test.
@@ -186,6 +188,34 @@ func (o *SyntheticsStep) SetParams(v interface{}) {
186188
o.Params = v
187189
}
188190

191+
// GetPublicId returns the PublicId field value if set, zero value otherwise.
192+
func (o *SyntheticsStep) GetPublicId() string {
193+
if o == nil || o.PublicId == nil {
194+
var ret string
195+
return ret
196+
}
197+
return *o.PublicId
198+
}
199+
200+
// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise
201+
// and a boolean to check if the value has been set.
202+
func (o *SyntheticsStep) GetPublicIdOk() (*string, bool) {
203+
if o == nil || o.PublicId == nil {
204+
return nil, false
205+
}
206+
return o.PublicId, true
207+
}
208+
209+
// HasPublicId returns a boolean if a field has been set.
210+
func (o *SyntheticsStep) HasPublicId() bool {
211+
return o != nil && o.PublicId != nil
212+
}
213+
214+
// SetPublicId gets a reference to the given string and assigns it to the PublicId field.
215+
func (o *SyntheticsStep) SetPublicId(v string) {
216+
o.PublicId = &v
217+
}
218+
189219
// GetTimeout returns the Timeout field value if set, zero value otherwise.
190220
func (o *SyntheticsStep) GetTimeout() int64 {
191221
if o == nil || o.Timeout == nil {
@@ -263,6 +293,9 @@ func (o SyntheticsStep) MarshalJSON() ([]byte, error) {
263293
if o.Params != nil {
264294
toSerialize["params"] = o.Params
265295
}
296+
if o.PublicId != nil {
297+
toSerialize["public_id"] = o.PublicId
298+
}
266299
if o.Timeout != nil {
267300
toSerialize["timeout"] = o.Timeout
268301
}
@@ -284,6 +317,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) {
284317
Name *string `json:"name,omitempty"`
285318
NoScreenshot *bool `json:"noScreenshot,omitempty"`
286319
Params interface{} `json:"params,omitempty"`
320+
PublicId *string `json:"public_id,omitempty"`
287321
Timeout *int64 `json:"timeout,omitempty"`
288322
Type *SyntheticsStepType `json:"type,omitempty"`
289323
}{}
@@ -292,7 +326,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) {
292326
}
293327
additionalProperties := make(map[string]interface{})
294328
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
295-
datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "isCritical", "name", "noScreenshot", "params", "timeout", "type"})
329+
datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "isCritical", "name", "noScreenshot", "params", "public_id", "timeout", "type"})
296330
} else {
297331
return err
298332
}
@@ -303,6 +337,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) {
303337
o.Name = all.Name
304338
o.NoScreenshot = all.NoScreenshot
305339
o.Params = all.Params
340+
o.PublicId = all.PublicId
306341
o.Timeout = all.Timeout
307342
if all.Type != nil && !all.Type.IsValid() {
308343
hasInvalidField = true
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-01-26T10:20:21.858Z
1+
2024-09-27T12:22:23.336Z

tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: |
4-
{"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-1706264421","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"}
4+
{"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-1727439743","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"}
55
form: {}
66
headers:
77
Accept:
@@ -12,9 +12,9 @@ interactions:
1212
method: POST
1313
url: https://api.datadoghq.com/api/v1/synthetics/tests/browser
1414
response:
15-
body: '{"public_id":"y2r-gnr-i3n","name":"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1706264421","status":"paused","type":"browser","tags":["testing:browser"],"created_at":"2024-01-26T10:20:22.506547+00:00","modified_at":"2024-01-26T10:20:22.506547+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
16-
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":138446062,"org_id":569509,"modified_by":{"name":"Frog","handle":"[email protected]","email":"[email protected]"},"steps":[{"name":"Refresh
17-
page","params":{},"type":"refresh","allowFailure":false,"isCritical":true}],"stepCount":{"assertions":0,"subtests":0,"total":1}}'
15+
body: '{"public_id":"ywn-wza-ix6","name":"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1727439743","status":"paused","type":"browser","tags":["testing:browser"],"created_at":"2024-09-27T12:22:23.994888+00:00","modified_at":"2024-09-27T12:22:23.994888+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
16+
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":154875260,"org_id":321813,"modified_by":{"name":null,"handle":"[email protected]","email":"[email protected]"},"steps":[{"name":"Refresh
17+
page","params":{},"type":"refresh","public_id":"u8r-np6-eyu","allowFailure":false,"isCritical":true}],"stepCount":{"assertions":0,"subtests":0,"total":1}}'
1818
code: 200
1919
duration: 0ms
2020
headers:
@@ -23,7 +23,7 @@ interactions:
2323
status: 200 OK
2424
- request:
2525
body: |
26-
{"public_ids":["y2r-gnr-i3n"]}
26+
{"public_ids":["ywn-wza-ix6"]}
2727
form: {}
2828
headers:
2929
Accept:
@@ -34,7 +34,7 @@ interactions:
3434
method: POST
3535
url: https://api.datadoghq.com/api/v1/synthetics/tests/delete
3636
response:
37-
body: '{"deleted_tests":[{"public_id":"y2r-gnr-i3n","deleted_at":"2024-01-26T10:20:23.057714+00:00"}]}
37+
body: '{"deleted_tests":[{"public_id":"ywn-wza-ix6","deleted_at":"2024-09-27T12:22:24.927700+00:00"}]}
3838
3939
'
4040
code: 200

tests/scenarios/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

0 commit comments

Comments
 (0)