Skip to content

Commit 82fab0a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c866478 of spec repo
1 parent b25c67e commit 82fab0a

33 files changed

+3305
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 441 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Synthetics: Create a test suite returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
6+
body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({
7+
data: DatadogAPIClient::V2::SuiteCreateEdit.new({
8+
attributes: DatadogAPIClient::V2::SyntheticsSuite.new({
9+
message: "Notification message",
10+
name: "Example suite name",
11+
options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({
12+
alerting: DatadogAPIClient::V2::SyntheticsSuiteOptionsAlerting.new({}),
13+
}),
14+
tags: [
15+
"env:production",
16+
],
17+
tests: [
18+
DatadogAPIClient::V2::SyntheticsSuiteTest.new({
19+
alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL,
20+
public_id: "",
21+
}),
22+
],
23+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
24+
}),
25+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
26+
}),
27+
})
28+
p api_instance.create_synthetics_suite(body)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Synthetics: Bulk delete suites returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
6+
body = DatadogAPIClient::V2::DeletedSuitesRequestDeleteRequest.new({
7+
data: DatadogAPIClient::V2::DeletedSuitesRequestDelete.new({
8+
attributes: DatadogAPIClient::V2::DeletedSuitesRequestDeleteAttributes.new({
9+
public_ids: [
10+
"",
11+
],
12+
}),
13+
type: DatadogAPIClient::V2::DeletedSuitesRequestType::DELETE_SUITES_REQUEST,
14+
}),
15+
})
16+
p api_instance.delete_synthetics_suites(body)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Synthetics: edit a test suite returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
6+
body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({
7+
data: DatadogAPIClient::V2::SuiteCreateEdit.new({
8+
attributes: DatadogAPIClient::V2::SyntheticsSuite.new({
9+
message: "Notification message",
10+
name: "Example suite name",
11+
options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({
12+
alerting: DatadogAPIClient::V2::SyntheticsSuiteOptionsAlerting.new({}),
13+
}),
14+
tags: [
15+
"env:production",
16+
],
17+
tests: [
18+
DatadogAPIClient::V2::SyntheticsSuiteTest.new({
19+
alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL,
20+
public_id: "",
21+
}),
22+
],
23+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
24+
}),
25+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
26+
}),
27+
})
28+
p api_instance.edit_synthetics_suite("public_id", body)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Synthetics: Get a suite returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.get_synthetics_suite("public_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Search Synthetics suites returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.search_suites()

features/scenarios_model_mapping.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,6 +3090,26 @@
30903090
"v2.SetOnDemandConcurrencyCap" => {
30913091
"body" => "OnDemandConcurrencyCapAttributes",
30923092
},
3093+
"v2.CreateSyntheticsSuite" => {
3094+
"body" => "SuiteCreateEditRequest",
3095+
},
3096+
"v2.DeleteSyntheticsSuites" => {
3097+
"body" => "DeletedSuitesRequestDeleteRequest",
3098+
},
3099+
"v2.SearchSuites" => {
3100+
"query" => "String",
3101+
"sort" => "String",
3102+
"facets_only" => "Boolean",
3103+
"start" => "Integer",
3104+
"count" => "Integer",
3105+
},
3106+
"v2.GetSyntheticsSuite" => {
3107+
"public_id" => "String",
3108+
},
3109+
"v2.EditSyntheticsSuite" => {
3110+
"public_id" => "String",
3111+
"body" => "SuiteCreateEditRequest",
3112+
},
30933113
"v2.ListTeams" => {
30943114
"page_number" => "Integer",
30953115
"page_size" => "Integer",

features/v2/synthetics.feature

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,73 @@ Feature: Synthetics
2727
When the request is sent
2828
Then the response status is 200 OK
2929
And the response "data.attributes.on_demand_concurrency_cap" is equal to 20
30+
31+
@generated @skip @team:DataDog/synthetics-managing
32+
Scenario: Search Synthetics suites returns "API error response." response
33+
Given new "SearchSuites" request
34+
When the request is sent
35+
Then the response status is 400 API error response.
36+
37+
@generated @skip @team:DataDog/synthetics-managing
38+
Scenario: Search Synthetics suites returns "OK" response
39+
Given new "SearchSuites" request
40+
When the request is sent
41+
Then the response status is 200 OK
42+
43+
@generated @skip @team:DataDog/synthetics-managing
44+
Scenario: Synthetics: Bulk delete suites returns "API error response." response
45+
Given new "DeleteSyntheticsSuites" request
46+
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
47+
When the request is sent
48+
Then the response status is 400 API error response.
49+
50+
@generated @skip @team:DataDog/synthetics-managing
51+
Scenario: Synthetics: Bulk delete suites returns "OK" response
52+
Given new "DeleteSyntheticsSuites" request
53+
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
54+
When the request is sent
55+
Then the response status is 200 OK
56+
57+
@generated @skip @team:DataDog/synthetics-managing
58+
Scenario: Synthetics: Create a test suite returns "API error response." response
59+
Given new "CreateSyntheticsSuite" request
60+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
61+
When the request is sent
62+
Then the response status is 400 API error response.
63+
64+
@generated @skip @team:DataDog/synthetics-managing
65+
Scenario: Synthetics: Create a test suite returns "OK" response
66+
Given new "CreateSyntheticsSuite" request
67+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
68+
When the request is sent
69+
Then the response status is 200 OK
70+
71+
@generated @skip @team:DataDog/synthetics-managing
72+
Scenario: Synthetics: Get a suite returns "API error response." response
73+
Given new "GetSyntheticsSuite" request
74+
And request contains "public_id" parameter from "REPLACE.ME"
75+
When the request is sent
76+
Then the response status is 404 API error response.
77+
78+
@generated @skip @team:DataDog/synthetics-managing
79+
Scenario: Synthetics: Get a suite returns "OK" response
80+
Given new "GetSyntheticsSuite" request
81+
And request contains "public_id" parameter from "REPLACE.ME"
82+
When the request is sent
83+
Then the response status is 200 OK
84+
85+
@generated @skip @team:DataDog/synthetics-managing
86+
Scenario: Synthetics: edit a test suite returns "API error response." response
87+
Given new "EditSyntheticsSuite" request
88+
And request contains "public_id" parameter from "REPLACE.ME"
89+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
90+
When the request is sent
91+
Then the response status is 400 API error response.
92+
93+
@generated @skip @team:DataDog/synthetics-managing
94+
Scenario: Synthetics: edit a test suite returns "OK" response
95+
Given new "EditSyntheticsSuite" request
96+
And request contains "public_id" parameter from "REPLACE.ME"
97+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
98+
When the request is sent
99+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4284,6 +4284,40 @@
42844284
"type": "safe"
42854285
}
42864286
},
4287+
"CreateSyntheticsSuite": {
4288+
"tag": "Synthetics",
4289+
"undo": {
4290+
"operationId": "TODO",
4291+
"parameters": [],
4292+
"type": "unsafe"
4293+
}
4294+
},
4295+
"DeleteSyntheticsSuites": {
4296+
"tag": "Synthetics",
4297+
"undo": {
4298+
"operationId": "TODO",
4299+
"parameters": [],
4300+
"type": "unsafe"
4301+
}
4302+
},
4303+
"SearchSuites": {
4304+
"tag": "Synthetics",
4305+
"undo": {
4306+
"type": "safe"
4307+
}
4308+
},
4309+
"GetSyntheticsSuite": {
4310+
"tag": "Synthetics",
4311+
"undo": {
4312+
"type": "safe"
4313+
}
4314+
},
4315+
"EditSyntheticsSuite": {
4316+
"tag": "Synthetics",
4317+
"undo": {
4318+
"type": "idempotent"
4319+
}
4320+
},
42874321
"ListTagPipelinesRulesets": {
42884322
"tag": "Cloud Cost Management",
42894323
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,6 +1883,14 @@ def overrides
18831883
"v2.delete_apps_response" => "DeleteAppsResponse",
18841884
"v2.delete_apps_response_data_items" => "DeleteAppsResponseDataItems",
18851885
"v2.delete_custom_framework_response" => "DeleteCustomFrameworkResponse",
1886+
"v2.deleted_suite_response_data" => "DeletedSuiteResponseData",
1887+
"v2.deleted_suite_response_data_attributes" => "DeletedSuiteResponseDataAttributes",
1888+
"v2.deleted_suites_request_delete" => "DeletedSuitesRequestDelete",
1889+
"v2.deleted_suites_request_delete_attributes" => "DeletedSuitesRequestDeleteAttributes",
1890+
"v2.deleted_suites_request_delete_request" => "DeletedSuitesRequestDeleteRequest",
1891+
"v2.deleted_suites_request_type" => "DeletedSuitesRequestType",
1892+
"v2.deleted_suites_response" => "DeletedSuitesResponse",
1893+
"v2.deleted_suite_type" => "DeletedSuiteType",
18861894
"v2.dependency_location" => "DependencyLocation",
18871895
"v2.deployment" => "Deployment",
18881896
"v2.deployment_attributes" => "DeploymentAttributes",
@@ -4179,6 +4187,20 @@ def overrides
41794187
"v2.step" => "Step",
41804188
"v2.step_display" => "StepDisplay",
41814189
"v2.step_display_bounds" => "StepDisplayBounds",
4190+
"v2.suite_create_edit" => "SuiteCreateEdit",
4191+
"v2.suite_create_edit_request" => "SuiteCreateEditRequest",
4192+
"v2.suite_search_response_type" => "SuiteSearchResponseType",
4193+
"v2.synthetics_suite" => "SyntheticsSuite",
4194+
"v2.synthetics_suite_options" => "SyntheticsSuiteOptions",
4195+
"v2.synthetics_suite_options_alerting" => "SyntheticsSuiteOptionsAlerting",
4196+
"v2.synthetics_suite_response" => "SyntheticsSuiteResponse",
4197+
"v2.synthetics_suite_response_data" => "SyntheticsSuiteResponseData",
4198+
"v2.synthetics_suite_search_response" => "SyntheticsSuiteSearchResponse",
4199+
"v2.synthetics_suite_search_response_data" => "SyntheticsSuiteSearchResponseData",
4200+
"v2.synthetics_suite_search_response_data_attributes" => "SyntheticsSuiteSearchResponseDataAttributes",
4201+
"v2.synthetics_suite_test" => "SyntheticsSuiteTest",
4202+
"v2.synthetics_suite_test_alerting_criticality" => "SyntheticsSuiteTestAlertingCriticality",
4203+
"v2.synthetics_suite_type" => "SyntheticsSuiteType",
41824204
"v2.table_result_v2" => "TableResultV2",
41834205
"v2.table_result_v2_array" => "TableResultV2Array",
41844206
"v2.table_result_v2_data" => "TableResultV2Data",

0 commit comments

Comments
 (0)