Skip to content

Commit 9055d23

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a2d95f0 of spec repo
1 parent 73a6de3 commit 9055d23

33 files changed

+3205
-1
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 440 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
tags: [
13+
"env:production",
14+
],
15+
tests: [
16+
DatadogAPIClient::V2::SyntheticsSuiteTest.new({
17+
alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL,
18+
public_id: "",
19+
}),
20+
],
21+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
22+
}),
23+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
24+
}),
25+
})
26+
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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
tags: [
13+
"env:production",
14+
],
15+
tests: [
16+
DatadogAPIClient::V2::SyntheticsSuiteTest.new({
17+
alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL,
18+
public_id: "",
19+
}),
20+
],
21+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
22+
}),
23+
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
24+
}),
25+
})
26+
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
@@ -3130,6 +3130,26 @@
31303130
"v2.SetOnDemandConcurrencyCap" => {
31313131
"body" => "OnDemandConcurrencyCapAttributes",
31323132
},
3133+
"v2.CreateSyntheticsSuite" => {
3134+
"body" => "SuiteCreateEditRequest",
3135+
},
3136+
"v2.DeleteSyntheticsSuites" => {
3137+
"body" => "DeletedSuitesRequestDeleteRequest",
3138+
},
3139+
"v2.SearchSuites" => {
3140+
"query" => "String",
3141+
"sort" => "String",
3142+
"facets_only" => "Boolean",
3143+
"start" => "Integer",
3144+
"count" => "Integer",
3145+
},
3146+
"v2.GetSyntheticsSuite" => {
3147+
"public_id" => "String",
3148+
},
3149+
"v2.EditSyntheticsSuite" => {
3150+
"public_id" => "String",
3151+
"body" => "SuiteCreateEditRequest",
3152+
},
31333153
"v2.ListTeams" => {
31343154
"page_number" => "Integer",
31353155
"page_size" => "Integer",

features/v2/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
"parameters": [
351351
{
352352
"name": "body",
353-
"value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate-{{ unique_lower_alnum }}\",\n \"dry_run\": false\n }\n }\n}"
353+
"value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}"
354354
}
355355
],
356356
"step": "there is a valid \"deployment_gate\" in the system",

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": {}, "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": {}, "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": {}, "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": {}, "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
@@ -4357,6 +4357,40 @@
43574357
"type": "safe"
43584358
}
43594359
},
4360+
"CreateSyntheticsSuite": {
4361+
"tag": "Synthetics",
4362+
"undo": {
4363+
"operationId": "TODO",
4364+
"parameters": [],
4365+
"type": "unsafe"
4366+
}
4367+
},
4368+
"DeleteSyntheticsSuites": {
4369+
"tag": "Synthetics",
4370+
"undo": {
4371+
"operationId": "TODO",
4372+
"parameters": [],
4373+
"type": "unsafe"
4374+
}
4375+
},
4376+
"SearchSuites": {
4377+
"tag": "Synthetics",
4378+
"undo": {
4379+
"type": "safe"
4380+
}
4381+
},
4382+
"GetSyntheticsSuite": {
4383+
"tag": "Synthetics",
4384+
"undo": {
4385+
"type": "safe"
4386+
}
4387+
},
4388+
"EditSyntheticsSuite": {
4389+
"tag": "Synthetics",
4390+
"undo": {
4391+
"type": "idempotent"
4392+
}
4393+
},
43604394
"ListTagPipelinesRulesets": {
43614395
"tag": "Cloud Cost Management",
43624396
"undo": {

0 commit comments

Comments
 (0)