Skip to content

Commit e8ccec6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f7dab9c1 of spec repo
1 parent 6166914 commit e8ccec6

File tree

7 files changed

+31
-5
lines changed

7 files changed

+31
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-04-15 13:32:56.776195",
8-
"spec_repo_commit": "5c7e123b"
7+
"regenerated": "2024-04-17 12:12:56.925595",
8+
"spec_repo_commit": "f7dab9c1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-04-15 13:32:56.793599",
13-
"spec_repo_commit": "5c7e123b"
12+
"regenerated": "2024-04-17 12:12:56.942362",
13+
"spec_repo_commit": "f7dab9c1"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13446,6 +13446,10 @@ components:
1344613446
items:
1344713447
$ref: '#/components/schemas/SyntheticsAPIStep'
1344813448
type: array
13449+
variablesFromScript:
13450+
description: Variables defined from JavaScript code for API HTTP tests.
13451+
example: dd.variable.set("FOO", "foo")
13452+
type: string
1344913453
type: object
1345013454
SyntheticsAPITestResultData:
1345113455
description: Object containing results for your Synthetic API test.
@@ -15514,6 +15518,10 @@ components:
1551415518
items:
1551515519
$ref: '#/components/schemas/SyntheticsBrowserVariable'
1551615520
type: array
15521+
variablesFromScript:
15522+
description: Variables defined from JavaScript code for API HTTP tests.
15523+
example: dd.variable.set("FOO", "foo")
15524+
type: string
1551715525
type: object
1551815526
SyntheticsTestDetails:
1551915527
description: Object containing details about your Synthetic test.

examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
type=SyntheticsConfigVariableType.TEXT,
7979
),
8080
],
81+
variables_from_script='dd.variable.set("FOO", "foo")',
8182
request=SyntheticsTestRequest(
8283
certificate=SyntheticsTestRequestCertificate(
8384
cert=SyntheticsTestRequestCertificateItem(

src/datadog_api_client/v1/model/synthetics_api_test_config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ def openapi_types(_):
3636
"config_variables": ([SyntheticsConfigVariable],),
3737
"request": (SyntheticsTestRequest,),
3838
"steps": ([SyntheticsAPIStep],),
39+
"variables_from_script": (str,),
3940
}
4041

4142
attribute_map = {
4243
"assertions": "assertions",
4344
"config_variables": "configVariables",
4445
"request": "request",
4546
"steps": "steps",
47+
"variables_from_script": "variablesFromScript",
4648
}
4749

4850
def __init__(
@@ -61,6 +63,7 @@ def __init__(
6163
config_variables: Union[List[SyntheticsConfigVariable], UnsetType] = unset,
6264
request: Union[SyntheticsTestRequest, UnsetType] = unset,
6365
steps: Union[List[SyntheticsAPIStep], UnsetType] = unset,
66+
variables_from_script: Union[str, UnsetType] = unset,
6467
**kwargs,
6568
):
6669
"""
@@ -77,6 +80,9 @@ def __init__(
7780
7881
:param steps: When the test subtype is ``multi`` , the steps of the test.
7982
:type steps: [SyntheticsAPIStep], optional
83+
84+
:param variables_from_script: Variables defined from JavaScript code for API HTTP tests.
85+
:type variables_from_script: str, optional
8086
"""
8187
if assertions is not unset:
8288
kwargs["assertions"] = assertions
@@ -86,4 +92,6 @@ def __init__(
8692
kwargs["request"] = request
8793
if steps is not unset:
8894
kwargs["steps"] = steps
95+
if variables_from_script is not unset:
96+
kwargs["variables_from_script"] = variables_from_script
8997
super().__init__(kwargs)

src/datadog_api_client/v1/model/synthetics_test_config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ def openapi_types(_):
3636
"config_variables": ([SyntheticsConfigVariable],),
3737
"request": (SyntheticsTestRequest,),
3838
"variables": ([SyntheticsBrowserVariable],),
39+
"variables_from_script": (str,),
3940
}
4041

4142
attribute_map = {
4243
"assertions": "assertions",
4344
"config_variables": "configVariables",
4445
"request": "request",
4546
"variables": "variables",
47+
"variables_from_script": "variablesFromScript",
4648
}
4749

4850
def __init__(
@@ -61,6 +63,7 @@ def __init__(
6163
config_variables: Union[List[SyntheticsConfigVariable], UnsetType] = unset,
6264
request: Union[SyntheticsTestRequest, UnsetType] = unset,
6365
variables: Union[List[SyntheticsBrowserVariable], UnsetType] = unset,
66+
variables_from_script: Union[str, UnsetType] = unset,
6467
**kwargs,
6568
):
6669
"""
@@ -77,6 +80,9 @@ def __init__(
7780
7881
:param variables: Browser tests only - array of variables used for the test steps.
7982
:type variables: [SyntheticsBrowserVariable], optional
83+
84+
:param variables_from_script: Variables defined from JavaScript code for API HTTP tests.
85+
:type variables_from_script: str, optional
8086
"""
8187
if assertions is not unset:
8288
kwargs["assertions"] = assertions
@@ -86,4 +92,6 @@ def __init__(
8692
kwargs["request"] = request
8793
if variables is not unset:
8894
kwargs["variables"] = variables
95+
if variables_from_script is not unset:
96+
kwargs["variables_from_script"] = variables_from_script
8997
super().__init__(kwargs)

tests/v1/features/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
"parameters": [
239239
{
240240
"name": "body",
241-
"value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n { \"operator\": \"lessThan\", \"target\": 2000, \"type\": \"responseTime\", \"timingsScope\": \"withoutDNS\" },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n },\n \"persistCookies\": true\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n"
241+
"value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n { \"operator\": \"lessThan\", \"target\": 2000, \"type\": \"responseTime\", \"timingsScope\": \"withoutDNS\" },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"variablesFromScript\": \"dd.variable.set(\\\"FOO\\\", \\\"foo\\\")\",\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n },\n \"persistCookies\": true\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n"
242242
}
243243
],
244244
"step": "there is a valid \"synthetics_api_test\" in the system",

tests/v1/features/synthetics_api_http_test_payload.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"type": "text"
3636
}
3737
],
38+
"variablesFromScript": "dd.variable.set(\"FOO\", \"foo\")",
3839
"request": {
3940
"certificate": {
4041
"cert": {

0 commit comments

Comments
 (0)