Skip to content

Commit d14ae67

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3d6d8b4 of spec repo
1 parent b25c67e commit d14ae67

29 files changed

+3296
-3
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 449 additions & 3 deletions
Large diffs are not rendered by default.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Create a team hierarchy link returns "CREATED" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
5+
6+
body = DatadogAPIClient::V2::TeamHierarchyLinkCreateRequest.new({
7+
data: DatadogAPIClient::V2::TeamHierarchyLinkCreate.new({
8+
relationships: DatadogAPIClient::V2::TeamHierarchyLinkCreateRelationships.new({
9+
parent_team: DatadogAPIClient::V2::TeamHierarchyLinkCreateTeamRelationship.new({
10+
data: DatadogAPIClient::V2::TeamHierarchyLinkCreateTeam.new({
11+
id: "692e8073-12c4-4c71-8408-5090bd44c9c8",
12+
type: DatadogAPIClient::V2::TeamType::TEAM,
13+
}),
14+
}),
15+
sub_team: DatadogAPIClient::V2::TeamHierarchyLinkCreateTeamRelationship.new({
16+
data: DatadogAPIClient::V2::TeamHierarchyLinkCreateTeam.new({
17+
id: "692e8073-12c4-4c71-8408-5090bd44c9c8",
18+
type: DatadogAPIClient::V2::TeamType::TEAM,
19+
}),
20+
}),
21+
}),
22+
type: DatadogAPIClient::V2::TeamHierarchyLinkType::TEAM_HIERARCHY_LINKS,
23+
}),
24+
})
25+
p api_instance.add_team_hierarchy_link(body)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get a team hierarchy link returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
5+
p api_instance.get_team_hierarchy_link("link_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get team hierarchy links returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
5+
p api_instance.get_team_hierarchy_links()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get team hierarchy links returns "OK" response with pagination
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
5+
api_instance.get_team_hierarchy_links_with_pagination() { |item| puts item }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Remove a team hierarchy link returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
5+
api_instance.remove_team_hierarchy_link("link_id")

features/scenarios_model_mapping.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,21 @@
31023102
"v2.CreateTeam" => {
31033103
"body" => "TeamCreateRequest",
31043104
},
3105+
"v2.GetTeamHierarchyLinks" => {
3106+
"page_number" => "Integer",
3107+
"page_size" => "Integer",
3108+
"filter_parent_team" => "String",
3109+
"filter_sub_team" => "String",
3110+
},
3111+
"v2.AddTeamHierarchyLink" => {
3112+
"body" => "TeamHierarchyLinkCreateRequest",
3113+
},
3114+
"v2.RemoveTeamHierarchyLink" => {
3115+
"link_id" => "String",
3116+
},
3117+
"v2.GetTeamHierarchyLink" => {
3118+
"link_id" => "String",
3119+
},
31053120
"v2.GetTeamSync" => {
31063121
"filter_source" => "TeamSyncAttributesSource",
31073122
},

features/v2/given.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,18 @@
11691169
"tag": "Teams",
11701170
"operationId": "CreateTeam"
11711171
},
1172+
{
1173+
"parameters": [
1174+
{
1175+
"name": "body",
1176+
"value": "{\n \"data\": {\n \"type\": \"team_hierarchy_links\",\n \"attributes\": {\n \"created_at\": \"2025-07-16T19:56:30.033205Z\",\n \"provisioned_by\": \"\"\n },\n \"relationships\": {\n \"parent_team\": {\n \"data\": {\n \"id\": \"9f3bae64-7d3b-4f27-8768-9ecb66ddd15f\",\n \"type\": \"team\"\n }\n },\n \"sub_team\": {\n \"data\": {\n \"id\": \"053b5ece-bca2-420a-b303-e07919e979b1\",\n \"type\": \"team\"\n }\n }\n }\n }\n}"
1177+
}
1178+
],
1179+
"step": "there is a valid \"team_hierarchy_link\" in the system",
1180+
"key": "team_hierarchy_link",
1181+
"tag": "Teams",
1182+
"operationId": "AddTeamHierarchyLink"
1183+
},
11721184
{
11731185
"source": "data.data[0]",
11741186
"step": "there is a valid \"team_connection\" in the system",

features/v2/teams.feature

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ Feature: Teams
4343
When the request is sent
4444
Then the response status is 200 Represents a user's association to a team
4545

46+
@generated @skip @team:DataDog/aaa-omg
47+
Scenario: Create a team hierarchy link returns "CREATED" response
48+
Given new "AddTeamHierarchyLink" request
49+
And body with value {"data": {"relationships": {"parent_team": {"data": {"id": "692e8073-12c4-4c71-8408-5090bd44c9c8", "type": "team"}}, "sub_team": {"data": {"id": "692e8073-12c4-4c71-8408-5090bd44c9c8", "type": "team"}}}, "type": "team_hierarchy_links"}}
50+
When the request is sent
51+
Then the response status is 201 CREATED
52+
53+
@generated @skip @team:DataDog/aaa-omg
54+
Scenario: Create a team hierarchy link returns "Conflict" response
55+
Given new "AddTeamHierarchyLink" request
56+
And body with value {"data": {"relationships": {"parent_team": {"data": {"id": "692e8073-12c4-4c71-8408-5090bd44c9c8", "type": "team"}}, "sub_team": {"data": {"id": "692e8073-12c4-4c71-8408-5090bd44c9c8", "type": "team"}}}, "type": "team_hierarchy_links"}}
57+
When the request is sent
58+
Then the response status is 409 Conflict
59+
4660
@team:DataDog/aaa-omg
4761
Scenario: Create a team link returns "API error response." response
4862
Given new "CreateTeamLink" request
@@ -96,6 +110,20 @@ Feature: Teams
96110
And the response "data.attributes.visible_modules" is equal to ["m1","m2"]
97111
And the response "data.attributes.hidden_modules" is equal to ["m3"]
98112

113+
@generated @skip @team:DataDog/aaa-omg
114+
Scenario: Get a team hierarchy link returns "API error response." response
115+
Given new "GetTeamHierarchyLink" request
116+
And request contains "link_id" parameter from "REPLACE.ME"
117+
When the request is sent
118+
Then the response status is 404 API error response.
119+
120+
@generated @skip @team:DataDog/aaa-omg
121+
Scenario: Get a team hierarchy link returns "OK" response
122+
Given new "GetTeamHierarchyLink" request
123+
And request contains "link_id" parameter from "REPLACE.ME"
124+
When the request is sent
125+
Then the response status is 200 OK
126+
99127
@team:DataDog/aaa-omg
100128
Scenario: Get a team link returns "API error response." response
101129
Given new "GetTeamLink" request
@@ -211,6 +239,18 @@ Feature: Teams
211239
When the request is sent
212240
Then the response status is 200 OK
213241

242+
@generated @skip @team:DataDog/aaa-omg
243+
Scenario: Get team hierarchy links returns "OK" response
244+
Given new "GetTeamHierarchyLinks" request
245+
When the request is sent
246+
Then the response status is 200 OK
247+
248+
@generated @skip @team:DataDog/aaa-omg @with-pagination
249+
Scenario: Get team hierarchy links returns "OK" response with pagination
250+
Given new "GetTeamHierarchyLinks" request
251+
When the request with pagination is sent
252+
Then the response status is 200 OK
253+
214254
@team:DataDog/aaa-omg
215255
Scenario: Get team memberships returns "API error response." response
216256
Given new "GetTeamMemberships" request
@@ -293,6 +333,20 @@ Feature: Teams
293333
When the request is sent
294334
Then the response status is 204 No Content
295335

336+
@generated @skip @team:DataDog/aaa-omg
337+
Scenario: Remove a team hierarchy link returns "API error response." response
338+
Given new "RemoveTeamHierarchyLink" request
339+
And request contains "link_id" parameter from "REPLACE.ME"
340+
When the request is sent
341+
Then the response status is 404 API error response.
342+
343+
@generated @skip @team:DataDog/aaa-omg
344+
Scenario: Remove a team hierarchy link returns "No Content" response
345+
Given new "RemoveTeamHierarchyLink" request
346+
And request contains "link_id" parameter from "REPLACE.ME"
347+
When the request is sent
348+
Then the response status is 204 No Content
349+
296350
@team:DataDog/aaa-omg
297351
Scenario: Remove a team link returns "API error response." response
298352
Given new "DeleteTeamLink" request

features/v2/undo.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,6 +4345,37 @@
43454345
"type": "unsafe"
43464346
}
43474347
},
4348+
"GetTeamHierarchyLinks": {
4349+
"tag": "Teams",
4350+
"undo": {
4351+
"type": "safe"
4352+
}
4353+
},
4354+
"AddTeamHierarchyLink": {
4355+
"tag": "Teams",
4356+
"undo": {
4357+
"operationId": "RemoveTeamHierarchyLink",
4358+
"parameters": [
4359+
{
4360+
"name": "link_id",
4361+
"source": "response"
4362+
}
4363+
],
4364+
"type": "unsafe"
4365+
}
4366+
},
4367+
"RemoveTeamHierarchyLink": {
4368+
"tag": "Teams",
4369+
"undo": {
4370+
"type": "idempotent"
4371+
}
4372+
},
4373+
"GetTeamHierarchyLink": {
4374+
"tag": "Teams",
4375+
"undo": {
4376+
"type": "safe"
4377+
}
4378+
},
43484379
"DeleteTeamConnections": {
43494380
"tag": "Team Connections",
43504381
"undo": {

0 commit comments

Comments
 (0)