Skip to content

Commit 92c02a4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1990161 of spec repo
1 parent acfd9a2 commit 92c02a4

File tree

15 files changed

+662
-719
lines changed

15 files changed

+662
-719
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.ts renamed to examples/v2/teams/CreateTeamConnections.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.createTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

1111
// there is a valid "dd_team" in the system
1212
const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
1313

14-
const params: v2.TeamConnectionsApiCreateTeamConnectionsRequest = {
14+
const params: v2.TeamsApiCreateTeamConnectionsRequest = {
1515
body: {
1616
data: [
1717
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.deleteTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

11-
const params: v2.TeamConnectionsApiDeleteTeamConnectionsRequest = {
11+
const params: v2.TeamsApiDeleteTeamConnectionsRequest = {
1212
body: {
1313
data: [
1414
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.listTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

1111
apiInstance
1212
.listTeamConnections()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.listTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

11-
const params: v2.TeamConnectionsApiListTeamConnectionsRequest = {
11+
const params: v2.TeamsApiListTeamConnectionsRequest = {
1212
pageSize: 10,
1313
filterSources: ["github"],
1414
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.listTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

1111
(async () => {
1212
try {

features/support/scenarios_model_mapping.ts

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8908,6 +8908,47 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
89088908
},
89098909
"operationResponseType": "{}",
89108910
},
8911+
"v2.ListTeamConnections": {
8912+
"pageSize": {
8913+
"type": "number",
8914+
"format": "int64",
8915+
},
8916+
"pageNumber": {
8917+
"type": "number",
8918+
"format": "int64",
8919+
},
8920+
"filterSources": {
8921+
"type": "Array<string>",
8922+
"format": "",
8923+
},
8924+
"filterTeamIds": {
8925+
"type": "Array<string>",
8926+
"format": "",
8927+
},
8928+
"filterConnectedTeamIds": {
8929+
"type": "Array<string>",
8930+
"format": "",
8931+
},
8932+
"filterConnectionIds": {
8933+
"type": "Array<string>",
8934+
"format": "",
8935+
},
8936+
"operationResponseType": "TeamConnectionsResponse",
8937+
},
8938+
"v2.CreateTeamConnections": {
8939+
"body": {
8940+
"type": "TeamConnectionCreateRequest",
8941+
"format": "",
8942+
},
8943+
"operationResponseType": "TeamConnectionsResponse",
8944+
},
8945+
"v2.DeleteTeamConnections": {
8946+
"body": {
8947+
"type": "TeamConnectionDeleteRequest",
8948+
"format": "",
8949+
},
8950+
"operationResponseType": "{}",
8951+
},
89118952
"v2.GetTeamSync": {
89128953
"filterSource": {
89138954
"type": "TeamSyncAttributesSource",
@@ -9132,47 +9173,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
91329173
},
91339174
"operationResponseType": "UserTeamsResponse",
91349175
},
9135-
"v2.ListTeamConnections": {
9136-
"pageSize": {
9137-
"type": "number",
9138-
"format": "int64",
9139-
},
9140-
"pageNumber": {
9141-
"type": "number",
9142-
"format": "int64",
9143-
},
9144-
"filterSources": {
9145-
"type": "Array<string>",
9146-
"format": "",
9147-
},
9148-
"filterTeamIds": {
9149-
"type": "Array<string>",
9150-
"format": "",
9151-
},
9152-
"filterConnectedTeamIds": {
9153-
"type": "Array<string>",
9154-
"format": "",
9155-
},
9156-
"filterConnectionIds": {
9157-
"type": "Array<string>",
9158-
"format": "",
9159-
},
9160-
"operationResponseType": "TeamConnectionsResponse",
9161-
},
9162-
"v2.CreateTeamConnections": {
9163-
"body": {
9164-
"type": "TeamConnectionCreateRequest",
9165-
"format": "",
9166-
},
9167-
"operationResponseType": "TeamConnectionsResponse",
9168-
},
9169-
"v2.DeleteTeamConnections": {
9170-
"body": {
9171-
"type": "TeamConnectionDeleteRequest",
9172-
"format": "",
9173-
},
9174-
"operationResponseType": "{}",
9175-
},
91769176
"v2.ListIncidentTeams": {
91779177
"include": {
91789178
"type": "IncidentRelatedObject",

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)