Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-19 21:12:16.150137",
"spec_repo_commit": "2e48953d"
"regenerated": "2024-11-20 20:14:17.376953",
"spec_repo_commit": "ebf27b5e"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-19 21:12:16.168656",
"spec_repo_commit": "2e48953d"
"regenerated": "2024-11-20 20:14:17.395595",
"spec_repo_commit": "ebf27b5e"
}
}
}
290 changes: 157 additions & 133 deletions .generator/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .generator/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
[tool.poetry.dependencies]
python = "^3.10"
click = "^8.1.4"
PyYAML = "^6.0"
pyyaml = "^6.0"
jsonref = "^1.1.0"
jinja2 = "^3.1.2"
pytest = "^7.4.0"
Expand Down
34 changes: 2 additions & 32 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15178,34 +15178,8 @@ components:
type: object
SyntheticsDeviceID:
description: The device ID.
enum:
- laptop_large
- tablet
- mobile_small
- chrome.laptop_large
- chrome.tablet
- chrome.mobile_small
- firefox.laptop_large
- firefox.tablet
- firefox.mobile_small
- edge.laptop_large
- edge.tablet
- edge.mobile_small
example: chrome.laptop_large
type: string
x-enum-varnames:
- LAPTOP_LARGE
- TABLET
- MOBILE_SMALL
- CHROME_LAPTOP_LARGE
- CHROME_TABLET
- CHROME_MOBILE_SMALL
- FIREFOX_LAPTOP_LARGE
- FIREFOX_TABLET
- FIREFOX_MOBILE_SMALL
- EDGE_LAPTOP_LARGE
- EDGE_TABLET
- EDGE_MOBILE_SMALL
SyntheticsFetchUptimesPayload:
description: Object containing IDs of Synthetic tests and a timeframe.
properties:
Expand Down Expand Up @@ -15508,10 +15482,6 @@ components:
$ref: '#/components/schemas/SyntheticsLocation'
type: array
type: object
SyntheticsMobileDeviceID:
description: The device ID.
example: synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
type: string
SyntheticsMobileStep:
description: The steps used in a Synthetic mobile test.
properties:
Expand Down Expand Up @@ -15787,7 +15757,7 @@ components:
device_ids:
description: Array with the different device IDs used to run the test.
items:
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
$ref: '#/components/schemas/SyntheticsDeviceID'
type: array
message:
description: Notification message associated with the test.
Expand Down Expand Up @@ -15876,7 +15846,7 @@ components:
example:
- synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
items:
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
$ref: '#/components/schemas/SyntheticsDeviceID'
type: array
disableAutoAcceptAlert:
description: A boolean to disable auto accepting alerts.
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/synthetics/CreateSyntheticsAPITest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::BLOCKING,
}),
device_ids: [
DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
"chrome.laptop_large",
],
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/synthetics/CreateSyntheticsBrowserTest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
accept_self_signed: false,
allow_insecure: true,
device_ids: [
DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
"chrome.laptop_large",
],
disable_cors: true,
follow_redirects: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
accept_self_signed: false,
allow_insecure: true,
device_ids: [
DatadogAPIClient::V1::SyntheticsDeviceID::TABLET,
"tablet",
],
disable_cors: true,
follow_redirects: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
accept_self_signed: false,
allow_insecure: true,
device_ids: [
DatadogAPIClient::V1::SyntheticsDeviceID::TABLET,
"tablet",
],
disable_cors: true,
follow_redirects: true,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/synthetics/TriggerCITests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
username: "my_username",
}),
device_ids: [
DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
"chrome.laptop_large",
],
locations: [
"aws:eu-west-3",
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/synthetics/UpdateBrowserTest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::BLOCKING,
}),
device_ids: [
DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
"chrome.laptop_large",
],
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
Expand Down
8 changes: 4 additions & 4 deletions features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Feature: Synthetics
@generated @skip @team:DataDog/synthetics-ct
Scenario: Create a mobile test returns "- JSON format is wrong" response
Given new "CreateSyntheticsMobileTest" request
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 400 - JSON format is wrong

Expand All @@ -147,7 +147,7 @@ Feature: Synthetics
@generated @skip @team:DataDog/synthetics-ct
Scenario: Create a mobile test returns "Test quota is reached" response
Given new "CreateSyntheticsMobileTest" request
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 402 Test quota is reached

Expand Down Expand Up @@ -361,15 +361,15 @@ Feature: Synthetics
Scenario: Edit a Mobile test returns "- JSON format is wrong" response
Given new "UpdateMobileTest" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 400 - JSON format is wrong

@generated @skip @team:DataDog/synthetics-ct
Scenario: Edit a Mobile test returns "- Synthetic Monitoring is not activated for the user" response
Given new "UpdateMobileTest" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 404 - Synthetic Monitoring is not activated for the user

Expand Down
1 change: 0 additions & 1 deletion lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ def overrides
"v1.synthetics_delete_tests_payload" => "SyntheticsDeleteTestsPayload",
"v1.synthetics_delete_tests_response" => "SyntheticsDeleteTestsResponse",
"v1.synthetics_device" => "SyntheticsDevice",
"v1.synthetics_device_id" => "SyntheticsDeviceID",
"v1.synthetics_fetch_uptimes_payload" => "SyntheticsFetchUptimesPayload",
"v1.synthetics_get_api_test_latest_results_response" => "SyntheticsGetAPITestLatestResultsResponse",
"v1.synthetics_get_browser_test_latest_results_response" => "SyntheticsGetBrowserTestLatestResultsResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'device' => :'SyntheticsDeviceID',
:'device' => :'String',
:'duration' => :'Float',
:'execution_rule' => :'SyntheticsTestExecutionRule',
:'location' => :'String',
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v1/models/synthetics_ci_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def self.openapi_types
:'body' => :'String',
:'body_type' => :'String',
:'cookies' => :'String',
:'device_ids' => :'Array<SyntheticsDeviceID>',
:'device_ids' => :'Array<String>',
:'follow_redirects' => :'Boolean',
:'headers' => :'Hash<String, String>',
:'locations' => :'Array<String>',
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v1/models/synthetics_device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def self.attribute_map
def self.openapi_types
{
:'height' => :'Integer',
:'id' => :'SyntheticsDeviceID',
:'id' => :'String',
:'is_mobile' => :'Boolean',
:'name' => :'String',
:'width' => :'Integer'
Expand Down
37 changes: 0 additions & 37 deletions lib/datadog_api_client/v1/models/synthetics_device_id.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def self.openapi_types
:'allow_insecure' => :'Boolean',
:'check_certificate_revocation' => :'Boolean',
:'ci' => :'SyntheticsTestCiOptions',
:'device_ids' => :'Array<SyntheticsDeviceID>',
:'device_ids' => :'Array<String>',
:'disable_cors' => :'Boolean',
:'disable_csp' => :'Boolean',
:'enable_profiling' => :'Boolean',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'device' => :'SyntheticsDeviceID',
:'device' => :'String',
:'location' => :'Integer',
:'public_id' => :'String',
:'result_id' => :'String'
Expand Down
Loading
Loading