Skip to content

Commit ebb474b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 5311d4c of spec repo (#154)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent e5f7062 commit ebb474b

File tree

7 files changed

+34
-36
lines changed

7 files changed

+34
-36
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.4.1.dev8",
7-
"regenerated": "2021-05-27 08:31:52.844469",
8-
"spec_repo_commit": "0167d3f"
7+
"regenerated": "2021-05-27 15:02:53.179334",
8+
"spec_repo_commit": "5311d4c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-05-27 08:32:33.027018",
13-
"spec_repo_commit": "0167d3f"
12+
"regenerated": "2021-05-27 15:03:39.382450",
13+
"spec_repo_commit": "5311d4c"
1414
}
1515
}
1616
}

docs/v1/SyntheticsApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,10 @@ let body:v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
193193
configVariables: [
194194
{
195195
example: "example_example",
196+
id: "id_example",
196197
name: "VARIABLE_NAME",
197198
pattern: "pattern_example",
198-
type: "text",
199+
type: "global",
199200
},
200201
],
201202
request: {
@@ -1518,9 +1519,10 @@ let body:v1.SyntheticsApiUpdateAPITestRequest = {
15181519
configVariables: [
15191520
{
15201521
example: "example_example",
1522+
id: "id_example",
15211523
name: "VARIABLE_NAME",
15221524
pattern: "pattern_example",
1523-
type: "text",
1525+
type: "global",
15241526
},
15251527
],
15261528
request: {

features/v1/synthetics.feature

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class SyntheticsAPITestConfig {
2323
/**
2424
* Array of assertions used for the test.
2525
*/
26-
'assertions': Array<SyntheticsAssertion>;
26+
'assertions'?: Array<SyntheticsAssertion>;
2727
/**
2828
* Array of variables used for the test.
2929
*/
@@ -65,9 +65,6 @@ export class SyntheticsAPITestConfig {
6565
static deserialize(data: {[key: string]: any}): SyntheticsAPITestConfig {
6666
let res = new SyntheticsAPITestConfig();
6767

68-
if (data.assertions === undefined) {
69-
throw new TypeError("missing required attribute 'assertions' on 'SyntheticsAPITestConfig' object");
70-
}
7168
res.assertions = ObjectSerializer.deserialize(data.assertions, "Array<SyntheticsAssertion>", "")
7269

7370
res.configVariables = ObjectSerializer.deserialize(data.configVariables, "Array<SyntheticsConfigVariable>", "")
@@ -88,9 +85,6 @@ export class SyntheticsAPITestConfig {
8885
throw new TypeError(`${key} attribute not in schema`);
8986
}
9087
}
91-
if (data.assertions === undefined) {
92-
throw new TypeError("missing required attribute 'assertions' on 'SyntheticsAPITestConfig' object");
93-
}
9488
res.assertions = ObjectSerializer.serialize(data.assertions, "Array<SyntheticsAssertion>", "")
9589

9690
res.configVariables = ObjectSerializer.serialize(data.configVariables, "Array<SyntheticsConfigVariable>", "")

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

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ export class SyntheticsConfigVariable {
2020
/**
2121
* Example for the variable.
2222
*/
23-
'example': string;
23+
'example'?: string;
24+
/**
25+
* ID of the variable for global variables.
26+
*/
27+
'id'?: string;
2428
/**
2529
* Name of the variable.
2630
*/
@@ -39,6 +43,11 @@ export class SyntheticsConfigVariable {
3943
"type": "string",
4044
"format": ""
4145
},
46+
"id": {
47+
"baseName": "id",
48+
"type": "string",
49+
"format": ""
50+
},
4251
"name": {
4352
"baseName": "name",
4453
"type": "string",
@@ -62,11 +71,10 @@ export class SyntheticsConfigVariable {
6271
static deserialize(data: {[key: string]: any}): SyntheticsConfigVariable {
6372
let res = new SyntheticsConfigVariable();
6473

65-
if (data.example === undefined) {
66-
throw new TypeError("missing required attribute 'example' on 'SyntheticsConfigVariable' object");
67-
}
6874
res.example = ObjectSerializer.deserialize(data.example, "string", "")
6975

76+
res.id = ObjectSerializer.deserialize(data.id, "string", "")
77+
7078
if (data.name === undefined) {
7179
throw new TypeError("missing required attribute 'name' on 'SyntheticsConfigVariable' object");
7280
}
@@ -77,7 +85,7 @@ export class SyntheticsConfigVariable {
7785
if (data.type === undefined) {
7886
throw new TypeError("missing required attribute 'type' on 'SyntheticsConfigVariable' object");
7987
}
80-
if (['text', undefined].includes(data.type)) {
88+
if (['global', 'text', undefined].includes(data.type)) {
8189
res.type = data.type;
8290
} else {
8391
throw TypeError(`invalid enum value ${ data.type } for type`);
@@ -95,11 +103,10 @@ export class SyntheticsConfigVariable {
95103
throw new TypeError(`${key} attribute not in schema`);
96104
}
97105
}
98-
if (data.example === undefined) {
99-
throw new TypeError("missing required attribute 'example' on 'SyntheticsConfigVariable' object");
100-
}
101106
res.example = ObjectSerializer.serialize(data.example, "string", "")
102107

108+
res.id = ObjectSerializer.serialize(data.id, "string", "")
109+
103110
if (data.name === undefined) {
104111
throw new TypeError("missing required attribute 'name' on 'SyntheticsConfigVariable' object");
105112
}
@@ -110,7 +117,7 @@ export class SyntheticsConfigVariable {
110117
if (data.type === undefined) {
111118
throw new TypeError("missing required attribute 'type' on 'SyntheticsConfigVariable' object");
112119
}
113-
if (['text', undefined].includes(data.type)) {
120+
if (['global', 'text', undefined].includes(data.type)) {
114121
res.type = data.type;
115122
} else {
116123
throw TypeError(`invalid enum value ${ data.type } for type`);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import { ObjectSerializer } from './ObjectSerializer';
1515
* Type of the configuration variable.
1616
*/
1717

18-
export type SyntheticsConfigVariableType = typeof TEXT ;
18+
export type SyntheticsConfigVariableType = typeof GLOBAL | typeof TEXT ;
19+
export const GLOBAL = 'global';
1920
export const TEXT = 'text';
2021

2122

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class SyntheticsTestConfig {
2323
/**
2424
* Array of assertions used for the test.
2525
*/
26-
'assertions': Array<SyntheticsAssertion>;
26+
'assertions'?: Array<SyntheticsAssertion>;
2727
/**
2828
* API tests only - array of variables used for the test.
2929
*/
@@ -65,9 +65,6 @@ export class SyntheticsTestConfig {
6565
static deserialize(data: {[key: string]: any}): SyntheticsTestConfig {
6666
let res = new SyntheticsTestConfig();
6767

68-
if (data.assertions === undefined) {
69-
throw new TypeError("missing required attribute 'assertions' on 'SyntheticsTestConfig' object");
70-
}
7168
res.assertions = ObjectSerializer.deserialize(data.assertions, "Array<SyntheticsAssertion>", "")
7269

7370
res.configVariables = ObjectSerializer.deserialize(data.configVariables, "Array<SyntheticsConfigVariable>", "")
@@ -88,9 +85,6 @@ export class SyntheticsTestConfig {
8885
throw new TypeError(`${key} attribute not in schema`);
8986
}
9087
}
91-
if (data.assertions === undefined) {
92-
throw new TypeError("missing required attribute 'assertions' on 'SyntheticsTestConfig' object");
93-
}
9488
res.assertions = ObjectSerializer.serialize(data.assertions, "Array<SyntheticsAssertion>", "")
9589

9690
res.configVariables = ObjectSerializer.serialize(data.configVariables, "Array<SyntheticsConfigVariable>", "")

0 commit comments

Comments
 (0)