diff --git a/.apigentools-info b/.apigentools-info index 2d95aaae2f4..03f30972c59 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:23.728211", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-23 16:35:38.637190", + "spec_repo_commit": "19946d35" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:23.743147", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-23 16:35:38.652127", + "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/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java index c17793c9870..51f69827e70 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java @@ -25,6 +25,7 @@ SyntheticsStep.JSON_PROPERTY_NAME, SyntheticsStep.JSON_PROPERTY_NO_SCREENSHOT, SyntheticsStep.JSON_PROPERTY_PARAMS, + SyntheticsStep.JSON_PROPERTY_PUBLIC_ID, SyntheticsStep.JSON_PROPERTY_TIMEOUT, SyntheticsStep.JSON_PROPERTY_TYPE }) @@ -53,6 +54,9 @@ public class SyntheticsStep { public static final String JSON_PROPERTY_PARAMS = "params"; private Object params; + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private String publicId; + public static final String JSON_PROPERTY_TIMEOUT = "timeout"; private Long timeout; @@ -207,6 +211,27 @@ public void setParams(Object params) { this.params = params; } + public SyntheticsStep publicId(String publicId) { + this.publicId = publicId; + return this; + } + + /** + * The public ID of the step. + * + * @return publicId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } + + public void setPublicId(String publicId) { + this.publicId = publicId; + } + public SyntheticsStep timeout(Long timeout) { this.timeout = timeout; return this; @@ -316,6 +341,7 @@ public boolean equals(Object o) { && Objects.equals(this.name, syntheticsStep.name) && Objects.equals(this.noScreenshot, syntheticsStep.noScreenshot) && Objects.equals(this.params, syntheticsStep.params) + && Objects.equals(this.publicId, syntheticsStep.publicId) && Objects.equals(this.timeout, syntheticsStep.timeout) && Objects.equals(this.type, syntheticsStep.type) && Objects.equals(this.additionalProperties, syntheticsStep.additionalProperties); @@ -331,6 +357,7 @@ public int hashCode() { name, noScreenshot, params, + publicId, timeout, type, additionalProperties); @@ -347,6 +374,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" noScreenshot: ").append(toIndentedString(noScreenshot)).append("\n"); sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/test/resources/cassettes/features/v1/Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response.freeze b/src/test/resources/cassettes/features/v1/Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response.freeze index f2906cd9b19..3c0fb9e9451 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response.freeze +++ b/src/test/resources/cassettes/features/v1/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/src/test/resources/cassettes/features/v1/Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response.json b/src/test/resources/cassettes/features/v1/Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response.json index 1af8747ab59..03c24643332 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response.json +++ b/src/test/resources/cassettes/features/v1/Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}" + "json": "{\"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\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "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}}", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "4e32bcae-d315-0017-0b92-64bdf9de2af4" + "id": "6c8aaa45-f828-f0ab-1b86-692420d7b4b4" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"public_ids\":[\"jj5-nke-dq2\"]}" + "json": "{\"public_ids\":[\"2pq-h6b-phj\"]}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"deleted_tests\":[{\"public_id\":\"jj5-nke-dq2\",\"deleted_at\":\"2024-12-09T11:17:45.340410+00:00\"}]}\n", + "body": "{\"deleted_tests\":[{\"public_id\":\"2pq-h6b-phj\",\"deleted_at\":\"2024-12-23T09:47:17.898440+00:00\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "d7ff174d-7e09-6537-7dd6-e8bdf360f422" + "id": "07f3b17b-251a-4a6e-d381-93d876d04fdd" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature b/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature index 3a6b14a2941..c6962b4dbab 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/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