Skip to content

Commit 4a2f2f7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1990161 of spec repo
1 parent 73a6de3 commit 4a2f2f7

15 files changed

+360
-399
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83168,7 +83168,7 @@ paths:
8316883168
- teams_read
8316983169
summary: Delete team connections
8317083170
tags:
83171-
- Team Connections
83171+
- Teams
8317283172
x-permission:
8317383173
operator: OR
8317483174
permissions:
@@ -83247,7 +83247,7 @@ paths:
8324783247
- teams_read
8324883248
summary: List team connections
8324983249
tags:
83250-
- Team Connections
83250+
- Teams
8325183251
x-pagination:
8325283252
limitParam: page[size]
8325383253
pageParam: page[number]
@@ -83291,7 +83291,7 @@ paths:
8329183291
- teams_read
8329283292
summary: Create team connections
8329383293
tags:
83294-
- Team Connections
83294+
- Teams
8329583295
x-permission:
8329683296
operator: OR
8329783297
permissions:
@@ -86612,9 +86612,6 @@ tags:
8661286612
use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more
8661386613
information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)."
8661486614
name: Synthetics
86615-
- description: View and manage relationships between Datadog teams and teams from
86616-
external sources, such as GitHub.
86617-
name: Team Connections
8661886615
- description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/)
8661986616
for more information.
8662086617
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
@@ -3157,6 +3157,20 @@
31573157
"v2.GetTeamHierarchyLink" => {
31583158
"link_id" => "String",
31593159
},
3160+
"v2.DeleteTeamConnections" => {
3161+
"body" => "TeamConnectionDeleteRequest",
3162+
},
3163+
"v2.ListTeamConnections" => {
3164+
"page_size" => "Integer",
3165+
"page_number" => "Integer",
3166+
"filter_sources" => "Array<String>",
3167+
"filter_team_ids" => "Array<String>",
3168+
"filter_connected_team_ids" => "Array<String>",
3169+
"filter_connection_ids" => "Array<String>",
3170+
},
3171+
"v2.CreateTeamConnections" => {
3172+
"body" => "TeamConnectionCreateRequest",
3173+
},
31603174
"v2.GetTeamSync" => {
31613175
"filter_source" => "TeamSyncAttributesSource",
31623176
},
@@ -3238,20 +3252,6 @@
32383252
"v2.GetUserMemberships" => {
32393253
"user_uuid" => "String",
32403254
},
3241-
"v2.DeleteTeamConnections" => {
3242-
"body" => "TeamConnectionDeleteRequest",
3243-
},
3244-
"v2.ListTeamConnections" => {
3245-
"page_size" => "Integer",
3246-
"page_number" => "Integer",
3247-
"filter_sources" => "Array<String>",
3248-
"filter_team_ids" => "Array<String>",
3249-
"filter_connected_team_ids" => "Array<String>",
3250-
"filter_connection_ids" => "Array<String>",
3251-
},
3252-
"v2.CreateTeamConnections" => {
3253-
"body" => "TeamConnectionCreateRequest",
3254-
},
32553255
"v2.ListIncidentTeams" => {
32563256
"include" => "IncidentRelatedObject",
32573257
"page_size" => "Integer",

features/v2/given.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
"parameters": [
351351
{
352352
"name": "body",
353-
"value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate-{{ unique_lower_alnum }}\",\n \"dry_run\": false\n }\n }\n}"
353+
"value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}"
354354
}
355355
],
356356
"step": "there is a valid \"deployment_gate\" in the system",
@@ -1209,7 +1209,7 @@
12091209
"source": "data.data[0]",
12101210
"step": "there is a valid \"team_connection\" in the system",
12111211
"key": "team_connection",
1212-
"tag": "Team Connections",
1212+
"tag": "Teams",
12131213
"operationId": "CreateTeamConnections"
12141214
},
12151215
{

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
@@ -115,6 +115,60 @@ Feature: Teams
115115
And the response "data.attributes.visible_modules" is equal to ["m1","m2"]
116116
And the response "data.attributes.hidden_modules" is equal to ["m3"]
117117

118+
@skip @team:DataDog/aaa-omg
119+
Scenario: Create team connections returns "Bad Request" response
120+
Given operation "CreateTeamConnections" enabled
121+
And new "CreateTeamConnections" request
122+
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"}]}
123+
When the request is sent
124+
Then the response status is 400 Bad Request
125+
126+
@generated @skip @team:DataDog/aaa-omg
127+
Scenario: Create team connections returns "Conflict" response
128+
Given operation "CreateTeamConnections" enabled
129+
And new "CreateTeamConnections" request
130+
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"}]}
131+
When the request is sent
132+
Then the response status is 409 Conflict
133+
134+
@skip @team:DataDog/aaa-omg
135+
Scenario: Create team connections returns "Created" response
136+
Given operation "CreateTeamConnections" enabled
137+
And new "CreateTeamConnections" request
138+
And there is a valid "dd_team" in the system
139+
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"}}}}]}
140+
When the request is sent
141+
Then the response status is 201 Created
142+
And the response "data.data[0].attributes.source" is equal to "github"
143+
And the response "data.data[0].attributes.managed_by" is equal to "datadog"
144+
And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}"
145+
And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name"
146+
And the response "data.data[0].type" is equal to "team_connection"
147+
148+
@skip @team:DataDog/aaa-omg
149+
Scenario: Delete team connections returns "Bad Request" response
150+
Given operation "DeleteTeamConnections" enabled
151+
And new "DeleteTeamConnections" request
152+
And body with value {"data": [{"type": "team_connection"}]}
153+
When the request is sent
154+
Then the response status is 400 Bad Request
155+
156+
@generated @skip @team:DataDog/aaa-omg
157+
Scenario: Delete team connections returns "No Content" response
158+
Given operation "DeleteTeamConnections" enabled
159+
And new "DeleteTeamConnections" request
160+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
161+
When the request is sent
162+
Then the response status is 204 No Content
163+
164+
@generated @skip @team:DataDog/aaa-omg
165+
Scenario: Delete team connections returns "Not Found" response
166+
Given operation "DeleteTeamConnections" enabled
167+
And new "DeleteTeamConnections" request
168+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
169+
When the request is sent
170+
Then the response status is 404 Not Found
171+
118172
@team:DataDog/aaa-omg
119173
Scenario: Get a team hierarchy link returns "API error response." response
120174
Given new "GetTeamHierarchyLink" request
@@ -341,6 +395,36 @@ Feature: Teams
341395
When the request is sent
342396
Then the response status is 200 OK
343397

398+
@generated @skip @team:DataDog/aaa-omg
399+
Scenario: List team connections returns "Bad Request" response
400+
Given operation "ListTeamConnections" enabled
401+
And new "ListTeamConnections" request
402+
When the request is sent
403+
Then the response status is 400 Bad Request
404+
405+
@generated @skip @team:DataDog/aaa-omg
406+
Scenario: List team connections returns "OK" response
407+
Given operation "ListTeamConnections" enabled
408+
And new "ListTeamConnections" request
409+
When the request is sent
410+
Then the response status is 200 OK
411+
412+
@generated @skip @team:DataDog/aaa-omg @with-pagination
413+
Scenario: List team connections returns "OK" response with pagination
414+
Given operation "ListTeamConnections" enabled
415+
And new "ListTeamConnections" request
416+
When the request with pagination is sent
417+
Then the response status is 200 OK
418+
419+
@skip @team:DataDog/aaa-omg
420+
Scenario: List team connections with filters returns "OK" response
421+
Given operation "ListTeamConnections" enabled
422+
And new "ListTeamConnections" request
423+
And request contains "filter[sources]" parameter with value ["github"]
424+
And request contains "page[size]" parameter with value 10
425+
When the request is sent
426+
Then the response status is 200 OK
427+
344428
@generated @skip @team:DataDog/aaa-omg
345429
Scenario: Remove a member team returns "API error response." response
346430
Given operation "RemoveMemberTeam" enabled

0 commit comments

Comments
 (0)