Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 49 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16568,7 +16568,7 @@ components:
tests:
description: Array of Synthetic tests configuration.
items:
$ref: '#/components/schemas/SyntheticsTestDetails'
$ref: '#/components/schemas/SyntheticsTestDetailsWithoutSteps'
type: array
type: object
SyntheticsLocalVariableParsingOptionsType:
Expand Down Expand Up @@ -17599,7 +17599,7 @@ components:
status:
$ref: '#/components/schemas/SyntheticsTestPauseStatus'
steps:
description: For browser test, the steps of the test.
description: The steps of the test if they exist.
items:
$ref: '#/components/schemas/SyntheticsStep'
type: array
Expand Down Expand Up @@ -17651,6 +17651,52 @@ components:
- API
- BROWSER
- MOBILE
SyntheticsTestDetailsWithoutSteps:
description: Object containing details about your Synthetic test, without test
steps.
properties:
config:
$ref: '#/components/schemas/SyntheticsTestConfig'
creator:
$ref: '#/components/schemas/Creator'
locations:
description: Array of locations used to run the test.
example:
- aws:eu-west-3
items:
description: A location from which the test was run.
type: string
type: array
message:
description: Notification message associated with the test.
type: string
monitor_id:
description: The associated monitor ID.
format: int64
readOnly: true
type: integer
name:
description: Name of the test.
type: string
options:
$ref: '#/components/schemas/SyntheticsTestOptions'
public_id:
description: The test public ID.
readOnly: true
type: string
status:
$ref: '#/components/schemas/SyntheticsTestPauseStatus'
subtype:
$ref: '#/components/schemas/SyntheticsTestDetailsSubType'
tags:
description: Array of tags attached to the test.
items:
description: A tag attached to the test.
type: string
type: array
type:
$ref: '#/components/schemas/SyntheticsTestDetailsType'
type: object
SyntheticsTestExecutionRule:
description: Execution rule for a Synthetic test.
enum:
Expand Down Expand Up @@ -35243,7 +35289,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/SyntheticsTestDetails'
$ref: '#/components/schemas/SyntheticsTestDetailsWithoutSteps'
description: OK
'403':
content:
Expand Down
4 changes: 2 additions & 2 deletions examples/v1/synthetics/GetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsTestDetails;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsWithoutSteps;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

try {
SyntheticsTestDetails result = apiInstance.getTest("public_id");
SyntheticsTestDetailsWithoutSteps result = apiInstance.getTest("public_id");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SyntheticsApi#getTest");
Expand Down
6 changes: 3 additions & 3 deletions examples/v1/synthetics/ListTests_1938827783.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
import com.datadog.api.client.PaginationIterable;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.api.SyntheticsApi.ListTestsOptionalParameters;
import com.datadog.api.client.v1.model.SyntheticsTestDetails;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsWithoutSteps;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

try {
PaginationIterable<SyntheticsTestDetails> iterable =
PaginationIterable<SyntheticsTestDetailsWithoutSteps> iterable =
apiInstance.listTestsWithPagination(new ListTestsOptionalParameters().pageSize(2L));

for (SyntheticsTestDetails item : iterable) {
for (SyntheticsTestDetailsWithoutSteps item : iterable) {
System.out.println(item);
}
} catch (RuntimeException e) {
Expand Down
33 changes: 18 additions & 15 deletions src/main/java/com/datadog/api/client/v1/api/SyntheticsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.datadog.api.client.v1.model.SyntheticsPrivateLocation;
import com.datadog.api.client.v1.model.SyntheticsPrivateLocationCreationResponse;
import com.datadog.api.client.v1.model.SyntheticsTestDetails;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsWithoutSteps;
import com.datadog.api.client.v1.model.SyntheticsTestUptime;
import com.datadog.api.client.v1.model.SyntheticsTriggerBody;
import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse;
Expand Down Expand Up @@ -3168,10 +3169,10 @@ public ApiResponse<List<String>> getSyntheticsDefaultLocationsWithHttpInfo() thr
* <p>See {@link #getTestWithHttpInfo}.
*
* @param publicId The public ID of the test to get details from. (required)
* @return SyntheticsTestDetails
* @return SyntheticsTestDetailsWithoutSteps
* @throws ApiException if fails to make API call
*/
public SyntheticsTestDetails getTest(String publicId) throws ApiException {
public SyntheticsTestDetailsWithoutSteps getTest(String publicId) throws ApiException {
return getTestWithHttpInfo(publicId).getData();
}

Expand All @@ -3181,9 +3182,9 @@ public SyntheticsTestDetails getTest(String publicId) throws ApiException {
* <p>See {@link #getTestWithHttpInfoAsync}.
*
* @param publicId The public ID of the test to get details from. (required)
* @return CompletableFuture&lt;SyntheticsTestDetails&gt;
* @return CompletableFuture&lt;SyntheticsTestDetailsWithoutSteps&gt;
*/
public CompletableFuture<SyntheticsTestDetails> getTestAsync(String publicId) {
public CompletableFuture<SyntheticsTestDetailsWithoutSteps> getTestAsync(String publicId) {
return getTestWithHttpInfoAsync(publicId)
.thenApply(
response -> {
Expand All @@ -3195,7 +3196,7 @@ public CompletableFuture<SyntheticsTestDetails> getTestAsync(String publicId) {
* Get the detailed configuration associated with a Synthetic test.
*
* @param publicId The public ID of the test to get details from. (required)
* @return ApiResponse&lt;SyntheticsTestDetails&gt;
* @return ApiResponse&lt;SyntheticsTestDetailsWithoutSteps&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table border="1">
Expand All @@ -3207,7 +3208,7 @@ public CompletableFuture<SyntheticsTestDetails> getTestAsync(String publicId) {
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<SyntheticsTestDetails> getTestWithHttpInfo(String publicId)
public ApiResponse<SyntheticsTestDetailsWithoutSteps> getTestWithHttpInfo(String publicId)
throws ApiException {
Object localVarPostBody = null;

Expand Down Expand Up @@ -3239,7 +3240,7 @@ public ApiResponse<SyntheticsTestDetails> getTestWithHttpInfo(String publicId)
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<SyntheticsTestDetails>() {});
new GenericType<SyntheticsTestDetailsWithoutSteps>() {});
}

/**
Expand All @@ -3248,15 +3249,16 @@ public ApiResponse<SyntheticsTestDetails> getTestWithHttpInfo(String publicId)
* <p>See {@link #getTestWithHttpInfo}.
*
* @param publicId The public ID of the test to get details from. (required)
* @return CompletableFuture&lt;ApiResponse&lt;SyntheticsTestDetails&gt;&gt;
* @return CompletableFuture&lt;ApiResponse&lt;SyntheticsTestDetailsWithoutSteps&gt;&gt;
*/
public CompletableFuture<ApiResponse<SyntheticsTestDetails>> getTestWithHttpInfoAsync(
public CompletableFuture<ApiResponse<SyntheticsTestDetailsWithoutSteps>> getTestWithHttpInfoAsync(
String publicId) {
Object localVarPostBody = null;

// verify the required parameter 'publicId' is set
if (publicId == null) {
CompletableFuture<ApiResponse<SyntheticsTestDetails>> result = new CompletableFuture<>();
CompletableFuture<ApiResponse<SyntheticsTestDetailsWithoutSteps>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(400, "Missing the required parameter 'publicId' when calling getTest"));
return result;
Expand All @@ -3280,7 +3282,8 @@ public CompletableFuture<ApiResponse<SyntheticsTestDetails>> getTestWithHttpInfo
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<SyntheticsTestDetails>> result = new CompletableFuture<>();
CompletableFuture<ApiResponse<SyntheticsTestDetailsWithoutSteps>> result =
new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
Expand All @@ -3292,7 +3295,7 @@ public CompletableFuture<ApiResponse<SyntheticsTestDetails>> getTestWithHttpInfo
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<SyntheticsTestDetails>() {});
new GenericType<SyntheticsTestDetailsWithoutSteps>() {});
}

/**
Expand Down Expand Up @@ -3609,9 +3612,9 @@ public CompletableFuture<SyntheticsListTestsResponse> listTestsAsync(
*
* <p>See {@link #listTestsWithHttpInfo}.
*
* @return PaginationIterable&lt;SyntheticsTestDetails&gt;
* @return PaginationIterable&lt;SyntheticsTestDetailsWithoutSteps&gt;
*/
public PaginationIterable<SyntheticsTestDetails> listTestsWithPagination() {
public PaginationIterable<SyntheticsTestDetailsWithoutSteps> listTestsWithPagination() {
ListTestsOptionalParameters parameters = new ListTestsOptionalParameters();
return listTestsWithPagination(parameters);
}
Expand All @@ -3623,7 +3626,7 @@ public PaginationIterable<SyntheticsTestDetails> listTestsWithPagination() {
*
* @return SyntheticsListTestsResponse
*/
public PaginationIterable<SyntheticsTestDetails> listTestsWithPagination(
public PaginationIterable<SyntheticsTestDetailsWithoutSteps> listTestsWithPagination(
ListTestsOptionalParameters parameters) {
String resultsPath = "getTests";
String valueGetterPath = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
public class SyntheticsListTestsResponse {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_TESTS = "tests";
private List<SyntheticsTestDetails> tests = null;
private List<SyntheticsTestDetailsWithoutSteps> tests = null;

public SyntheticsListTestsResponse tests(List<SyntheticsTestDetails> tests) {
public SyntheticsListTestsResponse tests(List<SyntheticsTestDetailsWithoutSteps> tests) {
this.tests = tests;
for (SyntheticsTestDetails item : tests) {
for (SyntheticsTestDetailsWithoutSteps item : tests) {
this.unparsed |= item.unparsed;
}
return this;
}

public SyntheticsListTestsResponse addTestsItem(SyntheticsTestDetails testsItem) {
public SyntheticsListTestsResponse addTestsItem(SyntheticsTestDetailsWithoutSteps testsItem) {
if (this.tests == null) {
this.tests = new ArrayList<>();
}
Expand All @@ -52,11 +52,11 @@ public SyntheticsListTestsResponse addTestsItem(SyntheticsTestDetails testsItem)
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TESTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<SyntheticsTestDetails> getTests() {
public List<SyntheticsTestDetailsWithoutSteps> getTests() {
return tests;
}

public void setTests(List<SyntheticsTestDetails> tests) {
public void setTests(List<SyntheticsTestDetailsWithoutSteps> tests) {
this.tests = tests;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public SyntheticsTestDetails addStepsItem(SyntheticsStep stepsItem) {
}

/**
* For browser test, the steps of the test.
* The steps of the test if they exist.
*
* @return steps
*/
Expand Down
Loading
Loading