From f5533e7cf06b9a87e65f5b5670fb445484d1b9bc Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 23 Dec 2024 09:55:55 +0000 Subject: [PATCH] Regenerate client from commit 19946d35 of spec repo --- .apigentools-info | 8 ++-- .generator/schemas/v1/openapi.yaml | 3 ++ api/datadogV1/model_synthetics_step.go | 37 ++++++++++++++++++- ...Returns_saved_rumSettings._response.freeze | 2 +- ...-_Returns_saved_rumSettings._response.yaml | 12 +++--- .../scenarios/features/v1/synthetics.feature | 1 + 6 files changed, 51 insertions(+), 12 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 0ac30ddc4c4..34870ac491b 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:27.191303", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-23 09:54:40.271544", + "spec_repo_commit": "19946d35" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:27.207255", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-23 09:54:40.287059", + "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 dc238c59a76..1a448cf0f1f 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/api/datadogV1/model_synthetics_step.go b/api/datadogV1/model_synthetics_step.go index a0457e6754e..5407a907670 100644 --- a/api/datadogV1/model_synthetics_step.go +++ b/api/datadogV1/model_synthetics_step.go @@ -24,6 +24,8 @@ type SyntheticsStep struct { NoScreenshot *bool `json:"noScreenshot,omitempty"` // The parameters of the step. Params interface{} `json:"params,omitempty"` + // The public ID of the step. + PublicId *string `json:"public_id,omitempty"` // The time before declaring a step failed. Timeout *int64 `json:"timeout,omitempty"` // Step type used in your Synthetic test. @@ -246,6 +248,34 @@ func (o *SyntheticsStep) SetParams(v interface{}) { o.Params = v } +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *SyntheticsStep) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsStep) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *SyntheticsStep) HasPublicId() bool { + return o != nil && o.PublicId != nil +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *SyntheticsStep) SetPublicId(v string) { + o.PublicId = &v +} + // GetTimeout returns the Timeout field value if set, zero value otherwise. func (o *SyntheticsStep) GetTimeout() int64 { if o == nil || o.Timeout == nil { @@ -329,6 +359,9 @@ func (o SyntheticsStep) MarshalJSON() ([]byte, error) { if o.Params != nil { toSerialize["params"] = o.Params } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } if o.Timeout != nil { toSerialize["timeout"] = o.Timeout } @@ -352,6 +385,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) { Name *string `json:"name,omitempty"` NoScreenshot *bool `json:"noScreenshot,omitempty"` Params interface{} `json:"params,omitempty"` + PublicId *string `json:"public_id,omitempty"` Timeout *int64 `json:"timeout,omitempty"` Type *SyntheticsStepType `json:"type,omitempty"` }{} @@ -360,7 +394,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "alwaysExecute", "exitIfSucceed", "isCritical", "name", "noScreenshot", "params", "timeout", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "alwaysExecute", "exitIfSucceed", "isCritical", "name", "noScreenshot", "params", "public_id", "timeout", "type"}) } else { return err } @@ -373,6 +407,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) { o.Name = all.Name o.NoScreenshot = all.NoScreenshot o.Params = all.Params + o.PublicId = all.PublicId o.Timeout = all.Timeout if all.Type != nil && !all.Type.IsValid() { hasInvalidField = true diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.freeze index f2906cd9b19..3c0fb9e9451 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.freeze @@ -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/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.yaml index 7bd2b9b743f..3bcc972f0cb 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_saved_rumSettings._response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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"} + {"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"} form: {} headers: Accept: @@ -12,9 +12,9 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/browser response: - body: '{"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}}' + body: '{"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}}' code: 200 duration: 0ms headers: @@ -23,7 +23,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["jj5-nke-dq2"]} + {"public_ids":["2pq-h6b-phj"]} form: {} headers: Accept: @@ -34,7 +34,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"public_id":"jj5-nke-dq2","deleted_at":"2024-12-09T11:17:45.340410+00:00"}]} + body: '{"deleted_tests":[{"public_id":"2pq-h6b-phj","deleted_at":"2024-12-23T09:47:17.898440+00:00"}]} ' code: 200 diff --git a/tests/scenarios/features/v1/synthetics.feature b/tests/scenarios/features/v1/synthetics.feature index 3a6b14a2941..c6962b4dbab 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