Skip to content

Commit

Permalink
Add synthetics browser step public_id field (#2500)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Dec 26, 2024
1 parent 183e0dd commit ab9e590
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
3 changes: 3 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -331,6 +357,7 @@ public int hashCode() {
name,
noScreenshot,
params,
publicId,
timeout,
type,
additionalProperties);
Expand All @@ -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: ")
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-12-09T11:17:43.729Z
2024-12-23T09:47:16.115Z
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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\":\"[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}}",
"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\":\"[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}}",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -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",
Expand All @@ -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"
Expand All @@ -57,6 +57,6 @@
"timeToLive": {
"unlimited": true
},
"id": "d7ff174d-7e09-6537-7dd6-e8bdf360f422"
"id": "07f3b17b-251a-4a6e-d381-93d876d04fdd"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab9e590

Please sign in to comment.