Skip to content
Closed
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.5.1.dev2",
"regenerated": "2021-12-18 21:23:57.063817",
"spec_repo_commit": "33ea608"
"regenerated": "2021-12-19 10:48:41.042727",
"spec_repo_commit": "3934ce4"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-12-18 21:23:57.106442",
"spec_repo_commit": "33ea608"
"regenerated": "2021-12-19 10:48:41.073461",
"spec_repo_commit": "3934ce4"
}
}
}
2 changes: 2 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10035,6 +10035,7 @@ components:
type: string
id:
description: ID of the variable for global variables.
example: 123abcd4-5678-44ab-c234-d56e9999ff22
type: string
name:
description: Name of the variable.
Expand All @@ -10048,6 +10049,7 @@ components:
required:
- type
- name
- id
type: object
SyntheticsConfigVariableType:
description: Type of the configuration variable.
Expand Down
4 changes: 2 additions & 2 deletions docs/v1/SyntheticsConfigVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Name | Type | Description | Notes |
| ----------- | ------------------------------------------------------------------- | ---------------------------------------- | ---------- |
| **example** | **String** | Example for the variable. | [optional] |
| **id** | **String** | ID of the variable for global variables. | [optional] |
| **id** | **String** | ID of the variable for global variables. | |
| **name** | **String** | Name of the variable. | |
| **pattern** | **String** | Pattern of the variable. | [optional] |
| **type** | [**SyntheticsConfigVariableType**](SyntheticsConfigVariableType.md) | | |
Expand All @@ -17,7 +17,7 @@ require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::SyntheticsConfigVariable.new(
example: null,
id: null,
id: 123abcd4-5678-44ab-c234-d56e9999ff22,
name: VARIABLE_NAME,
pattern: null,
type: null
Expand Down
10 changes: 5 additions & 5 deletions features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: Synthetics
@generated @skip @team:DataDog/synthetics-app
Scenario: Create a browser test returns "- JSON format is wrong" response
Given new "CreateSyntheticsBrowserTest" request
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": "123abcd4-5678-44ab-c234-d56e9999ff22", "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
When the request is sent
Then the response status is 400 - JSON format is wrong

Expand All @@ -49,7 +49,7 @@ Feature: Synthetics
@generated @skip @team:DataDog/synthetics-app
Scenario: Create a browser test returns "Test quota is reached" response
Given new "CreateSyntheticsBrowserTest" request
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": "123abcd4-5678-44ab-c234-d56e9999ff22", "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
When the request is sent
Then the response status is 402 Test quota is reached

Expand Down Expand Up @@ -188,23 +188,23 @@ Feature: Synthetics
Scenario: Edit a browser test returns "- JSON format is wrong" response
Given new "UpdateBrowserTest" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": "123abcd4-5678-44ab-c234-d56e9999ff22", "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
When the request is sent
Then the response status is 400 - JSON format is wrong

@generated @skip @team:DataDog/synthetics-app
Scenario: Edit a browser test returns "- Synthetic Monitoring is not activated for the user" response
Given new "UpdateBrowserTest" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": "123abcd4-5678-44ab-c234-d56e9999ff22", "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
When the request is sent
Then the response status is 404 - Synthetic Monitoring is not activated for the user

@generated @skip @team:DataDog/synthetics-app
Scenario: Edit a browser test returns "OK" response
Given new "UpdateBrowserTest" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": "123abcd4-5678-44ab-c234-d56e9999ff22", "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": [null], "message": "", "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"}
When the request is sent
Then the response status is 200 OK

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @id.nil?
invalid_properties.push('invalid value for "id", id cannot be nil.')
end

if @name.nil?
invalid_properties.push('invalid value for "name", name cannot be nil.')
end
Expand All @@ -123,6 +127,7 @@ def list_invalid_properties
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @id.nil?
return false if @name.nil?
return false if @type.nil?
true
Expand Down