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
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.4",
"regenerated": "2023-03-21 10:00:58.719437",
"spec_repo_commit": "45be3462"
"regenerated": "2023-03-24 15:23:34.274061",
"spec_repo_commit": "cdf4007e"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-03-21 10:00:58.735485",
"spec_repo_commit": "45be3462"
"regenerated": "2023-03-24 15:23:34.286471",
"spec_repo_commit": "cdf4007e"
}
}
}
6 changes: 6 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20334,6 +20334,12 @@ paths:
required: false
schema:
type: boolean
- description: Return creator information.
in: query
name: with_creator
required: false
schema:
type: boolean
responses:
'200':
content:
Expand Down
4 changes: 3 additions & 1 deletion examples/v1/downtimes/ListDowntimes.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DowntimesApi;
import com.datadog.api.client.v1.api.DowntimesApi.ListDowntimesOptionalParameters;
import com.datadog.api.client.v1.model.Downtime;
import java.util.List;

Expand All @@ -12,7 +13,8 @@ public static void main(String[] args) {
DowntimesApi apiInstance = new DowntimesApi(defaultClient);

try {
List<Downtime> result = apiInstance.listDowntimes();
List<Downtime> result =
apiInstance.listDowntimes(new ListDowntimesOptionalParameters().withCreator(true));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DowntimesApi#listDowntimes");
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/datadog/api/client/v1/api/DowntimesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ public CompletableFuture<ApiResponse<Downtime>> getDowntimeWithHttpInfoAsync(Lon
/** Manage optional parameters to listDowntimes. */
public static class ListDowntimesOptionalParameters {
private Boolean currentOnly;
private Boolean withCreator;

/**
* Set currentOnly.
Expand All @@ -592,6 +593,17 @@ public ListDowntimesOptionalParameters currentOnly(Boolean currentOnly) {
this.currentOnly = currentOnly;
return this;
}

/**
* Set withCreator.
*
* @param withCreator Return creator information. (optional)
* @return ListDowntimesOptionalParameters
*/
public ListDowntimesOptionalParameters withCreator(Boolean withCreator) {
this.withCreator = withCreator;
return this;
}
}

/**
Expand Down Expand Up @@ -671,13 +683,15 @@ public ApiResponse<List<Downtime>> listDowntimesWithHttpInfo(
ListDowntimesOptionalParameters parameters) throws ApiException {
Object localVarPostBody = null;
Boolean currentOnly = parameters.currentOnly;
Boolean withCreator = parameters.withCreator;
// create path and map variables
String localVarPath = "/api/v1/downtime";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "current_only", currentOnly));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "with_creator", withCreator));

Invocation.Builder builder =
apiClient.createBuilder(
Expand Down Expand Up @@ -711,13 +725,15 @@ public CompletableFuture<ApiResponse<List<Downtime>>> listDowntimesWithHttpInfoA
ListDowntimesOptionalParameters parameters) {
Object localVarPostBody = null;
Boolean currentOnly = parameters.currentOnly;
Boolean withCreator = parameters.withCreator;
// create path and map variables
String localVarPath = "/api/v1/downtime";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "current_only", currentOnly));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "with_creator", withCreator));

Invocation.Builder builder;
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-03-22T17:28:50.909Z

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ Feature: Downtimes
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/monitor-app
@team:DataDog/monitor-app
Scenario: Get all downtimes returns "OK" response
Given new "ListDowntimes" request
And request contains "with_creator" parameter with value true
When the request is sent
Then the response status is 200 OK

Expand Down