Skip to content

Commit 94e198b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 9a344d9 of spec repo (#3181)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 019c985 commit 94e198b

6 files changed

+296
-14
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-03-31T14:58:05.044Z

cassettes/features/v2/teams/Add-a-user-to-a-team-returns-API-error-response-response.yml

Lines changed: 148 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-03-31T14:57:49.739Z

cassettes/features/v2/teams/Add-a-user-to-a-team-returns-Represents-a-user-s-association-to-a-team-response.yml

Lines changed: 125 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/v2/teams/CreateTeamMembership.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::TeamsAPI.new
55

6+
# there is a valid "dd_team" in the system
7+
DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"]
8+
9+
# there is a valid "user" in the system
10+
USER_DATA_ID = ENV["USER_DATA_ID"]
11+
612
body = DatadogAPIClient::V2::UserTeamRequest.new({
713
data: DatadogAPIClient::V2::UserTeamCreate.new({
814
attributes: DatadogAPIClient::V2::UserTeamAttributes.new({
915
role: DatadogAPIClient::V2::UserTeamRole::ADMIN,
1016
}),
1117
relationships: DatadogAPIClient::V2::UserTeamRelationships.new({
12-
team: DatadogAPIClient::V2::RelationshipToUserTeamTeam.new({
13-
data: DatadogAPIClient::V2::RelationshipToUserTeamTeamData.new({
14-
id: "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9",
15-
type: DatadogAPIClient::V2::UserTeamTeamType::TEAM,
16-
}),
17-
}),
1818
user: DatadogAPIClient::V2::RelationshipToUserTeamUser.new({
1919
data: DatadogAPIClient::V2::RelationshipToUserTeamUserData.new({
20-
id: "b8626d7e-cedd-11eb-abf5-da7ad0900001",
20+
id: USER_DATA_ID,
2121
type: DatadogAPIClient::V2::UserTeamUserType::USERS,
2222
}),
2323
}),
2424
}),
2525
type: DatadogAPIClient::V2::UserTeamType::TEAM_MEMBERSHIPS,
2626
}),
2727
})
28-
p api_instance.create_team_membership("team_id", body)
28+
p api_instance.create_team_membership(DD_TEAM_DATA_ID, body)

features/v2/teams.feature

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,28 @@ Feature: Teams
2727
When the request is sent
2828
Then the response status is 204 Added
2929

30-
@generated @skip @team:DataDog/aaa-omg
30+
@team:DataDog/aaa-omg
3131
Scenario: Add a user to a team returns "API error response." response
3232
Given new "CreateTeamMembership" request
33-
And request contains "team_id" parameter from "REPLACE.ME"
34-
And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"team": {"data": {"id": "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9", "type": "team"}}, "user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}}
33+
And there is a valid "dd_team" in the system
34+
And there is a valid "user" in the system
35+
And there is a valid "team_membership" in the system
36+
And request contains "team_id" parameter from "dd_team.data.id"
37+
And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"user": {"data": {"id": "{{user.data.id}}", "type": "users"}}}, "type": "team_memberships"}}
3538
When the request is sent
3639
Then the response status is 409 API error response.
3740

38-
@generated @skip @team:DataDog/aaa-omg
41+
@team:DataDog/aaa-omg
3942
Scenario: Add a user to a team returns "Represents a user's association to a team" response
4043
Given new "CreateTeamMembership" request
41-
And request contains "team_id" parameter from "REPLACE.ME"
42-
And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"team": {"data": {"id": "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9", "type": "team"}}, "user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}}
44+
And there is a valid "dd_team" in the system
45+
And there is a valid "user" in the system
46+
And request contains "team_id" parameter from "dd_team.data.id"
47+
And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"user": {"data": {"id": "{{user.data.id}}", "type": "users"}}}, "type": "team_memberships"}}
4348
When the request is sent
4449
Then the response status is 200 Represents a user's association to a team
50+
And the response "data.attributes.role" is equal to "admin"
51+
And the response "data.relationships.user.data.id" is equal to "{{ user.data.id }}"
4552

4653
@team:DataDog/aaa-omg
4754
Scenario: Create a team hierarchy link returns "Conflict" response

0 commit comments

Comments
 (0)