Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Synthetics] Fix required target in assertions and type in step results #1201

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-11-11 09:29:58.022073",
"spec_repo_commit": "904c411"
"regenerated": "2021-11-11 11:44:21.239708",
"spec_repo_commit": "6ddcc8e"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-11-11 09:29:58.043886",
"spec_repo_commit": "904c411"
"regenerated": "2021-11-11 11:44:21.260549",
"spec_repo_commit": "6ddcc8e"
}
}
}
8 changes: 5 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9251,7 +9251,8 @@ components:
properties:
assertions:
default: []
description: Array of assertions used for the test.
description: Array of assertions used for the test. Required for single
API tests.
example:
- operator: lessThan
target: 1000
Expand Down Expand Up @@ -9458,12 +9459,14 @@ components:
type: string
target:
description: Value used by the operator.
example: 123456
nullable: false
type:
$ref: '#/components/schemas/SyntheticsAssertionType'
required:
- type
- operator
- target
type: object
SyntheticsAssertionType:
description: Type of the assertion.
Expand Down Expand Up @@ -9859,7 +9862,7 @@ components:
description: Git information.
properties:
branch:
description: The branch name.
description: Branch name.
type: string
commitSha:
description: The commit SHA.
Expand Down Expand Up @@ -10590,7 +10593,6 @@ components:
type: string
value:
description: Value for the step.
type: object
vitalsMetrics:
description: Array of Core Web Vitals metrics for the step.
items:
Expand Down
18 changes: 10 additions & 8 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21944,7 +21944,8 @@ components:
properties:
assertions:
default: []
description: Array of assertions used for the test.
description: Array of assertions used for the test. Required for single
API tests.
example:
- operator: lessThan
target: 1000
Expand Down Expand Up @@ -22298,11 +22299,13 @@ components:
type: string
target:
description: Value used by the operator.
example: 123456
nullable: false
type:
$ref: '#/components/schemas/SyntheticsAssertionType'
required:
- operator
- target
- type
type: object
SyntheticsAssertionType:
Expand Down Expand Up @@ -22788,7 +22791,7 @@ components:
subTestStepDetails:
- null
- null
value: '{}'
value: ""
- screenshotBucketKey: true
snapshotBucketKey: true
warnings:
Expand Down Expand Up @@ -22823,7 +22826,7 @@ components:
subTestStepDetails:
- null
- null
value: '{}'
value: ""
browserType: browserType
properties:
browserType:
Expand Down Expand Up @@ -22919,7 +22922,7 @@ components:
subTestStepDetails:
- null
- null
value: '{}'
value: ""
- screenshotBucketKey: true
snapshotBucketKey: true
warnings:
Expand Down Expand Up @@ -22954,7 +22957,7 @@ components:
subTestStepDetails:
- null
- null
value: '{}'
value: ""
browserType: browserType
check_version: 6
probe_dc: probe_dc
Expand Down Expand Up @@ -23165,7 +23168,7 @@ components:
branch: branch
properties:
branch:
description: The branch name.
description: Branch name.
type: string
commitSha:
description: The commit SHA.
Expand Down Expand Up @@ -24315,7 +24318,7 @@ components:
subTestStepDetails:
- null
- null
value: '{}'
value: ""
properties:
browserErrors:
description: Array of errors collected for a browser test.
Expand Down Expand Up @@ -24367,7 +24370,6 @@ components:
type: string
value:
description: Value for the step.
type: object
vitalsMetrics:
description: Array of Core Web Vitals metrics for the step.
items:
Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/docs/SyntheticsAPITestConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
---- | ---- | ----------- | ------
**Assertions** | Pointer to [**[]SyntheticsAssertion**](SyntheticsAssertion.md) | Array of assertions used for the test. | [optional] [default to []]
**Assertions** | Pointer to [**[]SyntheticsAssertion**](SyntheticsAssertion.md) | Array of assertions used for the test. Required for single API tests. | [optional] [default to []]
**ConfigVariables** | Pointer to [**[]SyntheticsConfigVariable**](SyntheticsConfigVariable.md) | Array of variables used for the test. | [optional]
**Request** | Pointer to [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | | [optional]
**Steps** | Pointer to [**[]SyntheticsAPIStep**](SyntheticsAPIStep.md) | When the test subtype is `multi`, the steps of the test. | [optional]
Expand Down
9 changes: 2 additions & 7 deletions api/v1/datadog/docs/SyntheticsAssertionTarget.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Name | Type | Description | Notes
---- | ---- | ----------- | ------
**Operator** | [**SyntheticsAssertionOperator**](SyntheticsAssertionOperator.md) | |
**Property** | Pointer to **string** | The associated assertion property. | [optional]
**Target** | Pointer to **interface{}** | Value used by the operator. | [optional]
**Target** | **interface{}** | Value used by the operator. |
**Type** | [**SyntheticsAssertionType**](SyntheticsAssertionType.md) | |

## Methods

### NewSyntheticsAssertionTarget

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

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

SetTarget sets Target field to given value.

### HasTarget

`func (o *SyntheticsAssertionTarget) HasTarget() bool`

HasTarget returns a boolean if a field has been set.

### GetType

Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/docs/SyntheticsCIBatchMetadataGit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
---- | ---- | ----------- | ------
**Branch** | Pointer to **string** | The branch name. | [optional]
**Branch** | Pointer to **string** | Branch name. | [optional]
**CommitSha** | Pointer to **string** | The commit SHA. | [optional]

## Methods
Expand Down
10 changes: 10 additions & 0 deletions api/v1/datadog/docs/SyntheticsStepDetail.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,16 @@ SetValue sets Value field to given value.

HasValue returns a boolean if a field has been set.

### SetValueNil

`func (o *SyntheticsStepDetail) SetValueNil(b bool)`

SetValueNil sets the value for Value to be an explicit nil

### UnsetValue
`func (o *SyntheticsStepDetail) UnsetValue()`

UnsetValue ensures that no value is present for Value, not even an explicit nil
### GetVitalsMetrics

`func (o *SyntheticsStepDetail) GetVitalsMetrics() []SyntheticsCoreWebVitals`
Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/model_synthetics_api_test_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 18 additions & 21 deletions api/v1/datadog/model_synthetics_assertion_target.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1/datadog/model_synthetics_ci_batch_metadata_git.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions api/v1/datadog/model_synthetics_step_detail.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading