Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249789,12 +249789,6 @@ paths:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Not Found. One or more mappings requested for removal do not exist.
"409":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Conflict. One or more mappings requested for creation already exist.
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Bulk create and remove teams ownership mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.datadog.api.client.v2.model.TeamsOwnershipMappingResponse;
import com.datadog.api.client.v2.model.TeamsOwnershipMappingType;
import com.datadog.api.client.v2.model.TeamsOwnershipMatchType;
import java.util.UUID;

public class Example {
public static void main(String[] args) {
Expand All @@ -22,14 +21,13 @@ public static void main(String[] args) {
new TeamsOwnershipMappingCreateRequest()
.data(
new TeamsOwnershipMappingCreateData()
.type(TeamsOwnershipMappingType.TEAMS_OWNERSHIP_MAPPINGS)
.attributes(
new TeamsOwnershipMappingCreateDataAttributes()
.applicationId(UUID.fromString("11111111-2222-3333-4444-555555555555"))
.matchType(TeamsOwnershipMatchType.EXACT)
.service("web-checkout")
.teamHandle("team-rum")
.viewName("/checkout"))
.type(TeamsOwnershipMappingType.TEAMS_OWNERSHIP_MAPPINGS));
.viewName("/checkout-examplerumteamsownership")
.service("web-checkout-examplerumteamsownership")
.matchType(TeamsOwnershipMatchType.EXACT)));

try {
TeamsOwnershipMappingResponse result = apiInstance.createTeamsOwnershipMapping(body);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.createTeamsOwnershipMappingsBatch", true);
RumTeamsOwnershipApi apiInstance = new RumTeamsOwnershipApi(defaultClient);

TeamsOwnershipMappingBatchRequest body =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.deleteTeamsOwnershipMapping", true);
RumTeamsOwnershipApi apiInstance = new RumTeamsOwnershipApi(defaultClient);

// there is a valid "teams_ownership_mapping" in the system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.getTeamsOwnershipMapping", true);
RumTeamsOwnershipApi apiInstance = new RumTeamsOwnershipApi(defaultClient);

// there is a valid "teams_ownership_mapping" in the system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.listTeamsOwnershipMappings", true);
RumTeamsOwnershipApi apiInstance = new RumTeamsOwnershipApi(defaultClient);

// there is a valid "teams_ownership_mapping" in the system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.listTeamsOwnershipRules", true);
RumTeamsOwnershipApi apiInstance = new RumTeamsOwnershipApi(defaultClient);

// there is a valid "teams_ownership_mapping" in the system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public TeamsOwnershipMappingBatchResponse createTeamsOwnershipMappingsBatch(
* <tr><td> 400 </td><td> Bad Request. One or more operations failed validation, so none of the operations were applied. Errors are returned in the JSON:API atomic operations error format rather than the standard error response. </td><td> - </td></tr>
* <tr><td> 403 </td><td> Not Authorized </td><td> - </td></tr>
* <tr><td> 404 </td><td> Not Found. One or more mappings requested for removal do not exist. </td><td> - </td></tr>
* <tr><td> 409 </td><td> Conflict. One or more mappings requested for creation already exist. </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,54 @@ Feature: Rum Teams Ownership
And a valid "appKeyAuth" key in the system
And an instance of "RumTeamsOwnership" API

@skip @team:ddoghq/rum-backend
Scenario: Bulk create and remove teams ownership mappings returns "Bad Request" response
Given new "CreateTeamsOwnershipMappingsBatch" request
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"}}}]}
When the request is sent
Then the response status is 400 Bad Request

@skip @team:ddoghq/rum-backend
@skip-java @skip-python @team:ddoghq/rum-backend
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
Given operation "CreateTeamsOwnershipMappingsBatch" enabled
And new "CreateTeamsOwnershipMappingsBatch" request
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": "{{ unique }}", "type": "teams_ownership_mappings"}}]}
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"}}}]}
When the request is sent
Then the response status is 400 Bad Request. One or more operations failed validation, so none of the operations were applied.

@generated @skip @team:ddoghq/rum-backend
Scenario: Bulk create and remove teams ownership mappings returns "Conflict. One or more mappings requested for creation already exist." response
Given operation "CreateTeamsOwnershipMappingsBatch" enabled
And new "CreateTeamsOwnershipMappingsBatch" request
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"}}]}
When the request is sent
Then the response status is 409 Conflict. One or more mappings requested for creation already exist.

@generated @skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: Bulk create and remove teams ownership mappings returns "Not Found. One or more mappings requested for removal do not exist." response
Given operation "CreateTeamsOwnershipMappingsBatch" enabled
And new "CreateTeamsOwnershipMappingsBatch" request
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"}}]}
And body with value {"atomic:operations": [{"op": "remove", "ref": {"type": "teams_ownership_mappings", "id": "999999999"}}]}
When the request is sent
Then the response status is 404 Not Found. One or more mappings requested for removal do not exist.

@skip @team:ddoghq/rum-backend
@skip-java @team:ddoghq/rum-backend
Scenario: Bulk create and remove teams ownership mappings returns "OK" response
Given new "CreateTeamsOwnershipMappingsBatch" request
And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout-{{ unique_lower_alnum }}","service":"web-checkout-{{ unique_lower_alnum }}","match_type":"exact"}}}]}
Given operation "CreateTeamsOwnershipMappingsBatch" enabled
And new "CreateTeamsOwnershipMappingsBatch" request
And body with value {"atomic:operations": [{"op": "add", "data": {"type": "teams_ownership_mappings", "attributes": {"team_handle": "team-rum", "view_name": "/checkout-{{ unique_lower_alnum }}", "service": "web-checkout-{{ unique_lower_alnum }}", "match_type": "exact"}}}]}
When the request is sent
Then the response status is 200 OK
And the response "atomic:results[0].data.type" is equal to "teams_ownership_mappings"
And the response "atomic:results[0].data.attributes.team_handle" is equal to "team-rum"
And the response "atomic:results[0].data.attributes.match_type" is equal to "exact"

@skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: Bulk create teams ownership mappings without a service or application ID returns "Bad Request" response
Given new "CreateTeamsOwnershipMappingsBatch" request
And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout-{{ unique_lower_alnum }}","match_type":"exact"}}}]}
Given operation "CreateTeamsOwnershipMappingsBatch" enabled
And new "CreateTeamsOwnershipMappingsBatch" request
And body with value {"atomic:operations": [{"op": "add", "data": {"type": "teams_ownership_mappings", "attributes": {"team_handle": "team-rum", "view_name": "/checkout-{{ unique_lower_alnum }}", "match_type": "exact"}}}]}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/rum-backend
@skip-java @skip-python @team:ddoghq/rum-backend
Scenario: Create a teams ownership mapping returns "Bad Request" response
Given operation "CreateTeamsOwnershipMapping" enabled
And new "CreateTeamsOwnershipMapping" request
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"}}
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"}}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: Create a teams ownership mapping returns "Created" response
Given operation "CreateTeamsOwnershipMapping" enabled
And new "CreateTeamsOwnershipMapping" request
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"}}
When the request is sent
Then the response status is 201 Created

@skip @team:ddoghq/rum-backend
Scenario: Create teams ownership mapping returns "Bad Request" response
Given new "CreateTeamsOwnershipMapping" request
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"}}}
When the request is sent
Then the response status is 400 Bad Request

@skip @team:ddoghq/rum-backend
Scenario: Create teams ownership mapping returns "Created" response
Given new "CreateTeamsOwnershipMapping" request
And body with value {"data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout-{{ unique_lower_alnum }}","service":"web-checkout-{{ unique_lower_alnum }}","match_type":"exact"}}}
And body with value {"data": {"type": "teams_ownership_mappings", "attributes": {"team_handle": "team-rum", "view_name": "/checkout-{{ unique_lower_alnum }}", "service": "web-checkout-{{ unique_lower_alnum }}", "match_type": "exact"}}}
When the request is sent
Then the response status is 201 Created
And the response "data.type" is equal to "teams_ownership_mappings"
Expand All @@ -92,31 +65,35 @@ Feature: Rum Teams Ownership
And the response "data.attributes.service" is equal to "web-checkout-{{ unique_lower_alnum }}"
And the response "data.attributes.match_type" is equal to "exact"

@skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: Delete a teams ownership mapping returns "No Content" response
Given there is a valid "teams_ownership_mapping" in the system
Given operation "DeleteTeamsOwnershipMapping" enabled
And there is a valid "teams_ownership_mapping" in the system
And new "DeleteTeamsOwnershipMapping" request
And request contains "id" parameter from "teams_ownership_mapping.data.id"
When the request is sent
Then the response status is 204 No Content

@skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: Delete a teams ownership mapping returns "Not Found" response
Given new "DeleteTeamsOwnershipMapping" request
And request contains "id" parameter with value "{{ unique }}"
Given operation "DeleteTeamsOwnershipMapping" enabled
And new "DeleteTeamsOwnershipMapping" request
And request contains "id" parameter with value "999999999"
When the request is sent
Then the response status is 404 Not Found

@skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: Get a teams ownership mapping returns "Not Found" response
Given new "GetTeamsOwnershipMapping" request
And request contains "id" parameter with value "{{ unique }}"
Given operation "GetTeamsOwnershipMapping" enabled
And new "GetTeamsOwnershipMapping" request
And request contains "id" parameter with value "999999999"
When the request is sent
Then the response status is 404 Not Found

@skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: Get a teams ownership mapping returns "OK" response
Given there is a valid "teams_ownership_mapping" in the system
Given operation "GetTeamsOwnershipMapping" enabled
And there is a valid "teams_ownership_mapping" in the system
And new "GetTeamsOwnershipMapping" request
And request contains "id" parameter from "teams_ownership_mapping.data.id"
When the request is sent
Expand All @@ -127,16 +104,18 @@ Feature: Rum Teams Ownership
And the response "data.attributes.view_name" is equal to "{{ teams_ownership_mapping.data.attributes.view_name }}"
And the response "data.attributes.match_type" is equal to "exact"

@generated @skip @team:ddoghq/rum-backend
@skip-go @skip-python @team:ddoghq/rum-backend
Scenario: List teams ownership mappings returns "Bad Request" response
Given operation "ListTeamsOwnershipMappings" enabled
And new "ListTeamsOwnershipMappings" request
And request contains "filter[application_id]" parameter with value ["invalid-uuid"]
When the request is sent
Then the response status is 400 Bad Request

@skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: List teams ownership mappings returns "OK" response
Given there is a valid "teams_ownership_mapping" in the system
Given operation "ListTeamsOwnershipMappings" enabled
And there is a valid "teams_ownership_mapping" in the system
And new "ListTeamsOwnershipMappings" request
And request contains "filter[view_name]" parameter with value ["{{ teams_ownership_mapping.data.attributes.view_name }}"]
When the request is sent
Expand All @@ -148,16 +127,18 @@ Feature: Rum Teams Ownership
And the response "data[0].attributes.service" is equal to "{{ teams_ownership_mapping.data.attributes.service }}"
And the response "data[0].attributes.match_type" is equal to "exact"

@generated @skip @team:ddoghq/rum-backend
@skip-go @skip-python @team:ddoghq/rum-backend
Scenario: List teams ownership rules returns "Bad Request" response
Given operation "ListTeamsOwnershipRules" enabled
And new "ListTeamsOwnershipRules" request
And request contains "filter[application_id]" parameter with value ["invalid-uuid"]
When the request is sent
Then the response status is 400 Bad Request

@skip @team:ddoghq/rum-backend
@team:ddoghq/rum-backend
Scenario: List teams ownership rules returns "OK" response
Given there is a valid "teams_ownership_mapping" in the system
Given operation "ListTeamsOwnershipRules" enabled
And there is a valid "teams_ownership_mapping" in the system
And new "ListTeamsOwnershipRules" request
And request contains "filter[view_name]" parameter with value ["{{ teams_ownership_mapping.data.attributes.view_name }}"]
When the request is sent
Expand Down
Loading
Loading