diff --git a/.apigentools-info b/.apigentools-info index db35717a21c1..56803c2a2f39 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.4.1.dev8", - "regenerated": "2021-05-27 08:31:57.134253", - "spec_repo_commit": "0167d3f" + "regenerated": "2021-05-27 15:02:52.776940", + "spec_repo_commit": "5311d4c" }, "v2": { "apigentools_version": "1.4.1.dev8", - "regenerated": "2021-05-27 08:32:52.834305", - "spec_repo_commit": "0167d3f" + "regenerated": "2021-05-27 15:03:51.595124", + "spec_repo_commit": "5311d4c" } } } \ No newline at end of file diff --git a/data/v1/openapi.yaml b/data/v1/openapi.yaml index f878dce6abc7..beabec35a96a 100644 --- a/data/v1/openapi.yaml +++ b/data/v1/openapi.yaml @@ -8340,8 +8340,6 @@ components: items: $ref: '#/components/schemas/SyntheticsAPIStep' type: array - required: - - assertions type: object SyntheticsAPITestResultData: description: Object containing results for your Synthetic API test. @@ -8974,6 +8972,9 @@ components: example: description: Example for the variable. type: string + id: + description: ID of the variable for global variables. + type: string name: description: Name of the variable. example: VARIABLE_NAME @@ -8984,16 +8985,17 @@ components: type: $ref: '#/components/schemas/SyntheticsConfigVariableType' required: - - example - type - name type: object SyntheticsConfigVariableType: description: Type of the configuration variable. enum: + - global - text type: string x-enum-varnames: + - GLOBAL - TEXT SyntheticsCoreWebVitals: description: Core Web Vitals attached to a browser test step. @@ -9635,8 +9637,6 @@ components: items: $ref: '#/components/schemas/SyntheticsBrowserVariable' type: array - required: - - assertions type: object SyntheticsTestDetails: description: Object containing details about your Synthetic test. diff --git a/docs/v1/SyntheticsAPITestConfig.md b/docs/v1/SyntheticsAPITestConfig.md index 305233a7bfe3..60bf64bac19c 100644 --- a/docs/v1/SyntheticsAPITestConfig.md +++ b/docs/v1/SyntheticsAPITestConfig.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | | +| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | [optional] | | **config_variables** | [**Array<SyntheticsConfigVariable>**](SyntheticsConfigVariable.md) | Array of variables used for the test. | [optional] | | **request** | [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | | [optional] | | **steps** | [**Array<SyntheticsAPIStep>**](SyntheticsAPIStep.md) | When the test subtype is `multi`, the steps of the test. | [optional] | diff --git a/docs/v1/SyntheticsConfigVariable.md b/docs/v1/SyntheticsConfigVariable.md index 96cb9c39a6aa..5c48c43af70a 100644 --- a/docs/v1/SyntheticsConfigVariable.md +++ b/docs/v1/SyntheticsConfigVariable.md @@ -4,7 +4,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **example** | **String** | Example for the variable. | | +| **example** | **String** | Example for the variable. | [optional] | +| **id** | **String** | ID of the variable for global variables. | [optional] | | **name** | **String** | Name of the variable. | | | **pattern** | **String** | Pattern of the variable. | [optional] | | **type** | [**SyntheticsConfigVariableType**](SyntheticsConfigVariableType.md) | | | @@ -16,6 +17,7 @@ require 'datadog_api_client/v1' instance = DatadogAPIClient::V1::SyntheticsConfigVariable.new( example: null, + id: null, name: VARIABLE_NAME, pattern: null, type: null diff --git a/docs/v1/SyntheticsTestConfig.md b/docs/v1/SyntheticsTestConfig.md index 3fb43b6cee42..d5a659a322d1 100644 --- a/docs/v1/SyntheticsTestConfig.md +++ b/docs/v1/SyntheticsTestConfig.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | | +| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | [optional] | | **config_variables** | [**Array<SyntheticsConfigVariable>**](SyntheticsConfigVariable.md) | API tests only - array of variables used for the test. | [optional] | | **request** | [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | | [optional] | | **variables** | [**Array<SyntheticsBrowserVariable>**](SyntheticsBrowserVariable.md) | Browser tests only - array of variables used for the test steps. | [optional] | diff --git a/features/v1/synthetics.feature b/features/v1/synthetics.feature index f861e3a1cb27..77090e7e3bdf 100644 --- a/features/v1/synthetics.feature +++ b/features/v1/synthetics.feature @@ -74,21 +74,21 @@ Feature: Synthetics @generated @skip Scenario: Create an API test returns "- JSON format is wrong" response Given new "CreateSyntheticsAPITest" request - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "global"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} When the request is sent Then the response status is 400 - JSON format is wrong @generated @skip Scenario: Create an API test returns "OK - Returns the created test details." response Given new "CreateSyntheticsAPITest" request - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "global"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} When the request is sent Then the response status is 200 OK - Returns the created test details. @generated @skip Scenario: Create an API test returns "Test quota is reached" response Given new "CreateSyntheticsAPITest" request - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "global"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} When the request is sent Then the response status is 402 Test quota is reached @@ -208,7 +208,7 @@ Feature: Synthetics Scenario: Edit an API test returns "- JSON format is wrong" response Given new "UpdateAPITest" request And request contains "public_id" parameter from "" - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "global"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -216,7 +216,7 @@ Feature: Synthetics Scenario: Edit an API test returns "- Synthetic Monitoring is not activated for the user" response Given new "UpdateAPITest" request And request contains "public_id" parameter from "" - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "global"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} When the request is sent Then the response status is 404 - Synthetic Monitoring is not activated for the user @@ -224,7 +224,7 @@ Feature: Synthetics Scenario: Edit an API test returns "OK" response Given new "UpdateAPITest" request And request contains "public_id" parameter from "" - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "global"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "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_options": {"renotify_interval": null}, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"} When the request is sent Then the response status is 200 OK diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb index bd647fe6217b..9d25d42a39d3 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb @@ -103,17 +103,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @assertions.nil? - invalid_properties.push('invalid value for "assertions", assertions cannot be nil.') - end - invalid_properties end # 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 @assertions.nil? true end diff --git a/lib/datadog_api_client/v1/models/synthetics_config_variable.rb b/lib/datadog_api_client/v1/models/synthetics_config_variable.rb index b316b67b85ee..a1844f108717 100644 --- a/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +++ b/lib/datadog_api_client/v1/models/synthetics_config_variable.rb @@ -22,6 +22,9 @@ class SyntheticsConfigVariable # Example for the variable. attr_accessor :example + # ID of the variable for global variables. + attr_accessor :id + # Name of the variable. attr_accessor :name @@ -34,6 +37,7 @@ class SyntheticsConfigVariable def self.attribute_map { :'example' => :'example', + :'id' => :'id', :'name' => :'name', :'pattern' => :'pattern', :'type' => :'type' @@ -49,6 +53,7 @@ def self.acceptable_attributes def self.openapi_types { :'example' => :'String', + :'id' => :'String', :'name' => :'String', :'pattern' => :'String', :'type' => :'SyntheticsConfigVariableType' @@ -80,6 +85,10 @@ def initialize(attributes = {}) self.example = attributes[:'example'] end + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -97,10 +106,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @example.nil? - invalid_properties.push('invalid value for "example", example cannot be nil.') - end - if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end @@ -115,7 +120,6 @@ 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 @example.nil? return false if @name.nil? return false if @type.nil? true @@ -127,6 +131,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && example == o.example && + id == o.id && name == o.name && pattern == o.pattern && type == o.type @@ -141,7 +146,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [example, name, pattern, type].hash + [example, id, name, pattern, type].hash end # Builds the object from hash diff --git a/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb b/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb index 1c0668f721d9..852886ca0d4c 100644 --- a/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +++ b/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb @@ -18,6 +18,7 @@ module DatadogAPIClient::V1 class SyntheticsConfigVariableType + GLOBAL = "global".freeze TEXT = "text".freeze # Builds the enum from string diff --git a/lib/datadog_api_client/v1/models/synthetics_test_config.rb b/lib/datadog_api_client/v1/models/synthetics_test_config.rb index 89e5add06713..ce9ba8d4172c 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_config.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_config.rb @@ -103,17 +103,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @assertions.nil? - invalid_properties.push('invalid value for "assertions", assertions cannot be nil.') - end - invalid_properties end # 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 @assertions.nil? true end