Skip to content

Commit 39f09d7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove preview/unstable tags from GitHub team sync and connections endpoints (#1088)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 30ad73e commit 39f09d7

File tree

10 files changed

+15
-96
lines changed

10 files changed

+15
-96
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85860,10 +85860,6 @@ paths:
8586085860
operator: OR
8586185861
permissions:
8586285862
- teams_read
85863-
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
85864-
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).
85865-
85866-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8586785863
get:
8586885864
description: Returns all team connections.
8586985865
operationId: ListTeamConnections
@@ -85943,10 +85939,6 @@ paths:
8594385939
operator: OR
8594485940
permissions:
8594585941
- teams_read
85946-
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
85947-
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).
85948-
85949-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8595085942
post:
8595185943
description: Create multiple team connections.
8595285944
operationId: CreateTeamConnections
@@ -85983,10 +85975,6 @@ paths:
8598385975
operator: OR
8598485976
permissions:
8598585977
- teams_read
85986-
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
85987-
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).
85988-
85989-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8599085978
/api/v2/team/sync:
8599185979
get:
8599285980
description: 'Get all team synchronization configurations.
@@ -86030,10 +86018,6 @@ paths:
8603086018
operator: OR
8603186019
permissions:
8603286020
- teams_read
86033-
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
86034-
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).
86035-
86036-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8603786021
post:
8603886022
description: 'This endpoint attempts to link your existing Datadog teams with
8603986023
GitHub teams by matching their names.
@@ -86095,10 +86079,6 @@ paths:
8609586079
operator: AND
8609686080
permissions:
8609786081
- teams_manage
86098-
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
86099-
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).
86100-
86101-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8610286082
/api/v2/team/{super_team_id}/member_teams:
8610386083
get:
8610486084
deprecated: true

examples/v2_teams_DeleteTeamConnections.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ async fn main() {
1111
"12345678-1234-5678-9abc-123456789012".to_string(),
1212
TeamConnectionType::TEAM_CONNECTION,
1313
)]);
14-
let mut configuration = datadog::Configuration::new();
15-
configuration.set_unstable_operation_enabled("v2.DeleteTeamConnections", true);
14+
let configuration = datadog::Configuration::new();
1615
let api = TeamsAPI::with_config(configuration);
1716
let resp = api.delete_team_connections(body).await;
1817
if let Ok(value) = resp {

examples/v2_teams_GetTeamSync.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use datadog_api_client::datadogV2::model::TeamSyncAttributesSource;
55

66
#[tokio::main]
77
async fn main() {
8-
let mut configuration = datadog::Configuration::new();
9-
configuration.set_unstable_operation_enabled("v2.GetTeamSync", true);
8+
let configuration = datadog::Configuration::new();
109
let api = TeamsAPI::with_config(configuration);
1110
let resp = api.get_team_sync(TeamSyncAttributesSource::GITHUB).await;
1211
if let Ok(value) = resp {

examples/v2_teams_ListTeamConnections.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI;
55

66
#[tokio::main]
77
async fn main() {
8-
let mut configuration = datadog::Configuration::new();
9-
configuration.set_unstable_operation_enabled("v2.ListTeamConnections", true);
8+
let configuration = datadog::Configuration::new();
109
let api = TeamsAPI::with_config(configuration);
1110
let resp = api
1211
.list_team_connections(ListTeamConnectionsOptionalParams::default())

examples/v2_teams_ListTeamConnections_2418873869.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use futures_util::stream::StreamExt;
77

88
#[tokio::main]
99
async fn main() {
10-
let mut configuration = datadog::Configuration::new();
11-
configuration.set_unstable_operation_enabled("v2.ListTeamConnections", true);
10+
let configuration = datadog::Configuration::new();
1211
let api = TeamsAPI::with_config(configuration);
1312
let response =
1413
api.list_team_connections_with_pagination(ListTeamConnectionsOptionalParams::default());

examples/v2_teams_SyncTeams.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ async fn main() {
1717
),
1818
TeamSyncBulkType::TEAM_SYNC_BULK,
1919
));
20-
let mut configuration = datadog::Configuration::new();
21-
configuration.set_unstable_operation_enabled("v2.SyncTeams", true);
20+
let configuration = datadog::Configuration::new();
2221
let api = TeamsAPI::with_config(configuration);
2322
let resp = api.sync_teams(body).await;
2423
if let Ok(value) = resp {

examples/v2_teams_SyncTeams_3215592344.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ async fn main() {
1717
),
1818
TeamSyncBulkType::TEAM_SYNC_BULK,
1919
));
20-
let mut configuration = datadog::Configuration::new();
21-
configuration.set_unstable_operation_enabled("v2.SyncTeams", true);
20+
let configuration = datadog::Configuration::new();
2221
let api = TeamsAPI::with_config(configuration);
2322
let resp = api.sync_teams(body).await;
2423
if let Ok(value) = resp {

src/datadog/configuration.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,8 @@ impl Default for Configuration {
277277
("v2.create_sca_resolve_vulnerable_symbols".to_owned(), false),
278278
("v2.create_sca_result".to_owned(), false),
279279
("v2.add_member_team".to_owned(), false),
280-
("v2.create_team_connections".to_owned(), false),
281-
("v2.delete_team_connections".to_owned(), false),
282-
("v2.get_team_sync".to_owned(), false),
283280
("v2.list_member_teams".to_owned(), false),
284-
("v2.list_team_connections".to_owned(), false),
285281
("v2.remove_member_team".to_owned(), false),
286-
("v2.sync_teams".to_owned(), false),
287282
("v2.create_incident_team".to_owned(), false),
288283
("v2.delete_incident_team".to_owned(), false),
289284
("v2.get_incident_team".to_owned(), false),

src/datadogV2/api/api_teams.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,14 +1012,6 @@ impl TeamsAPI {
10121012
> {
10131013
let local_configuration = &self.config;
10141014
let operation_id = "v2.create_team_connections";
1015-
if local_configuration.is_unstable_operation_enabled(operation_id) {
1016-
warn!("Using unstable operation {operation_id}");
1017-
} else {
1018-
let local_error = datadog::UnstableOperationDisabledError {
1019-
msg: "Operation 'v2.create_team_connections' is not enabled".to_string(),
1020-
};
1021-
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
1022-
}
10231015

10241016
let local_client = &self.client;
10251017

@@ -1562,14 +1554,6 @@ impl TeamsAPI {
15621554
) -> Result<datadog::ResponseContent<()>, datadog::Error<DeleteTeamConnectionsError>> {
15631555
let local_configuration = &self.config;
15641556
let operation_id = "v2.delete_team_connections";
1565-
if local_configuration.is_unstable_operation_enabled(operation_id) {
1566-
warn!("Using unstable operation {operation_id}");
1567-
} else {
1568-
let local_error = datadog::UnstableOperationDisabledError {
1569-
msg: "Operation 'v2.delete_team_connections' is not enabled".to_string(),
1570-
};
1571-
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
1572-
}
15731557

15741558
let local_client = &self.client;
15751559

@@ -2609,14 +2593,6 @@ impl TeamsAPI {
26092593
> {
26102594
let local_configuration = &self.config;
26112595
let operation_id = "v2.get_team_sync";
2612-
if local_configuration.is_unstable_operation_enabled(operation_id) {
2613-
warn!("Using unstable operation {operation_id}");
2614-
} else {
2615-
let local_error = datadog::UnstableOperationDisabledError {
2616-
msg: "Operation 'v2.get_team_sync' is not enabled".to_string(),
2617-
};
2618-
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
2619-
}
26202596

26212597
let local_client = &self.client;
26222598

@@ -3052,14 +3028,6 @@ impl TeamsAPI {
30523028
> {
30533029
let local_configuration = &self.config;
30543030
let operation_id = "v2.list_team_connections";
3055-
if local_configuration.is_unstable_operation_enabled(operation_id) {
3056-
warn!("Using unstable operation {operation_id}");
3057-
} else {
3058-
let local_error = datadog::UnstableOperationDisabledError {
3059-
msg: "Operation 'v2.list_team_connections' is not enabled".to_string(),
3060-
};
3061-
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
3062-
}
30633031

30643032
// unbox and build optional parameters
30653033
let page_size = params.page_size;
@@ -3783,14 +3751,6 @@ impl TeamsAPI {
37833751
) -> Result<datadog::ResponseContent<()>, datadog::Error<SyncTeamsError>> {
37843752
let local_configuration = &self.config;
37853753
let operation_id = "v2.sync_teams";
3786-
if local_configuration.is_unstable_operation_enabled(operation_id) {
3787-
warn!("Using unstable operation {operation_id}");
3788-
} else {
3789-
let local_error = datadog::UnstableOperationDisabledError {
3790-
msg: "Operation 'v2.sync_teams' is not enabled".to_string(),
3791-
};
3792-
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
3793-
}
37943754

37953755
let local_client = &self.client;
37963756

tests/scenarios/features/v2/teams.feature

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ Feature: Teams
125125

126126
@generated @skip @team:DataDog/aaa-omg
127127
Scenario: Create team connections returns "Conflict" response
128-
Given operation "CreateTeamConnections" enabled
129-
And new "CreateTeamConnections" request
128+
Given new "CreateTeamConnections" request
130129
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"}]}
131130
When the request is sent
132131
Then the response status is 409 Conflict
@@ -155,16 +154,14 @@ Feature: Teams
155154

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

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

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

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

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

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

405398
@generated @skip @team:DataDog/aaa-omg
406399
Scenario: List team connections returns "OK" response
407-
Given operation "ListTeamConnections" enabled
408-
And new "ListTeamConnections" request
400+
Given new "ListTeamConnections" request
409401
When the request is sent
410402
Then the response status is 200 OK
411403

412404
@generated @skip @team:DataDog/aaa-omg @with-pagination
413405
Scenario: List team connections returns "OK" response with pagination
414-
Given operation "ListTeamConnections" enabled
415-
And new "ListTeamConnections" request
406+
Given new "ListTeamConnections" request
416407
When the request with pagination is sent
417408
Then the response status is 200 OK
418409

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

0 commit comments

Comments
 (0)