Skip to content

Commit 9ab1f75

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 60eadc2 of spec repo
1 parent e33ae0f commit 9ab1f75

File tree

10 files changed

+528
-1
lines changed

10 files changed

+528
-1
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14597,6 +14597,61 @@ components:
1459714597
oneOf:
1459814598
- $ref: '#/components/schemas/SyntheticsAPITestStep'
1459914599
- $ref: '#/components/schemas/SyntheticsAPIWaitStep'
14600+
- $ref: '#/components/schemas/SyntheticsAPISubtestStep'
14601+
SyntheticsAPISubtestStep:
14602+
description: The subtest step used in a Synthetics multi-step API test.
14603+
properties:
14604+
allowFailure:
14605+
description: Determines whether or not to continue with test if this step
14606+
fails.
14607+
type: boolean
14608+
alwaysExecute:
14609+
description: A boolean set to always execute this step even if the previous
14610+
step failed or was skipped.
14611+
type: boolean
14612+
exitIfSucceed:
14613+
description: Determines whether or not to exit the test if the step succeeds.
14614+
type: boolean
14615+
extractedValuesFromScript:
14616+
description: Generate variables using JavaScript.
14617+
type: string
14618+
id:
14619+
description: ID of the step.
14620+
example: abc-def-123
14621+
readOnly: true
14622+
type: string
14623+
isCritical:
14624+
description: 'Determines whether or not to consider the entire test as failed
14625+
if this step fails.
14626+
14627+
Can be used only if `allowFailure` is `true`.'
14628+
type: boolean
14629+
name:
14630+
description: The name of the step.
14631+
example: Example step name
14632+
type: string
14633+
retry:
14634+
$ref: '#/components/schemas/SyntheticsTestOptionsRetry'
14635+
subtestPublicId:
14636+
description: Public ID of the test to be played as part of a `playSubTest`
14637+
step type.
14638+
example: ''
14639+
type: string
14640+
subtype:
14641+
$ref: '#/components/schemas/SyntheticsAPISubtestStepSubtype'
14642+
required:
14643+
- name
14644+
- subtype
14645+
- subtestPublicId
14646+
type: object
14647+
SyntheticsAPISubtestStepSubtype:
14648+
description: The subtype of the Synthetic multi-step API subtest step.
14649+
enum:
14650+
- playSubTest
14651+
example: playSubTest
14652+
type: string
14653+
x-enum-varnames:
14654+
- PLAY_SUB_TEST
1460014655
SyntheticsAPITest:
1460114656
description: Object containing details about a Synthetic API test.
1460214657
properties:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-12-26T15:22:45.114Z

cassettes/features/v1/synthetics/Create-a-multistep-test-with-subtest-returns-OK-response.yml

Lines changed: 111 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Create a multistep test with subtest returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
5+
6+
# there is a valid "synthetics_api_test" in the system
7+
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]
8+
9+
body = DatadogAPIClient::V1::SyntheticsAPITest.new({
10+
config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
11+
steps: [
12+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
13+
assertions: [
14+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
15+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
16+
type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
17+
target: 200,
18+
}),
19+
],
20+
name: "request is sent",
21+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
22+
url: "https://httpbin.org/status/200",
23+
method: "GET",
24+
basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
25+
password: "password",
26+
username: "username",
27+
}),
28+
}),
29+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
30+
}),
31+
DatadogAPIClient::V1::SyntheticsAPISubtestStep.new({
32+
subtype: DatadogAPIClient::V1::SyntheticsAPISubtestStepSubtype::PLAY_SUB_TEST,
33+
subtest_public_id: SYNTHETICS_API_TEST_PUBLIC_ID,
34+
name: "subtest step",
35+
}),
36+
],
37+
}),
38+
locations: [
39+
"aws:us-east-2",
40+
],
41+
message: "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
42+
name: "Example-Synthetic",
43+
options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
44+
tick_every: 60,
45+
}),
46+
subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::MULTI,
47+
type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
48+
})
49+
p api_instance.create_synthetics_api_test(body)

features/v1/synthetics.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ Feature: Synthetics
169169
And the response "config.steps[5].request.basicAuth.type" is equal to "oauth-client"
170170
And the response "config.steps[6].request.basicAuth.type" is equal to "oauth-rop"
171171

172+
@team:DataDog/synthetics-managing
173+
Scenario: Create a multistep test with subtest returns "OK" response
174+
Given there is a valid "synthetics_api_test" in the system
175+
And new "CreateSyntheticsAPITest" request
176+
And body from file "synthetics_api_test_multi_step_with_subtest.json"
177+
When the request is sent
178+
Then the response status is 200 OK
179+
172180
@replay-only @team:DataDog/synthetics-managing
173181
Scenario: Create a private location returns "OK" response
174182
Given there is a valid "role" in the system
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"config": {
3+
"steps": [
4+
{
5+
"assertions": [
6+
{
7+
"operator": "is",
8+
"type": "statusCode",
9+
"target": 200
10+
}
11+
],
12+
"name": "request is sent",
13+
"request": {
14+
"url": "https://httpbin.org/status/200",
15+
"method": "GET",
16+
"basicAuth": {
17+
"password": "password",
18+
"username": "username"
19+
}
20+
},
21+
"subtype": "http"
22+
},
23+
{
24+
"subtype": "playSubTest",
25+
"subtestPublicId": "{{ synthetics_api_test.public_id }}",
26+
"name": "subtest step"
27+
}
28+
]
29+
},
30+
"locations": ["aws:us-east-2"],
31+
"message": "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
32+
"name": "{{ unique }}",
33+
"options": {
34+
"tick_every": 60
35+
},
36+
"subtype": "multi",
37+
"type": "api"
38+
}

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ def overrides
583583
"v1.sunburst_widget_legend_table_type" => "SunburstWidgetLegendTableType",
584584
"v1.sunburst_widget_request" => "SunburstWidgetRequest",
585585
"v1.synthetics_api_step" => "SyntheticsAPIStep",
586+
"v1.synthetics_api_subtest_step" => "SyntheticsAPISubtestStep",
587+
"v1.synthetics_api_subtest_step_subtype" => "SyntheticsAPISubtestStepSubtype",
586588
"v1.synthetics_api_test" => "SyntheticsAPITest",
587589
"v1.synthetics_api_test_config" => "SyntheticsAPITestConfig",
588590
"v1.synthetics_api_test_failure_code" => "SyntheticsApiTestFailureCode",

lib/datadog_api_client/v1/models/synthetics_api_step.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class << self
2727
def openapi_one_of
2828
[
2929
:'SyntheticsAPITestStep',
30-
:'SyntheticsAPIWaitStep'
30+
:'SyntheticsAPIWaitStep',
31+
:'SyntheticsAPISubtestStep'
3132
]
3233
end
3334
# Builds the object

0 commit comments

Comments
 (0)