Skip to content

Commit 02c7858

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7dfeb73 of spec repo
1 parent 246edea commit 02c7858

39 files changed

Lines changed: 3660 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 701 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Create a teams ownership mapping returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createTeamsOwnershipMapping"] = true;
9+
const apiInstance = new v2.RumTeamsOwnershipApi(configuration);
10+
11+
const params: v2.RumTeamsOwnershipApiCreateTeamsOwnershipMappingRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
applicationId: "11111111-2222-3333-4444-555555555555",
16+
matchType: "exact",
17+
service: "web-checkout",
18+
teamHandle: "team-rum",
19+
viewName: "/checkout",
20+
},
21+
type: "teams_ownership_mappings",
22+
},
23+
},
24+
};
25+
26+
apiInstance
27+
.createTeamsOwnershipMapping(params)
28+
.then((data: v2.TeamsOwnershipMappingResponse) => {
29+
console.log(
30+
"API called successfully. Returned data: " + JSON.stringify(data)
31+
);
32+
})
33+
.catch((error: any) => console.error(error));
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Create teams ownership mapping returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumTeamsOwnershipApi(configuration);
9+
10+
const params: v2.RumTeamsOwnershipApiCreateTeamsOwnershipMappingRequest = {
11+
body: {
12+
data: {
13+
type: "teams_ownership_mappings",
14+
attributes: {
15+
teamHandle: "team-rum",
16+
viewName: "/checkout",
17+
service: "web-checkout",
18+
applicationId: "11111111-2222-3333-4444-555555555555",
19+
matchType: "exact",
20+
},
21+
},
22+
},
23+
};
24+
25+
apiInstance
26+
.createTeamsOwnershipMapping(params)
27+
.then((data: v2.TeamsOwnershipMappingResponse) => {
28+
console.log(
29+
"API called successfully. Returned data: " + JSON.stringify(data)
30+
);
31+
})
32+
.catch((error: any) => console.error(error));
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* Bulk create and remove teams ownership mappings returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumTeamsOwnershipApi(configuration);
9+
10+
const params: v2.RumTeamsOwnershipApiCreateTeamsOwnershipMappingsBatchRequest =
11+
{
12+
body: {
13+
atomicOperations: [
14+
{
15+
op: "add",
16+
data: {
17+
type: "teams_ownership_mappings",
18+
attributes: {
19+
teamHandle: "team-rum",
20+
viewName: "/checkout",
21+
service: "web-checkout",
22+
applicationId: "11111111-2222-3333-4444-555555555555",
23+
matchType: "exact",
24+
},
25+
},
26+
},
27+
{
28+
op: "remove",
29+
ref: {
30+
type: "teams_ownership_mappings",
31+
id: "456",
32+
},
33+
},
34+
],
35+
},
36+
};
37+
38+
apiInstance
39+
.createTeamsOwnershipMappingsBatch(params)
40+
.then((data: v2.TeamsOwnershipMappingBatchResponse) => {
41+
console.log(
42+
"API called successfully. Returned data: " + JSON.stringify(data)
43+
);
44+
})
45+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Delete a teams ownership mapping returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumTeamsOwnershipApi(configuration);
9+
10+
const params: v2.RumTeamsOwnershipApiDeleteTeamsOwnershipMappingRequest = {
11+
id: "123",
12+
};
13+
14+
apiInstance
15+
.deleteTeamsOwnershipMapping(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Get a teams ownership mapping returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumTeamsOwnershipApi(configuration);
9+
10+
const params: v2.RumTeamsOwnershipApiGetTeamsOwnershipMappingRequest = {
11+
id: "123",
12+
};
13+
14+
apiInstance
15+
.getTeamsOwnershipMapping(params)
16+
.then((data: v2.TeamsOwnershipMappingResponse) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* List teams ownership mappings returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumTeamsOwnershipApi(configuration);
9+
10+
apiInstance
11+
.listTeamsOwnershipMappings()
12+
.then((data: v2.TeamsOwnershipMappingsResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.catch((error: any) => console.error(error));
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* List teams ownership rules returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumTeamsOwnershipApi(configuration);
9+
10+
apiInstance
11+
.listTeamsOwnershipRules()
12+
.then((data: v2.TeamsOwnershipRulesResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15323,6 +15323,72 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1532315323
},
1532415324
"operationResponseType": "RumMetricResponse",
1532515325
},
15326+
"v2.ListTeamsOwnershipMappings": {
15327+
"filterViewName": {
15328+
"type": "Array<string>",
15329+
"format": "",
15330+
},
15331+
"filterTeamHandle": {
15332+
"type": "Array<string>",
15333+
"format": "",
15334+
},
15335+
"filterApplicationId": {
15336+
"type": "Array<string>",
15337+
"format": "",
15338+
},
15339+
"filterService": {
15340+
"type": "Array<string>",
15341+
"format": "",
15342+
},
15343+
"operationResponseType": "TeamsOwnershipMappingsResponse",
15344+
},
15345+
"v2.CreateTeamsOwnershipMapping": {
15346+
"body": {
15347+
"type": "TeamsOwnershipMappingCreateRequest",
15348+
"format": "",
15349+
},
15350+
"operationResponseType": "TeamsOwnershipMappingResponse",
15351+
},
15352+
"v2.CreateTeamsOwnershipMappingsBatch": {
15353+
"body": {
15354+
"type": "TeamsOwnershipMappingBatchRequest",
15355+
"format": "",
15356+
},
15357+
"operationResponseType": "TeamsOwnershipMappingBatchResponse",
15358+
},
15359+
"v2.GetTeamsOwnershipMapping": {
15360+
"id": {
15361+
"type": "string",
15362+
"format": "",
15363+
},
15364+
"operationResponseType": "TeamsOwnershipMappingResponse",
15365+
},
15366+
"v2.DeleteTeamsOwnershipMapping": {
15367+
"id": {
15368+
"type": "string",
15369+
"format": "",
15370+
},
15371+
"operationResponseType": "{}",
15372+
},
15373+
"v2.ListTeamsOwnershipRules": {
15374+
"filterViewName": {
15375+
"type": "Array<string>",
15376+
"format": "",
15377+
},
15378+
"filterTeamHandle": {
15379+
"type": "Array<string>",
15380+
"format": "",
15381+
},
15382+
"filterApplicationId": {
15383+
"type": "Array<string>",
15384+
"format": "",
15385+
},
15386+
"filterService": {
15387+
"type": "Array<string>",
15388+
"format": "",
15389+
},
15390+
"operationResponseType": "TeamsOwnershipRulesResponse",
15391+
},
1532615392
"v2.CreateRUMOperation": {
1532715393
"body": {
1532815394
"type": "RUMOperationCreateRequest",
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
@endpoint(rum-teams-ownership) @endpoint(rum-teams-ownership-v2)
2+
Feature: Rum Teams Ownership
3+
Manage [teams ownership](https://docs.datadoghq.com/real_user_monitoring/p
4+
latform/ownership/) mappings between RUM views and the teams that own
5+
them.
6+
7+
Background:
8+
Given a valid "apiKeyAuth" key in the system
9+
And a valid "appKeyAuth" key in the system
10+
And an instance of "RumTeamsOwnership" API
11+
12+
@team:DataDog/rum-backend
13+
Scenario: Bulk create and remove teams ownership mappings returns "Bad Request" response
14+
Given new "CreateTeamsOwnershipMappingsBatch" request
15+
And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"invalid-uuid","match_type":"exact"}}}]}
16+
When the request is sent
17+
Then the response status is 400 Bad Request
18+
19+
@generated @skip @team:DataDog/rum-backend
20+
Scenario: Bulk create and remove teams ownership mappings returns "Bad Request. One or more operations failed validation, so none of the operations were applied." response
21+
Given operation "CreateTeamsOwnershipMappingsBatch" enabled
22+
And new "CreateTeamsOwnershipMappingsBatch" request
23+
And body with value {"atomic:operations": [{"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}, "op": "add", "ref": {"id": "456", "type": "teams_ownership_mappings"}}]}
24+
When the request is sent
25+
Then the response status is 400 Bad Request. One or more operations failed validation, so none of the operations were applied.
26+
27+
@team:DataDog/rum-backend
28+
Scenario: Bulk create and remove teams ownership mappings returns "OK" response
29+
Given new "CreateTeamsOwnershipMappingsBatch" request
30+
And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"11111111-2222-3333-4444-555555555555","match_type":"exact"}}},{"op":"remove","ref":{"type":"teams_ownership_mappings","id":"456"}}]}
31+
When the request is sent
32+
Then the response status is 200 OK
33+
And the response "atomic:results[0].data.type" is equal to "teams_ownership_mappings"
34+
And the response "atomic:results[0].data.attributes.team_handle" is equal to "team-rum"
35+
And the response "atomic:results[0].data.attributes.match_type" is equal to "exact"
36+
37+
@generated @skip @team:DataDog/rum-backend
38+
Scenario: Create a teams ownership mapping returns "Bad Request" response
39+
Given operation "CreateTeamsOwnershipMapping" enabled
40+
And new "CreateTeamsOwnershipMapping" request
41+
And body with value {"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}}
42+
When the request is sent
43+
Then the response status is 400 Bad Request
44+
45+
@generated @skip @team:DataDog/rum-backend
46+
Scenario: Create a teams ownership mapping returns "Created" response
47+
Given operation "CreateTeamsOwnershipMapping" enabled
48+
And new "CreateTeamsOwnershipMapping" request
49+
And body with value {"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}}
50+
When the request is sent
51+
Then the response status is 201 Created
52+
53+
@team:DataDog/rum-backend
54+
Scenario: Create teams ownership mapping returns "Bad Request" response
55+
Given new "CreateTeamsOwnershipMapping" request
56+
And body with value {"data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"invalid-uuid","match_type":"exact"}}}
57+
When the request is sent
58+
Then the response status is 400 Bad Request
59+
60+
@team:DataDog/rum-backend
61+
Scenario: Create teams ownership mapping returns "Created" response
62+
Given new "CreateTeamsOwnershipMapping" request
63+
And body with value {"data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"11111111-2222-3333-4444-555555555555","match_type":"exact"}}}
64+
When the request is sent
65+
Then the response status is 201 Created
66+
And the response "data.type" is equal to "teams_ownership_mappings"
67+
And the response "data.attributes.team_handle" is equal to "team-rum"
68+
And the response "data.attributes.view_name" is equal to "/checkout"
69+
And the response "data.attributes.service" is equal to "web-checkout"
70+
And the response "data.attributes.application_id" is equal to "11111111-2222-3333-4444-555555555555"
71+
And the response "data.attributes.match_type" is equal to "exact"
72+
73+
@team:DataDog/rum-backend
74+
Scenario: Delete a teams ownership mapping returns "No Content" response
75+
Given new "DeleteTeamsOwnershipMapping" request
76+
And request contains "id" parameter with value "123"
77+
When the request is sent
78+
Then the response status is 204 No Content
79+
80+
@team:DataDog/rum-backend
81+
Scenario: Delete a teams ownership mapping returns "Not Found" response
82+
Given new "DeleteTeamsOwnershipMapping" request
83+
And request contains "id" parameter with value "{{ unique }}"
84+
When the request is sent
85+
Then the response status is 404 Not Found
86+
87+
@team:DataDog/rum-backend
88+
Scenario: Get a teams ownership mapping returns "Not Found" response
89+
Given new "GetTeamsOwnershipMapping" request
90+
And request contains "id" parameter with value "{{ unique }}"
91+
When the request is sent
92+
Then the response status is 404 Not Found
93+
94+
@team:DataDog/rum-backend
95+
Scenario: Get a teams ownership mapping returns "OK" response
96+
Given new "GetTeamsOwnershipMapping" request
97+
And request contains "id" parameter with value "123"
98+
When the request is sent
99+
Then the response status is 200 OK
100+
And the response "data.id" is equal to "123"
101+
And the response "data.type" is equal to "teams_ownership_mappings"
102+
And the response "data.attributes.team_handle" is equal to "team-rum"
103+
And the response "data.attributes.view_name" is equal to "/checkout"
104+
And the response "data.attributes.match_type" is equal to "exact"
105+
106+
@team:DataDog/rum-backend
107+
Scenario: List teams ownership mappings returns "OK" response
108+
Given new "ListTeamsOwnershipMappings" request
109+
When the request is sent
110+
Then the response status is 200 OK
111+
And the response "data" has length 1
112+
And the response "data[0].type" is equal to "teams_ownership_mappings"
113+
And the response "data[0].attributes.team_handle" is equal to "team-rum"
114+
And the response "data[0].attributes.view_name" is equal to "/checkout"
115+
And the response "data[0].attributes.service" is equal to "web-checkout"
116+
And the response "data[0].attributes.application_id" is equal to "11111111-2222-3333-4444-555555555555"
117+
And the response "data[0].attributes.match_type" is equal to "exact"
118+
119+
@team:DataDog/rum-backend
120+
Scenario: List teams ownership rules returns "OK" response
121+
Given new "ListTeamsOwnershipRules" request
122+
When the request is sent
123+
Then the response status is 200 OK
124+
And the response "data" has length 1
125+
And the response "data[0].type" is equal to "teams_ownership_grouped_mappings"
126+
And the response "data[0].attributes.view_name" is equal to "/checkout"
127+
And the response "data[0].attributes.match_type" is equal to "exact"

0 commit comments

Comments
 (0)