Skip to content

Commit a348316

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 184be3f of spec repo (#455)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 6b1d9b2 commit a348316

File tree

9 files changed

+281
-4
lines changed

9 files changed

+281
-4
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.5.1.dev2",
7-
"regenerated": "2022-01-04 09:34:33.752110",
8-
"spec_repo_commit": "6946869"
7+
"regenerated": "2022-01-04 09:52:33.868130",
8+
"spec_repo_commit": "184be3f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-04 09:34:33.778775",
13-
"spec_repo_commit": "6946869"
12+
"regenerated": "2022-01-04 09:52:33.897411",
13+
"spec_repo_commit": "184be3f"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9465,6 +9465,8 @@ components:
94659465
type: string
94669466
request:
94679467
$ref: '#/components/schemas/SyntheticsTestRequest'
9468+
retry:
9469+
$ref: '#/components/schemas/SyntheticsTestOptionsRetry'
94689470
subtype:
94699471
$ref: '#/components/schemas/SyntheticsAPIStepSubtype'
94709472
type: object
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2022-01-03T17:01:27.947Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"log": {
3+
"_recordingName": "Synthetics/Create an API test with multi subtype returns \"OK - Returns the created test details.\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "5.1.1"
8+
},
9+
"entries": [
10+
{
11+
"_id": "74badcda3b17833717e401346e417c71",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 986,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "content-type",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "accept",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 434,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1641229287\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1641229287\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/api"
39+
},
40+
"response": {
41+
"bodySize": 1200,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 1200,
45+
"text": "{\"status\":\"live\",\"public_id\":\"u62-zu8-cmw\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"deleted_at\":null,\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1641229287\",\"monitor_id\":59201884,\"type\":\"api\",\"created_at\":\"2022-01-03T17:01:28.731353+00:00\",\"modified_at\":\"2022-01-03T17:01:28.731353+00:00\",\"subtype\":\"multi\",\"config\":{\"steps\":[{\"retry\":{\"count\":5,\"interval\":1000},\"name\":\"request is sent\",\"request\":{\"url\":\"https://datadoghq.com\",\"method\":\"GET\",\"timeout\":10},\"subtype\":\"http\",\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"type\":\"statusCode\",\"target\":200}],\"isCritical\":true,\"id\":\"ard-2gj-3s8\"}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":1000},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1641229287\",\"tick_every\":60}}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 487,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2022-01-03T17:01:27.963Z",
61+
"time": 744
62+
},
63+
{
64+
"_id": "3121e1403bd18d6728fc3972a199bb52",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 30,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "content-type",
74+
"value": "application/json"
75+
},
76+
{
77+
"_fromType": "array",
78+
"name": "accept",
79+
"value": "application/json"
80+
}
81+
],
82+
"headersSize": 436,
83+
"httpVersion": "HTTP/1.1",
84+
"method": "POST",
85+
"postData": {
86+
"mimeType": "application/json",
87+
"params": [],
88+
"text": "{\"public_ids\":[\"u62-zu8-cmw\"]}"
89+
},
90+
"queryString": [],
91+
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/delete"
92+
},
93+
"response": {
94+
"bodySize": 95,
95+
"content": {
96+
"mimeType": "application/json",
97+
"size": 95,
98+
"text": "{\"deleted_tests\":[{\"deleted_at\":\"2022-01-03T17:01:29.223304+00:00\",\"public_id\":\"u62-zu8-cmw\"}]}"
99+
},
100+
"cookies": [],
101+
"headers": [
102+
{
103+
"name": "content-type",
104+
"value": "application/json"
105+
}
106+
],
107+
"headersSize": 485,
108+
"httpVersion": "HTTP/1.1",
109+
"redirectURL": "",
110+
"status": 200,
111+
"statusText": "OK"
112+
},
113+
"startedDateTime": "2022-01-03T17:01:28.715Z",
114+
"time": 565
115+
}
116+
],
117+
"pages": [],
118+
"version": "1.2"
119+
}
120+
}

docs/v1/SyntheticsApi.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ let params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
303303
timeout: 3.14,
304304
url: "https://example.com",
305305
},
306+
retry: {
307+
count: 1,
308+
interval: 3.14,
309+
},
306310
subtype: "http",
307311
},
308312
],
@@ -1890,6 +1894,10 @@ let params: v1.SyntheticsApiUpdateAPITestRequest = {
18901894
timeout: 3.14,
18911895
url: "https://example.com",
18921896
},
1897+
retry: {
1898+
count: 1,
1899+
interval: 3.14,
1900+
},
18931901
subtype: "http",
18941902
},
18951903
],
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/**
2+
* Create an API test with multi subtype returns "OK - Returns the created test details." response
3+
*/
4+
5+
import { v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = v1.createConfiguration();
8+
const apiInstance = new v1.SyntheticsApi(configuration);
9+
10+
let params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
11+
body: {
12+
config: {
13+
configVariables: [
14+
{
15+
example: "content-type",
16+
name: "PROPERTY",
17+
pattern: "content-type",
18+
type: "text",
19+
},
20+
],
21+
steps: [
22+
{
23+
allowFailure: true,
24+
assertions: [
25+
{
26+
operator: "is",
27+
type: "statusCode",
28+
target: 200,
29+
},
30+
],
31+
isCritical: true,
32+
name: "request is sent",
33+
request: {
34+
method: "GET",
35+
timeout: 10,
36+
url: "https://datadoghq.com",
37+
},
38+
retry: {
39+
count: 5,
40+
interval: 1000,
41+
},
42+
subtype: "http",
43+
},
44+
],
45+
},
46+
locations: ["aws:us-east-2"],
47+
message: "BDD test payload: synthetics_api_test_multi_step_payload.json",
48+
name: "Example-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response",
49+
options: {
50+
acceptSelfSigned: false,
51+
allowInsecure: true,
52+
followRedirects: true,
53+
minFailureDuration: 10,
54+
minLocationFailed: 1,
55+
monitorName:
56+
"Example-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response",
57+
monitorPriority: 5,
58+
retry: {
59+
count: 3,
60+
interval: 1000,
61+
},
62+
tickEvery: 60,
63+
},
64+
subtype: "multi",
65+
tags: ["testing:api"],
66+
type: "api",
67+
},
68+
};
69+
70+
apiInstance
71+
.createSyntheticsAPITest(params)
72+
.then((data: any) => {
73+
console.log(
74+
"API called successfully. Returned data: " + JSON.stringify(data)
75+
);
76+
})
77+
.catch((error: any) => console.error(error));

features/v1/synthetics.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ Feature: Synthetics
126126
Then the response status is 200 OK - Returns the created test details.
127127
And the response "name" is equal to "{{ unique }}"
128128

129+
@team:DataDog/synthetics-app
130+
Scenario: Create an API test with multi subtype returns "OK - Returns the created test details." response
131+
Given new "CreateSyntheticsAPITest" request
132+
And body from file "synthetics_api_test_multi_step_payload.json"
133+
When the request is sent
134+
Then the response status is 200 OK - Returns the created test details.
135+
And the response "name" is equal to "{{ unique }}"
136+
And the response "config.steps[0].retry.count" is equal to 5
137+
And the response "config.steps[0].retry.interval" is equal to 1000
138+
129139
@generated @skip @team:DataDog/synthetics-app
130140
Scenario: Delete a global variable returns "JSON format is wrong" response
131141
Given new "DeleteGlobalVariable" request
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"config": {
3+
"configVariables": [
4+
{
5+
"example": "content-type",
6+
"name": "PROPERTY",
7+
"pattern": "content-type",
8+
"type": "text"
9+
}
10+
],
11+
"steps": [
12+
{
13+
"allowFailure": true,
14+
"assertions": [
15+
{
16+
"operator": "is",
17+
"type": "statusCode",
18+
"target": 200
19+
}
20+
],
21+
"isCritical": true,
22+
"name": "request is sent",
23+
"request": {
24+
"method": "GET",
25+
"timeout": 10,
26+
"url": "https://datadoghq.com"
27+
},
28+
"retry": {
29+
"count": 5,
30+
"interval": 1000
31+
},
32+
"subtype": "http"
33+
}
34+
]
35+
},
36+
"locations": ["aws:us-east-2"],
37+
"message": "BDD test payload: synthetics_api_test_multi_step_payload.json",
38+
"name": "{{ unique }}",
39+
"options": {
40+
"accept_self_signed": false,
41+
"allow_insecure": true,
42+
"follow_redirects": true,
43+
"min_failure_duration": 10,
44+
"min_location_failed": 1,
45+
"monitor_name": "{{ unique }}",
46+
"monitor_priority": 5,
47+
"retry": { "count": 3, "interval": 1000 },
48+
"tick_every": 60
49+
},
50+
"subtype": "multi",
51+
"tags": ["testing:api"],
52+
"type": "api"
53+
}

packages/datadog-api-client-v1/models/SyntheticsAPIStep.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import { SyntheticsAPIStepSubtype } from "./SyntheticsAPIStepSubtype";
1212
import { SyntheticsAssertion } from "./SyntheticsAssertion";
1313
import { SyntheticsParsingOptions } from "./SyntheticsParsingOptions";
14+
import { SyntheticsTestOptionsRetry } from "./SyntheticsTestOptionsRetry";
1415
import { SyntheticsTestRequest } from "./SyntheticsTestRequest";
1516

1617
export class SyntheticsAPIStep {
@@ -35,6 +36,7 @@ export class SyntheticsAPIStep {
3536
*/
3637
"name"?: string;
3738
"request"?: SyntheticsTestRequest;
39+
"retry"?: SyntheticsTestOptionsRetry;
3840
"subtype"?: SyntheticsAPIStepSubtype;
3941

4042
"unparsedObject"?: any;
@@ -71,6 +73,10 @@ export class SyntheticsAPIStep {
7173
baseName: "request",
7274
type: "SyntheticsTestRequest",
7375
},
76+
retry: {
77+
baseName: "retry",
78+
type: "SyntheticsTestOptionsRetry",
79+
},
7480
subtype: {
7581
baseName: "subtype",
7682
type: "SyntheticsAPIStepSubtype",

0 commit comments

Comments
 (0)