Skip to content

Commit 9a66190

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a736973 of spec repo
1 parent b25c67e commit 9a66190

15 files changed

+359
-398
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82027,7 +82027,7 @@ paths:
8202782027
- teams_read
8202882028
summary: Delete team connections
8202982029
tags:
82030-
- Team Connections
82030+
- Teams
8203182031
x-permission:
8203282032
operator: OR
8203382033
permissions:
@@ -82106,7 +82106,7 @@ paths:
8210682106
- teams_read
8210782107
summary: List team connections
8210882108
tags:
82109-
- Team Connections
82109+
- Teams
8211082110
x-pagination:
8211182111
limitParam: page[size]
8211282112
pageParam: page[number]
@@ -82150,7 +82150,7 @@ paths:
8215082150
- teams_read
8215182151
summary: Create team connections
8215282152
tags:
82153-
- Team Connections
82153+
- Teams
8215482154
x-permission:
8215582155
operator: OR
8215682156
permissions:
@@ -85414,9 +85414,6 @@ tags:
8541485414
use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more
8541585415
information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)."
8541685416
name: Synthetics
85417-
- description: View and manage relationships between Datadog teams and teams from
85418-
external sources, such as GitHub.
85419-
name: Team Connections
8542085417
- description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/)
8542185418
for more information.
8542285419
name: Teams

examples/v2/team-connections/CreateTeamConnections.rb renamed to examples/v2/teams/CreateTeamConnections.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.create_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88

99
# there is a valid "dd_team" in the system
1010
DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"]

examples/v2/team-connections/DeleteTeamConnections.rb renamed to examples/v2/teams/DeleteTeamConnections.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.delete_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88

99
body = DatadogAPIClient::V2::TeamConnectionDeleteRequest.new({
1010
data: [

examples/v2/team-connections/ListTeamConnections.rb renamed to examples/v2/teams/ListTeamConnections.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.list_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88
p api_instance.list_team_connections()

examples/v2/team-connections/ListTeamConnections_1473516764.rb renamed to examples/v2/teams/ListTeamConnections_1473516764.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.list_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88
opts = {
99
filter_sources: [
1010
"github",

examples/v2/team-connections/ListTeamConnections_2418873869.rb renamed to examples/v2/teams/ListTeamConnections_2418873869.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.list_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88
api_instance.list_team_connections_with_pagination() { |item| puts item }

features/scenarios_model_mapping.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,20 @@
31023102
"v2.CreateTeam" => {
31033103
"body" => "TeamCreateRequest",
31043104
},
3105+
"v2.DeleteTeamConnections" => {
3106+
"body" => "TeamConnectionDeleteRequest",
3107+
},
3108+
"v2.ListTeamConnections" => {
3109+
"page_size" => "Integer",
3110+
"page_number" => "Integer",
3111+
"filter_sources" => "Array<String>",
3112+
"filter_team_ids" => "Array<String>",
3113+
"filter_connected_team_ids" => "Array<String>",
3114+
"filter_connection_ids" => "Array<String>",
3115+
},
3116+
"v2.CreateTeamConnections" => {
3117+
"body" => "TeamConnectionCreateRequest",
3118+
},
31053119
"v2.GetTeamSync" => {
31063120
"filter_source" => "TeamSyncAttributesSource",
31073121
},
@@ -3183,20 +3197,6 @@
31833197
"v2.GetUserMemberships" => {
31843198
"user_uuid" => "String",
31853199
},
3186-
"v2.DeleteTeamConnections" => {
3187-
"body" => "TeamConnectionDeleteRequest",
3188-
},
3189-
"v2.ListTeamConnections" => {
3190-
"page_size" => "Integer",
3191-
"page_number" => "Integer",
3192-
"filter_sources" => "Array<String>",
3193-
"filter_team_ids" => "Array<String>",
3194-
"filter_connected_team_ids" => "Array<String>",
3195-
"filter_connection_ids" => "Array<String>",
3196-
},
3197-
"v2.CreateTeamConnections" => {
3198-
"body" => "TeamConnectionCreateRequest",
3199-
},
32003200
"v2.ListIncidentTeams" => {
32013201
"include" => "IncidentRelatedObject",
32023202
"page_size" => "Integer",

features/v2/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@
11731173
"source": "data.data[0]",
11741174
"step": "there is a valid \"team_connection\" in the system",
11751175
"key": "team_connection",
1176-
"tag": "Team Connections",
1176+
"tag": "Teams",
11771177
"operationId": "CreateTeamConnections"
11781178
},
11791179
{

features/v2/team_connections.feature

Lines changed: 0 additions & 93 deletions
This file was deleted.

features/v2/teams.feature

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,60 @@ Feature: Teams
9696
And the response "data.attributes.visible_modules" is equal to ["m1","m2"]
9797
And the response "data.attributes.hidden_modules" is equal to ["m3"]
9898

99+
@skip @team:DataDog/aaa-omg
100+
Scenario: Create team connections returns "Bad Request" response
101+
Given operation "CreateTeamConnections" enabled
102+
And new "CreateTeamConnections" request
103+
And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]}
104+
When the request is sent
105+
Then the response status is 400 Bad Request
106+
107+
@generated @skip @team:DataDog/aaa-omg
108+
Scenario: Create team connections returns "Conflict" response
109+
Given operation "CreateTeamConnections" enabled
110+
And new "CreateTeamConnections" request
111+
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"}]}
112+
When the request is sent
113+
Then the response status is 409 Conflict
114+
115+
@skip @team:DataDog/aaa-omg
116+
Scenario: Create team connections returns "Created" response
117+
Given operation "CreateTeamConnections" enabled
118+
And new "CreateTeamConnections" request
119+
And there is a valid "dd_team" in the system
120+
And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]}
121+
When the request is sent
122+
Then the response status is 201 Created
123+
And the response "data.data[0].attributes.source" is equal to "github"
124+
And the response "data.data[0].attributes.managed_by" is equal to "datadog"
125+
And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}"
126+
And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name"
127+
And the response "data.data[0].type" is equal to "team_connection"
128+
129+
@skip @team:DataDog/aaa-omg
130+
Scenario: Delete team connections returns "Bad Request" response
131+
Given operation "DeleteTeamConnections" enabled
132+
And new "DeleteTeamConnections" request
133+
And body with value {"data": [{"type": "team_connection"}]}
134+
When the request is sent
135+
Then the response status is 400 Bad Request
136+
137+
@generated @skip @team:DataDog/aaa-omg
138+
Scenario: Delete team connections returns "No Content" response
139+
Given operation "DeleteTeamConnections" enabled
140+
And new "DeleteTeamConnections" request
141+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
142+
When the request is sent
143+
Then the response status is 204 No Content
144+
145+
@generated @skip @team:DataDog/aaa-omg
146+
Scenario: Delete team connections returns "Not Found" response
147+
Given operation "DeleteTeamConnections" enabled
148+
And new "DeleteTeamConnections" request
149+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
150+
When the request is sent
151+
Then the response status is 404 Not Found
152+
99153
@team:DataDog/aaa-omg
100154
Scenario: Get a team link returns "API error response." response
101155
Given new "GetTeamLink" request
@@ -275,6 +329,36 @@ Feature: Teams
275329
When the request is sent
276330
Then the response status is 200 OK
277331

332+
@generated @skip @team:DataDog/aaa-omg
333+
Scenario: List team connections returns "Bad Request" response
334+
Given operation "ListTeamConnections" enabled
335+
And new "ListTeamConnections" request
336+
When the request is sent
337+
Then the response status is 400 Bad Request
338+
339+
@generated @skip @team:DataDog/aaa-omg
340+
Scenario: List team connections returns "OK" response
341+
Given operation "ListTeamConnections" enabled
342+
And new "ListTeamConnections" request
343+
When the request is sent
344+
Then the response status is 200 OK
345+
346+
@generated @skip @team:DataDog/aaa-omg @with-pagination
347+
Scenario: List team connections returns "OK" response with pagination
348+
Given operation "ListTeamConnections" enabled
349+
And new "ListTeamConnections" request
350+
When the request with pagination is sent
351+
Then the response status is 200 OK
352+
353+
@skip @team:DataDog/aaa-omg
354+
Scenario: List team connections with filters returns "OK" response
355+
Given operation "ListTeamConnections" enabled
356+
And new "ListTeamConnections" request
357+
And request contains "filter[sources]" parameter with value ["github"]
358+
And request contains "page[size]" parameter with value 10
359+
When the request is sent
360+
Then the response status is 200 OK
361+
278362
@generated @skip @team:DataDog/aaa-omg
279363
Scenario: Remove a member team returns "API error response." response
280364
Given operation "RemoveMemberTeam" enabled

0 commit comments

Comments
 (0)