Skip to content

Commit b720537

Browse files
api-clients-generation-pipeline[bot]romainbergerci.datadog-api-spec
authored
[Synthetics] Fix required target in assertions and type in step results (#1201)
* [Synthetics] Update tests for assertions * Regenerate client from commit 6ddcc8e of spec repo Co-authored-by: Romain Berger <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 3b6f086 commit b720537

13 files changed

+74
-67
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": "2021-11-11 09:29:58.022073",
8-
"spec_repo_commit": "904c411"
7+
"regenerated": "2021-11-11 11:44:21.239708",
8+
"spec_repo_commit": "6ddcc8e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-11-11 09:29:58.043886",
13-
"spec_repo_commit": "904c411"
12+
"regenerated": "2021-11-11 11:44:21.260549",
13+
"spec_repo_commit": "6ddcc8e"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9251,7 +9251,8 @@ components:
92519251
properties:
92529252
assertions:
92539253
default: []
9254-
description: Array of assertions used for the test.
9254+
description: Array of assertions used for the test. Required for single
9255+
API tests.
92559256
example:
92569257
- operator: lessThan
92579258
target: 1000
@@ -9458,12 +9459,14 @@ components:
94589459
type: string
94599460
target:
94609461
description: Value used by the operator.
9462+
example: 123456
94619463
nullable: false
94629464
type:
94639465
$ref: '#/components/schemas/SyntheticsAssertionType'
94649466
required:
94659467
- type
94669468
- operator
9469+
- target
94679470
type: object
94689471
SyntheticsAssertionType:
94699472
description: Type of the assertion.
@@ -9859,7 +9862,7 @@ components:
98599862
description: Git information.
98609863
properties:
98619864
branch:
9862-
description: The branch name.
9865+
description: Branch name.
98639866
type: string
98649867
commitSha:
98659868
description: The commit SHA.
@@ -10590,7 +10593,6 @@ components:
1059010593
type: string
1059110594
value:
1059210595
description: Value for the step.
10593-
type: object
1059410596
vitalsMetrics:
1059510597
description: Array of Core Web Vitals metrics for the step.
1059610598
items:

api/v1/datadog/api/openapi.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21944,7 +21944,8 @@ components:
2194421944
properties:
2194521945
assertions:
2194621946
default: []
21947-
description: Array of assertions used for the test.
21947+
description: Array of assertions used for the test. Required for single
21948+
API tests.
2194821949
example:
2194921950
- operator: lessThan
2195021951
target: 1000
@@ -22298,11 +22299,13 @@ components:
2229822299
type: string
2229922300
target:
2230022301
description: Value used by the operator.
22302+
example: 123456
2230122303
nullable: false
2230222304
type:
2230322305
$ref: '#/components/schemas/SyntheticsAssertionType'
2230422306
required:
2230522307
- operator
22308+
- target
2230622309
- type
2230722310
type: object
2230822311
SyntheticsAssertionType:
@@ -22788,7 +22791,7 @@ components:
2278822791
subTestStepDetails:
2278922792
- null
2279022793
- null
22791-
value: '{}'
22794+
value: ""
2279222795
- screenshotBucketKey: true
2279322796
snapshotBucketKey: true
2279422797
warnings:
@@ -22823,7 +22826,7 @@ components:
2282322826
subTestStepDetails:
2282422827
- null
2282522828
- null
22826-
value: '{}'
22829+
value: ""
2282722830
browserType: browserType
2282822831
properties:
2282922832
browserType:
@@ -22919,7 +22922,7 @@ components:
2291922922
subTestStepDetails:
2292022923
- null
2292122924
- null
22922-
value: '{}'
22925+
value: ""
2292322926
- screenshotBucketKey: true
2292422927
snapshotBucketKey: true
2292522928
warnings:
@@ -22954,7 +22957,7 @@ components:
2295422957
subTestStepDetails:
2295522958
- null
2295622959
- null
22957-
value: '{}'
22960+
value: ""
2295822961
browserType: browserType
2295922962
check_version: 6
2296022963
probe_dc: probe_dc
@@ -23165,7 +23168,7 @@ components:
2316523168
branch: branch
2316623169
properties:
2316723170
branch:
23168-
description: The branch name.
23171+
description: Branch name.
2316923172
type: string
2317023173
commitSha:
2317123174
description: The commit SHA.
@@ -24315,7 +24318,7 @@ components:
2431524318
subTestStepDetails:
2431624319
- null
2431724320
- null
24318-
value: '{}'
24321+
value: ""
2431924322
properties:
2432024323
browserErrors:
2432124324
description: Array of errors collected for a browser test.
@@ -24367,7 +24370,6 @@ components:
2436724370
type: string
2436824371
value:
2436924372
description: Value for the step.
24370-
type: object
2437124373
vitalsMetrics:
2437224374
description: Array of Core Web Vitals metrics for the step.
2437324375
items:

api/v1/datadog/docs/SyntheticsAPITestConfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name | Type | Description | Notes
66
---- | ---- | ----------- | ------
7-
**Assertions** | Pointer to [**[]SyntheticsAssertion**](SyntheticsAssertion.md) | Array of assertions used for the test. | [optional] [default to []]
7+
**Assertions** | Pointer to [**[]SyntheticsAssertion**](SyntheticsAssertion.md) | Array of assertions used for the test. Required for single API tests. | [optional] [default to []]
88
**ConfigVariables** | Pointer to [**[]SyntheticsConfigVariable**](SyntheticsConfigVariable.md) | Array of variables used for the test. | [optional]
99
**Request** | Pointer to [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | | [optional]
1010
**Steps** | Pointer to [**[]SyntheticsAPIStep**](SyntheticsAPIStep.md) | When the test subtype is &#x60;multi&#x60;, the steps of the test. | [optional]

api/v1/datadog/docs/SyntheticsAssertionTarget.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Name | Type | Description | Notes
66
---- | ---- | ----------- | ------
77
**Operator** | [**SyntheticsAssertionOperator**](SyntheticsAssertionOperator.md) | |
88
**Property** | Pointer to **string** | The associated assertion property. | [optional]
9-
**Target** | Pointer to **interface{}** | Value used by the operator. | [optional]
9+
**Target** | **interface{}** | Value used by the operator. |
1010
**Type** | [**SyntheticsAssertionType**](SyntheticsAssertionType.md) | |
1111

1212
## Methods
1313

1414
### NewSyntheticsAssertionTarget
1515

16-
`func NewSyntheticsAssertionTarget(operator SyntheticsAssertionOperator, type_ SyntheticsAssertionType) *SyntheticsAssertionTarget`
16+
`func NewSyntheticsAssertionTarget(operator SyntheticsAssertionOperator, target interface{}, type_ SyntheticsAssertionType) *SyntheticsAssertionTarget`
1717

1818
NewSyntheticsAssertionTarget instantiates a new SyntheticsAssertionTarget object.
1919
This constructor will assign default values to properties that have it defined,
@@ -92,11 +92,6 @@ and a boolean to check if the value has been set.
9292

9393
SetTarget sets Target field to given value.
9494

95-
### HasTarget
96-
97-
`func (o *SyntheticsAssertionTarget) HasTarget() bool`
98-
99-
HasTarget returns a boolean if a field has been set.
10095

10196
### GetType
10297

api/v1/datadog/docs/SyntheticsCIBatchMetadataGit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name | Type | Description | Notes
66
---- | ---- | ----------- | ------
7-
**Branch** | Pointer to **string** | The branch name. | [optional]
7+
**Branch** | Pointer to **string** | Branch name. | [optional]
88
**CommitSha** | Pointer to **string** | The commit SHA. | [optional]
99

1010
## Methods

api/v1/datadog/docs/SyntheticsStepDetail.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,16 @@ SetValue sets Value field to given value.
416416

417417
HasValue returns a boolean if a field has been set.
418418

419+
### SetValueNil
420+
421+
`func (o *SyntheticsStepDetail) SetValueNil(b bool)`
422+
423+
SetValueNil sets the value for Value to be an explicit nil
424+
425+
### UnsetValue
426+
`func (o *SyntheticsStepDetail) UnsetValue()`
427+
428+
UnsetValue ensures that no value is present for Value, not even an explicit nil
419429
### GetVitalsMetrics
420430

421431
`func (o *SyntheticsStepDetail) GetVitalsMetrics() []SyntheticsCoreWebVitals`

api/v1/datadog/model_synthetics_api_test_config.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1/datadog/model_synthetics_assertion_target.go

Lines changed: 18 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1/datadog/model_synthetics_ci_batch_metadata_git.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)