Skip to content

Commit 09e5997

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Make assertion target be int or string (#2209)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent bff2900 commit 09e5997

9 files changed

+53
-18
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.6.6",
7-
"regenerated": "2025-05-20 07:21:26.271786",
8-
"spec_repo_commit": "fec20f97"
7+
"regenerated": "2025-05-23 12:48:23.752850",
8+
"spec_repo_commit": "11a9dcb4"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-20 07:21:26.287688",
13-
"spec_repo_commit": "fec20f97"
12+
"regenerated": "2025-05-23 12:48:23.769415",
13+
"spec_repo_commit": "11a9dcb4"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14221,8 +14221,8 @@ components:
1422114221
operator:
1422214222
$ref: '#/components/schemas/SyntheticsAssertionBodyHashOperator'
1422314223
target:
14224+
$ref: '#/components/schemas/SyntheticsAssertionTargetValue'
1422414225
description: Value used by the operator.
14225-
example: 123456
1422614226
type:
1422714227
$ref: '#/components/schemas/SyntheticsAssertionBodyHashType'
1422814228
required:
@@ -14278,6 +14278,7 @@ components:
1427814278
description: The specific operator to use on the path.
1427914279
type: string
1428014280
targetValue:
14281+
$ref: '#/components/schemas/SyntheticsAssertionTargetValue'
1428114282
description: The path target value to compare to.
1428214283
type: object
1428314284
SyntheticsAssertionJSONSchemaMetaSchema:
@@ -14385,8 +14386,8 @@ components:
1438514386
description: The associated assertion property.
1438614387
type: string
1438714388
target:
14389+
$ref: '#/components/schemas/SyntheticsAssertionTargetValue'
1438814390
description: Value used by the operator.
14389-
example: 123456
1439014391
timingsScope:
1439114392
$ref: '#/components/schemas/SyntheticsAssertionTimingsScope'
1439214393
type:
@@ -14396,6 +14397,20 @@ components:
1439614397
- operator
1439714398
- target
1439814399
type: object
14400+
SyntheticsAssertionTargetValue:
14401+
description: Value used by the operator in assertions. Can be either a number
14402+
or string.
14403+
oneOf:
14404+
- $ref: '#/components/schemas/SyntheticsAssertionTargetValueNumber'
14405+
- $ref: '#/components/schemas/SyntheticsAssertionTargetValueString'
14406+
SyntheticsAssertionTargetValueNumber:
14407+
description: Numeric value used by the operator in assertions.
14408+
format: double
14409+
type: number
14410+
SyntheticsAssertionTargetValueString:
14411+
description: String value used by the operator in assertions. Supports templated
14412+
variables.
14413+
type: string
1439914414
SyntheticsAssertionTimingsScope:
1440014415
description: Timings scope for response time assertions.
1440114416
enum:
@@ -14480,6 +14495,7 @@ components:
1448014495
description: The specific operator to use on the path.
1448114496
type: string
1448214497
targetValue:
14498+
$ref: '#/components/schemas/SyntheticsAssertionTargetValue'
1448314499
description: The path target value to compare to.
1448414500
xPath:
1448514501
description: The X path to assert.

packages/datadog-api-client-v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ export { SyntheticsAssertionJSONSchemaTarget } from "./models/SyntheticsAssertio
901901
export { SyntheticsAssertionJSONSchemaTargetTarget } from "./models/SyntheticsAssertionJSONSchemaTargetTarget";
902902
export { SyntheticsAssertionOperator } from "./models/SyntheticsAssertionOperator";
903903
export { SyntheticsAssertionTarget } from "./models/SyntheticsAssertionTarget";
904+
export { SyntheticsAssertionTargetValue } from "./models/SyntheticsAssertionTargetValue";
904905
export { SyntheticsAssertionTimingsScope } from "./models/SyntheticsAssertionTimingsScope";
905906
export { SyntheticsAssertionType } from "./models/SyntheticsAssertionType";
906907
export { SyntheticsAssertionXPathOperator } from "./models/SyntheticsAssertionXPathOperator";

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,7 @@ const oneOfMap: { [index: string]: string[] } = {
24502450
"SyntheticsAssertionXPathTarget",
24512451
"SyntheticsAssertionJavascript",
24522452
],
2453+
SyntheticsAssertionTargetValue: ["number", "string"],
24532454
SyntheticsBasicAuth: [
24542455
"SyntheticsBasicAuthWeb",
24552456
"SyntheticsBasicAuthSigv4",

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
import { SyntheticsAssertionBodyHashOperator } from "./SyntheticsAssertionBodyHashOperator";
77
import { SyntheticsAssertionBodyHashType } from "./SyntheticsAssertionBodyHashType";
8+
import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue";
89

910
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1011

@@ -17,9 +18,9 @@ export class SyntheticsAssertionBodyHashTarget {
1718
*/
1819
"operator": SyntheticsAssertionBodyHashOperator;
1920
/**
20-
* Value used by the operator.
21+
* Value used by the operator in assertions. Can be either a number or string.
2122
*/
22-
"target": any;
23+
"target": SyntheticsAssertionTargetValue;
2324
/**
2425
* Type of the assertion.
2526
*/
@@ -48,7 +49,7 @@ export class SyntheticsAssertionBodyHashTarget {
4849
},
4950
target: {
5051
baseName: "target",
51-
type: "any",
52+
type: "SyntheticsAssertionTargetValue",
5253
required: true,
5354
},
5455
type: {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

@@ -23,9 +24,9 @@ export class SyntheticsAssertionJSONPathTargetTarget {
2324
*/
2425
"operator"?: string;
2526
/**
26-
* The path target value to compare to.
27+
* Value used by the operator in assertions. Can be either a number or string.
2728
*/
28-
"targetValue"?: any;
29+
"targetValue"?: SyntheticsAssertionTargetValue;
2930

3031
/**
3132
* A container for additional, undeclared properties.
@@ -57,7 +58,7 @@ export class SyntheticsAssertionJSONPathTargetTarget {
5758
},
5859
targetValue: {
5960
baseName: "targetValue",
60-
type: "any",
61+
type: "SyntheticsAssertionTargetValue",
6162
},
6263
additionalProperties: {
6364
baseName: "additionalProperties",

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright 2020-Present Datadog, Inc.
55
*/
66
import { SyntheticsAssertionOperator } from "./SyntheticsAssertionOperator";
7+
import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue";
78
import { SyntheticsAssertionTimingsScope } from "./SyntheticsAssertionTimingsScope";
89
import { SyntheticsAssertionType } from "./SyntheticsAssertionType";
910

@@ -22,9 +23,9 @@ export class SyntheticsAssertionTarget {
2223
*/
2324
"property"?: string;
2425
/**
25-
* Value used by the operator.
26+
* Value used by the operator in assertions. Can be either a number or string.
2627
*/
27-
"target": any;
28+
"target": SyntheticsAssertionTargetValue;
2829
/**
2930
* Timings scope for response time assertions.
3031
*/
@@ -61,7 +62,7 @@ export class SyntheticsAssertionTarget {
6162
},
6263
target: {
6364
baseName: "target",
64-
type: "any",
65+
type: "SyntheticsAssertionTargetValue",
6566
required: true,
6667
},
6768
timingsScope: {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
7+
import { UnparsedObject } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* Value used by the operator in assertions. Can be either a number or string.
11+
*/
12+
13+
export type SyntheticsAssertionTargetValue = number | string | UnparsedObject;

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

@@ -15,9 +16,9 @@ export class SyntheticsAssertionXPathTargetTarget {
1516
*/
1617
"operator"?: string;
1718
/**
18-
* The path target value to compare to.
19+
* Value used by the operator in assertions. Can be either a number or string.
1920
*/
20-
"targetValue"?: any;
21+
"targetValue"?: SyntheticsAssertionTargetValue;
2122
/**
2223
* The X path to assert.
2324
*/
@@ -45,7 +46,7 @@ export class SyntheticsAssertionXPathTargetTarget {
4546
},
4647
targetValue: {
4748
baseName: "targetValue",
48-
type: "any",
49+
type: "SyntheticsAssertionTargetValue",
4950
},
5051
xPath: {
5152
baseName: "xPath",

0 commit comments

Comments
 (0)