Skip to content

Commit cda7e05

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b359fdc of spec repo (#2388)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent c5d3271 commit cda7e05

File tree

10 files changed

+947
-1
lines changed

10 files changed

+947
-1
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 193 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,14 @@ components:
22202220
type: string
22212221
x-enum-varnames:
22222222
- BILLING_DIMENSIONS
2223+
AddMemberTeamRequest:
2224+
description: Request to add a member team to super team's hierarchy
2225+
properties:
2226+
data:
2227+
$ref: '#/components/schemas/MemberTeam'
2228+
required:
2229+
- data
2230+
type: object
22232231
Advisory:
22242232
description: Advisory.
22252233
properties:
@@ -21409,6 +21417,30 @@ components:
2140921417
- ms_channel_name
2141021418
- redirect_url
2141121419
type: object
21420+
MemberTeam:
21421+
description: A member team
21422+
properties:
21423+
id:
21424+
description: The member team's identifier
21425+
example: aeadc05e-98a8-11ec-ac2c-da7ad0900001
21426+
type: string
21427+
type:
21428+
$ref: '#/components/schemas/MemberTeamType'
21429+
required:
21430+
- id
21431+
- type
21432+
type: object
21433+
x-merge-override:
21434+
required: false
21435+
MemberTeamType:
21436+
default: member_teams
21437+
description: Member team type
21438+
enum:
21439+
- member_teams
21440+
example: member_teams
21441+
type: string
21442+
x-enum-varnames:
21443+
- MEMBER_TEAMS
2141221444
Metadata:
2141321445
description: The metadata related to this request.
2141421446
properties:
@@ -63274,6 +63306,166 @@ paths:
6327463306
x-merge-override:
6327563307
get: false
6327663308
post: false
63309+
/api/v2/team/{super_team_id}/member_teams:
63310+
get:
63311+
description: Get all member teams.
63312+
operationId: ListMemberTeams
63313+
parameters:
63314+
- description: None
63315+
in: path
63316+
name: super_team_id
63317+
required: true
63318+
schema:
63319+
type: string
63320+
- $ref: '#/components/parameters/PageSize'
63321+
- $ref: '#/components/parameters/PageNumber'
63322+
- description: List of fields that need to be fetched.
63323+
explode: false
63324+
in: query
63325+
name: fields[team]
63326+
required: false
63327+
schema:
63328+
items:
63329+
$ref: '#/components/schemas/TeamsField'
63330+
type: array
63331+
responses:
63332+
'200':
63333+
content:
63334+
application/json:
63335+
schema:
63336+
$ref: '#/components/schemas/TeamsResponse'
63337+
description: OK
63338+
'403':
63339+
$ref: '#/components/responses/ForbiddenResponse'
63340+
'404':
63341+
content:
63342+
application/json:
63343+
schema:
63344+
$ref: '#/components/schemas/APIErrorResponse'
63345+
description: API error response.
63346+
'429':
63347+
$ref: '#/components/responses/TooManyRequestsResponse'
63348+
security:
63349+
- apiKeyAuth: []
63350+
appKeyAuth: []
63351+
- AuthZ:
63352+
- teams_read
63353+
summary: Get all member teams
63354+
tags:
63355+
- Teams
63356+
x-menu-order: 21
63357+
x-pagination:
63358+
limitParam: page[size]
63359+
pageParam: page[number]
63360+
resultsPath: data
63361+
x-permission:
63362+
operator: OR
63363+
permissions:
63364+
- teams_read
63365+
x-undo:
63366+
type: safe
63367+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
63368+
63369+
contact [Datadog support](https://docs.datadoghq.com/help/).'
63370+
post:
63371+
description: 'Add a member team.
63372+
63373+
Adds the team given by the `id` in the body as a member team of the super
63374+
team.'
63375+
operationId: AddMemberTeam
63376+
parameters:
63377+
- description: None
63378+
in: path
63379+
name: super_team_id
63380+
required: true
63381+
schema:
63382+
type: string
63383+
requestBody:
63384+
content:
63385+
application/json:
63386+
schema:
63387+
$ref: '#/components/schemas/AddMemberTeamRequest'
63388+
required: true
63389+
responses:
63390+
'204':
63391+
description: Added
63392+
'403':
63393+
$ref: '#/components/responses/ForbiddenResponse'
63394+
'409':
63395+
content:
63396+
application/json:
63397+
schema:
63398+
$ref: '#/components/schemas/APIErrorResponse'
63399+
description: API error response.
63400+
'429':
63401+
$ref: '#/components/responses/TooManyRequestsResponse'
63402+
security:
63403+
- apiKeyAuth: []
63404+
appKeyAuth: []
63405+
- AuthZ:
63406+
- teams_read
63407+
summary: Add a member team
63408+
tags:
63409+
- Teams
63410+
x-menu-order: 20
63411+
x-permission:
63412+
operator: OR
63413+
permissions:
63414+
- teams_read
63415+
x-undo:
63416+
operationId: RemoveMemberTeam
63417+
type: unsafe
63418+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
63419+
63420+
contact [Datadog support](https://docs.datadoghq.com/help/).'
63421+
/api/v2/team/{super_team_id}/member_teams/{member_team_id}:
63422+
delete:
63423+
description: Remove a super team's member team identified by `member_team_id`.
63424+
operationId: RemoveMemberTeam
63425+
parameters:
63426+
- description: None
63427+
in: path
63428+
name: super_team_id
63429+
required: true
63430+
schema:
63431+
type: string
63432+
- description: None
63433+
in: path
63434+
name: member_team_id
63435+
required: true
63436+
schema:
63437+
type: string
63438+
responses:
63439+
'204':
63440+
description: No Content
63441+
'403':
63442+
$ref: '#/components/responses/ForbiddenResponse'
63443+
'404':
63444+
content:
63445+
application/json:
63446+
schema:
63447+
$ref: '#/components/schemas/APIErrorResponse'
63448+
description: API error response.
63449+
'429':
63450+
$ref: '#/components/responses/TooManyRequestsResponse'
63451+
security:
63452+
- apiKeyAuth: []
63453+
appKeyAuth: []
63454+
- AuthZ:
63455+
- teams_read
63456+
summary: Remove a member team
63457+
tags:
63458+
- Teams
63459+
x-menu-order: 22
63460+
x-permission:
63461+
operator: OR
63462+
permissions:
63463+
- teams_read
63464+
x-undo:
63465+
type: idempotent
63466+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
63467+
63468+
contact [Datadog support](https://docs.datadoghq.com/help/).'
6327763469
/api/v2/team/{team_id}:
6327863470
delete:
6327963471
description: Remove a team using the team's `id`.
@@ -65526,7 +65718,7 @@ paths:
6552665718
summary: Get user memberships
6552765719
tags:
6552865720
- Teams
65529-
x-menu-order: 1
65721+
x-menu-order: 19
6553065722
x-permission:
6553165723
operator: OR
6553265724
permissions:

features/v2/teams.feature

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ Feature: Teams
99
And a valid "appKeyAuth" key in the system
1010
And an instance of "Teams" API
1111

12+
@generated @skip @team:DataDog/core-app
13+
Scenario: Add a member team returns "API error response." response
14+
Given operation "AddMemberTeam" enabled
15+
And new "AddMemberTeam" request
16+
And request contains "super_team_id" parameter from "REPLACE.ME"
17+
And body with value {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "member_teams"}}
18+
When the request is sent
19+
Then the response status is 409 API error response.
20+
21+
@generated @skip @team:DataDog/core-app
22+
Scenario: Add a member team returns "Added" response
23+
Given operation "AddMemberTeam" enabled
24+
And new "AddMemberTeam" request
25+
And request contains "super_team_id" parameter from "REPLACE.ME"
26+
And body with value {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "member_teams"}}
27+
When the request is sent
28+
Then the response status is 204 Added
29+
1230
@generated @skip @team:DataDog/core-app
1331
Scenario: Add a user to a team returns "API error response." response
1432
Given new "CreateTeamMembership" request
@@ -112,6 +130,30 @@ Feature: Teams
112130
When the request is sent
113131
Then the response status is 200 OK
114132

133+
@generated @skip @team:DataDog/core-app
134+
Scenario: Get all member teams returns "API error response." response
135+
Given operation "ListMemberTeams" enabled
136+
And new "ListMemberTeams" request
137+
And request contains "super_team_id" parameter from "REPLACE.ME"
138+
When the request is sent
139+
Then the response status is 404 API error response.
140+
141+
@generated @skip @team:DataDog/core-app
142+
Scenario: Get all member teams returns "OK" response
143+
Given operation "ListMemberTeams" enabled
144+
And new "ListMemberTeams" request
145+
And request contains "super_team_id" parameter from "REPLACE.ME"
146+
When the request is sent
147+
Then the response status is 200 OK
148+
149+
@generated @skip @team:DataDog/core-app @with-pagination
150+
Scenario: Get all member teams returns "OK" response with pagination
151+
Given operation "ListMemberTeams" enabled
152+
And new "ListMemberTeams" request
153+
And request contains "super_team_id" parameter from "REPLACE.ME"
154+
When the request with pagination is sent
155+
Then the response status is 200 OK
156+
115157
@team:DataDog/core-app
116158
Scenario: Get all teams returns "OK" response
117159
Given new "ListTeams" request
@@ -209,6 +251,24 @@ Feature: Teams
209251
Then the response status is 200 Represents a user's association to a team
210252
And the response "data" has length 0
211253

254+
@generated @skip @team:DataDog/core-app
255+
Scenario: Remove a member team returns "API error response." response
256+
Given operation "RemoveMemberTeam" enabled
257+
And new "RemoveMemberTeam" request
258+
And request contains "super_team_id" parameter from "REPLACE.ME"
259+
And request contains "member_team_id" parameter from "REPLACE.ME"
260+
When the request is sent
261+
Then the response status is 404 API error response.
262+
263+
@generated @skip @team:DataDog/core-app
264+
Scenario: Remove a member team returns "No Content" response
265+
Given operation "RemoveMemberTeam" enabled
266+
And new "RemoveMemberTeam" request
267+
And request contains "super_team_id" parameter from "REPLACE.ME"
268+
And request contains "member_team_id" parameter from "REPLACE.ME"
269+
When the request is sent
270+
Then the response status is 204 No Content
271+
212272
@team:DataDog/core-app
213273
Scenario: Remove a team link returns "API error response." response
214274
Given new "DeleteTeamLink" request

features/v2/undo.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,6 +3241,25 @@
32413241
"type": "unsafe"
32423242
}
32433243
},
3244+
"ListMemberTeams": {
3245+
"tag": "Teams",
3246+
"undo": {
3247+
"type": "safe"
3248+
}
3249+
},
3250+
"AddMemberTeam": {
3251+
"tag": "Teams",
3252+
"undo": {
3253+
"operationId": "RemoveMemberTeam",
3254+
"type": "unsafe"
3255+
}
3256+
},
3257+
"RemoveMemberTeam": {
3258+
"tag": "Teams",
3259+
"undo": {
3260+
"type": "idempotent"
3261+
}
3262+
},
32443263
"DeleteTeam": {
32453264
"tag": "Teams",
32463265
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7264,6 +7264,47 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
72647264
},
72657265
operationResponseType: "TeamResponse",
72667266
},
7267+
"TeamsApi.V2.ListMemberTeams": {
7268+
superTeamId: {
7269+
type: "string",
7270+
format: "",
7271+
},
7272+
pageSize: {
7273+
type: "number",
7274+
format: "int64",
7275+
},
7276+
pageNumber: {
7277+
type: "number",
7278+
format: "int64",
7279+
},
7280+
fieldsTeam: {
7281+
type: "Array<TeamsField>",
7282+
format: "",
7283+
},
7284+
operationResponseType: "TeamsResponse",
7285+
},
7286+
"TeamsApi.V2.AddMemberTeam": {
7287+
superTeamId: {
7288+
type: "string",
7289+
format: "",
7290+
},
7291+
body: {
7292+
type: "AddMemberTeamRequest",
7293+
format: "",
7294+
},
7295+
operationResponseType: "{}",
7296+
},
7297+
"TeamsApi.V2.RemoveMemberTeam": {
7298+
superTeamId: {
7299+
type: "string",
7300+
format: "",
7301+
},
7302+
memberTeamId: {
7303+
type: "string",
7304+
format: "",
7305+
},
7306+
operationResponseType: "{}",
7307+
},
72677308
"TeamsApi.V2.GetTeam": {
72687309
teamId: {
72697310
type: "string",

0 commit comments

Comments
 (0)