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
451 changes: 373 additions & 78 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/v2/rum/CreateRUMApplication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
data: DatadogAPIClient::V2::RUMApplicationCreate.new({
attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({
name: "test-rum-5c67ebb32077e1d9",
type: "ios",
type: DatadogAPIClient::V2::RUMApplicationPlatformType::IOS,
}),
type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE,
}),
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/rum/CreateRUMApplication_3241419056.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
data: DatadogAPIClient::V2::RUMApplicationCreate.new({
attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({
name: "test-rum-no-default-rf-5c67ebb32077e1d9",
type: "browser",
type: DatadogAPIClient::V2::RUMApplicationPlatformType::BROWSER,
create_default_retention_filters: false,
}),
type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE,
Expand Down
4 changes: 2 additions & 2 deletions examples/v2/rum/CreateRUMApplication_4210432830.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
data: DatadogAPIClient::V2::RUMApplicationCreate.new({
attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({
name: "test-rum-with-product-scales-5c67ebb32077e1d9",
type: "browser",
type: DatadogAPIClient::V2::RUMApplicationPlatformType::BROWSER,
rum_event_processing_state: DatadogAPIClient::V2::RUMEventProcessingState::ERROR_FOCUSED_MODE,
product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionState::NONE,
product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionStateRequest::NONE,
}),
type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE,
}),
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/rum/UpdateRUMApplication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
data: DatadogAPIClient::V2::RUMApplicationUpdate.new({
attributes: DatadogAPIClient::V2::RUMApplicationUpdateAttributes.new({
name: "updated_name_for_my_existing_rum_application",
type: "browser",
type: DatadogAPIClient::V2::RUMApplicationPlatformType::BROWSER,
}),
id: RUM_APPLICATION_DATA_ID,
type: DatadogAPIClient::V2::RUMApplicationUpdateType::RUM_APPLICATION_UPDATE,
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/rum/UpdateRUMApplication_394074053.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
attributes: DatadogAPIClient::V2::RUMApplicationUpdateAttributes.new({
name: "updated_rum_with_product_scales",
rum_event_processing_state: DatadogAPIClient::V2::RUMEventProcessingState::ALL,
product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionState::MAX,
product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionStateRequest::MAX,
}),
id: RUM_APPLICATION_DATA_ID,
type: DatadogAPIClient::V2::RUMApplicationUpdateType::RUM_APPLICATION_UPDATE,
Expand Down
12 changes: 10 additions & 2 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6281,6 +6281,14 @@
"v2.AggregateRUMEvents" => {
"body" => "RUMAggregateRequest",
},
"v2.GetRUMApplications" => {
"filter_rum_enabled" => "Boolean",
"filter_product_analytics_enabled" => "Boolean",
"filter_error_focused_mode_enabled" => "Boolean",
"filter_remote_config_enabled" => "Boolean",
"filter_rum_event_processing_state" => "RUMEventProcessingState",
"filter_product_analytics_retention_state" => "RUMProductAnalyticsRetentionState",
},
"v2.CreateRUMApplication" => {
"body" => "RUMApplicationCreateRequest",
},
Expand All @@ -6296,8 +6304,8 @@
},
"v2.ListRUMEvents" => {
"filter_query" => "String",
"filter_from" => "Time",
"filter_to" => "Time",
"filter_from" => "String",
"filter_to" => "String",
"sort" => "RUMSort",
"page_cursor" => "String",
"page_limit" => "Integer",
Expand Down
41 changes: 38 additions & 3 deletions features/v2/rum.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: RUM
@generated @skip @team:ddoghq/rum-backend
Scenario: Aggregate RUM events returns "Bad Request" response
Given new "AggregateRUMEvents" request
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.time_spent", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}}
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@view.loading_time", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.name", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -33,6 +33,13 @@ Feature: RUM
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/rum-backend
Scenario: Create a new RUM application returns "Conflict" response
Given new "CreateRUMApplication" request
And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "create_default_retention_filters": false, "error_tracking_exclusion_filter_enabled": false, "name": "my_new_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "type": "rum_application_create"}}
When the request is sent
Then the response status is 409 Conflict

@skip-validation @team:ddoghq/rum-backend
Scenario: Create a new RUM application returns "Created" response
Given new "CreateRUMApplication" request
Expand Down Expand Up @@ -70,6 +77,13 @@ Feature: RUM
And the response "data.attributes.name" is equal to "test-rum-no-default-rf-{{ unique_hash }}"
And the response "data.attributes.type" is equal to "browser"

@generated @skip @team:ddoghq/rum-backend
Scenario: Delete a RUM application returns "Bad Request" response
Given new "DeleteRUMApplication" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@skip-validation @team:ddoghq/rum-backend
Scenario: Delete a RUM application returns "No Content" response
Given there is a valid "rum_application" in the system
Expand Down Expand Up @@ -138,6 +152,13 @@ Feature: RUM
When the request is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/rum-backend
Scenario: Get a RUM application returns "Bad Request" response
Given new "GetRUMApplication" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@team:ddoghq/rum-backend
Scenario: Get a RUM application returns "Not Found" response
Given new "GetRUMApplication" request
Expand Down Expand Up @@ -194,6 +215,12 @@ Feature: RUM
Then the response status is 200 OK
And the response "data.id" is equal to "00000000-0000-4000-8000-000000000001"

@generated @skip @team:ddoghq/rum-backend
Scenario: List all the RUM applications returns "Bad Request" response
Given new "GetRUMApplications" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/rum-backend
Scenario: List all the RUM applications returns "Not Found" response
Given new "GetRUMApplications" request
Expand Down Expand Up @@ -295,15 +322,15 @@ Feature: RUM
Scenario: Update a RUM application returns "Bad Request" response
Given new "UpdateRUMApplication" request
And request contains "id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}}
And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/rum-backend
Scenario: Update a RUM application returns "Not Found" response
Given new "UpdateRUMApplication" request
And request contains "id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}}
And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}}
When the request is sent
Then the response status is 404 Not Found

Expand All @@ -324,6 +351,14 @@ Feature: RUM
And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at"
And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at"

@generated @skip @team:ddoghq/rum-backend
Scenario: Update a RUM application returns "Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter." response
Given new "UpdateRUMApplication" request
And request contains "id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}}
When the request is sent
Then the response status is 422 Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter.

@skip-validation @team:ddoghq/rum-backend
Scenario: Update a RUM application returns "Unprocessable Entity." response
Given there is a valid "rum_application" in the system
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8006,6 +8006,7 @@ def overrides
"v2.rum_application_list" => "RUMApplicationList",
"v2.rum_application_list_attributes" => "RUMApplicationListAttributes",
"v2.rum_application_list_type" => "RUMApplicationListType",
"v2.rum_application_platform_type" => "RUMApplicationPlatformType",
"v2.rum_application_response" => "RUMApplicationResponse",
"v2.rum_applications_response" => "RUMApplicationsResponse",
"v2.rum_application_type" => "RUMApplicationType",
Expand Down Expand Up @@ -8144,6 +8145,7 @@ def overrides
"v2.rum_permanent_retention_filter_update_request" => "RumPermanentRetentionFilterUpdateRequest",
"v2.rum_product_analytics_retention_scale" => "RUMProductAnalyticsRetentionScale",
"v2.rum_product_analytics_retention_state" => "RUMProductAnalyticsRetentionState",
"v2.rum_product_analytics_retention_state_request" => "RUMProductAnalyticsRetentionStateRequest",
"v2.rum_product_scales" => "RUMProductScales",
"v2.rum_query_filter" => "RUMQueryFilter",
"v2.rum_query_options" => "RUMQueryOptions",
Expand Down
Loading
Loading