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
20 changes: 0 additions & 20 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85761,10 +85761,6 @@ paths:
operator: OR
permissions:
- teams_read
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
get:
description: Returns all team connections.
operationId: ListTeamConnections
Expand Down Expand Up @@ -85844,10 +85840,6 @@ paths:
operator: OR
permissions:
- teams_read
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: Create multiple team connections.
operationId: CreateTeamConnections
Expand Down Expand Up @@ -85884,10 +85876,6 @@ paths:
operator: OR
permissions:
- teams_read
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/team/sync:
get:
description: 'Get all team synchronization configurations.
Expand Down Expand Up @@ -85931,10 +85919,6 @@ paths:
operator: OR
permissions:
- teams_read
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: 'This endpoint attempts to link your existing Datadog teams with
GitHub teams by matching their names.
Expand Down Expand Up @@ -85996,10 +85980,6 @@ paths:
operator: AND
permissions:
- teams_manage
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/team/{super_team_id}/member_teams:
get:
deprecated: true
Expand Down
1 change: 0 additions & 1 deletion examples/v2/teams/DeleteTeamConnections.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteTeamConnections", true);
TeamsApi apiInstance = new TeamsApi(defaultClient);

TeamConnectionDeleteRequest body =
Expand Down
1 change: 0 additions & 1 deletion examples/v2/teams/GetTeamSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getTeamSync", true);
TeamsApi apiInstance = new TeamsApi(defaultClient);

try {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/teams/ListTeamConnections.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listTeamConnections", true);
TeamsApi apiInstance = new TeamsApi(defaultClient);

try {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/teams/ListTeamConnections_2418873869.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listTeamConnections", true);
TeamsApi apiInstance = new TeamsApi(defaultClient);

try {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/teams/SyncTeams.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.syncTeams", true);
TeamsApi apiInstance = new TeamsApi(defaultClient);

TeamSyncRequest body =
Expand Down
1 change: 0 additions & 1 deletion examples/v2/teams/SyncTeams_3215592344.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.syncTeams", true);
TeamsApi apiInstance = new TeamsApi(defaultClient);

TeamSyncRequest body =
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -834,13 +834,8 @@ public class ApiClient {
put("v2.createSCAResolveVulnerableSymbols", false);
put("v2.createSCAResult", false);
put("v2.addMemberTeam", false);
put("v2.createTeamConnections", false);
put("v2.deleteTeamConnections", false);
put("v2.getTeamSync", false);
put("v2.listMemberTeams", false);
put("v2.listTeamConnections", false);
put("v2.removeMemberTeam", false);
put("v2.syncTeams", false);
put("v2.createIncidentTeam", false);
put("v2.deleteIncidentTeam", false);
put("v2.getIncidentTeam", false);
Expand Down
85 changes: 0 additions & 85 deletions src/main/java/com/datadog/api/client/v2/api/TeamsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,6 @@ public CompletableFuture<TeamConnectionsResponse> createTeamConnectionsAsync(
*/
public ApiResponse<TeamConnectionsResponse> createTeamConnectionsWithHttpInfo(
TeamConnectionCreateRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "createTeamConnections";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -624,16 +617,6 @@ public ApiResponse<TeamConnectionsResponse> createTeamConnectionsWithHttpInfo(
*/
public CompletableFuture<ApiResponse<TeamConnectionsResponse>>
createTeamConnectionsWithHttpInfoAsync(TeamConnectionCreateRequest body) {
// Check if unstable operation is enabled
String operationId = "createTeamConnections";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<TeamConnectionsResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -1174,13 +1157,6 @@ public CompletableFuture<Void> deleteTeamConnectionsAsync(TeamConnectionDeleteRe
*/
public ApiResponse<Void> deleteTeamConnectionsWithHttpInfo(TeamConnectionDeleteRequest body)
throws ApiException {
// Check if unstable operation is enabled
String operationId = "deleteTeamConnections";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -1223,16 +1199,6 @@ public ApiResponse<Void> deleteTeamConnectionsWithHttpInfo(TeamConnectionDeleteR
*/
public CompletableFuture<ApiResponse<Void>> deleteTeamConnectionsWithHttpInfoAsync(
TeamConnectionDeleteRequest body) {
// Check if unstable operation is enabled
String operationId = "deleteTeamConnections";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -2637,13 +2603,6 @@ public CompletableFuture<TeamSyncResponse> getTeamSyncAsync(
*/
public ApiResponse<TeamSyncResponse> getTeamSyncWithHttpInfo(
TeamSyncAttributesSource filterSource) throws ApiException {
// Check if unstable operation is enabled
String operationId = "getTeamSync";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;

// verify the required parameter 'filterSource' is set
Expand Down Expand Up @@ -2689,16 +2648,6 @@ public ApiResponse<TeamSyncResponse> getTeamSyncWithHttpInfo(
*/
public CompletableFuture<ApiResponse<TeamSyncResponse>> getTeamSyncWithHttpInfoAsync(
TeamSyncAttributesSource filterSource) {
// Check if unstable operation is enabled
String operationId = "getTeamSync";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<TeamSyncResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;

// verify the required parameter 'filterSource' is set
Expand Down Expand Up @@ -3411,13 +3360,6 @@ public PaginationIterable<TeamConnection> listTeamConnectionsWithPagination(
*/
public ApiResponse<TeamConnectionsResponse> listTeamConnectionsWithHttpInfo(
ListTeamConnectionsOptionalParameters parameters) throws ApiException {
// Check if unstable operation is enabled
String operationId = "listTeamConnections";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;
Long pageSize = parameters.pageSize;
Long pageNumber = parameters.pageNumber;
Expand Down Expand Up @@ -3471,16 +3413,6 @@ public ApiResponse<TeamConnectionsResponse> listTeamConnectionsWithHttpInfo(
*/
public CompletableFuture<ApiResponse<TeamConnectionsResponse>>
listTeamConnectionsWithHttpInfoAsync(ListTeamConnectionsOptionalParameters parameters) {
// Check if unstable operation is enabled
String operationId = "listTeamConnections";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<TeamConnectionsResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;
Long pageSize = parameters.pageSize;
Long pageNumber = parameters.pageNumber;
Expand Down Expand Up @@ -4501,13 +4433,6 @@ public CompletableFuture<Void> syncTeamsAsync(TeamSyncRequest body) {
* </table>
*/
public ApiResponse<Void> syncTeamsWithHttpInfo(TeamSyncRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "syncTeams";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -4548,16 +4473,6 @@ public ApiResponse<Void> syncTeamsWithHttpInfo(TeamSyncRequest body) throws ApiE
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
public CompletableFuture<ApiResponse<Void>> syncTeamsWithHttpInfoAsync(TeamSyncRequest body) {
// Check if unstable operation is enabled
String operationId = "syncTeams";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down
28 changes: 9 additions & 19 deletions src/test/resources/com/datadog/api/client/v2/api/teams.feature
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ Feature: Teams

@generated @skip @team:DataDog/aaa-omg
Scenario: Create team connections returns "Conflict" response
Given operation "CreateTeamConnections" enabled
And new "CreateTeamConnections" request
Given new "CreateTeamConnections" request
And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]}
When the request is sent
Then the response status is 409 Conflict
Expand Down Expand Up @@ -155,16 +154,14 @@ Feature: Teams

@generated @skip @team:DataDog/aaa-omg
Scenario: Delete team connections returns "No Content" response
Given operation "DeleteTeamConnections" enabled
And new "DeleteTeamConnections" request
Given new "DeleteTeamConnections" request
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/aaa-omg
Scenario: Delete team connections returns "Not Found" response
Given operation "DeleteTeamConnections" enabled
And new "DeleteTeamConnections" request
Given new "DeleteTeamConnections" request
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
When the request is sent
Then the response status is 404 Not Found
Expand Down Expand Up @@ -357,16 +354,14 @@ Feature: Teams

@generated @skip @team:DataDog/aaa-omg
Scenario: Get team sync configurations returns "OK" response
Given operation "GetTeamSync" enabled
And new "GetTeamSync" request
Given new "GetTeamSync" request
And request contains "filter[source]" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/aaa-omg
Scenario: Get team sync configurations returns "Team sync configurations not found" response
Given operation "GetTeamSync" enabled
And new "GetTeamSync" request
Given new "GetTeamSync" request
And request contains "filter[source]" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Team sync configurations not found
Expand All @@ -389,30 +384,26 @@ Feature: Teams

@generated @skip @team:DataDog/aaa-omg
Scenario: Link Teams with GitHub Teams returns "OK" response
Given operation "SyncTeams" enabled
And new "SyncTeams" request
Given new "SyncTeams" request
And body with value {"data": {"attributes": {"source": "github", "type": "link"}, "type": "team_sync_bulk"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/aaa-omg
Scenario: List team connections returns "Bad Request" response
Given operation "ListTeamConnections" enabled
And new "ListTeamConnections" request
Given new "ListTeamConnections" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/aaa-omg
Scenario: List team connections returns "OK" response
Given operation "ListTeamConnections" enabled
And new "ListTeamConnections" request
Given new "ListTeamConnections" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/aaa-omg @with-pagination
Scenario: List team connections returns "OK" response with pagination
Given operation "ListTeamConnections" enabled
And new "ListTeamConnections" request
Given new "ListTeamConnections" request
When the request with pagination is sent
Then the response status is 200 OK

Expand Down Expand Up @@ -515,7 +506,6 @@ Feature: Teams
@replay-only @team:DataDog/aaa-omg
Scenario: Sync teams returns "OK" response
Given new "SyncTeams" request
And operation "SyncTeams" enabled
And body with value {"data": {"attributes": {"source": "github", "type": "link"}, "type": "team_sync_bulk"}}
When the request is sent
Then the response status is 200 OK
Expand Down
Loading