Skip to content

Commit 6fd843f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 11a9dcb4 of spec repo
1 parent 375c92b commit 6fd843f

8 files changed

+94
-14
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:24.854718",
8-
"spec_repo_commit": "fec20f97"
7+
"regenerated": "2025-05-23 12:48:24.381169",
8+
"spec_repo_commit": "11a9dcb4"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-20 07:21:24.871057",
13-
"spec_repo_commit": "fec20f97"
12+
"regenerated": "2025-05-23 12:48:24.396933",
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.

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ def overrides
579579
"v1.synthetics_assertion_json_schema_target_target" => "SyntheticsAssertionJSONSchemaTargetTarget",
580580
"v1.synthetics_assertion_operator" => "SyntheticsAssertionOperator",
581581
"v1.synthetics_assertion_target" => "SyntheticsAssertionTarget",
582+
"v1.synthetics_assertion_target_value" => "SyntheticsAssertionTargetValue",
582583
"v1.synthetics_assertion_timings_scope" => "SyntheticsAssertionTimingsScope",
583584
"v1.synthetics_assertion_type" => "SyntheticsAssertionType",
584585
"v1.synthetics_assertion_x_path_operator" => "SyntheticsAssertionXPathOperator",

lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SyntheticsAssertionBodyHashTarget
2424
# Assertion operator to apply.
2525
attr_reader :operator
2626

27-
# Value used by the operator.
27+
# Value used by the operator in assertions. Can be either a number or string.
2828
attr_reader :target
2929

3030
# Type of the assertion.
@@ -47,7 +47,7 @@ def self.attribute_map
4747
def self.openapi_types
4848
{
4949
:'operator' => :'SyntheticsAssertionBodyHashOperator',
50-
:'target' => :'Object',
50+
:'target' => :'SyntheticsAssertionTargetValue',
5151
:'type' => :'SyntheticsAssertionBodyHashType'
5252
}
5353
end

lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SyntheticsAssertionJSONPathTargetTarget
3030
# The specific operator to use on the path.
3131
attr_accessor :operator
3232

33-
# The path target value to compare to.
33+
# Value used by the operator in assertions. Can be either a number or string.
3434
attr_accessor :target_value
3535

3636
attr_accessor :additional_properties
@@ -53,7 +53,7 @@ def self.openapi_types
5353
:'elements_operator' => :'String',
5454
:'json_path' => :'String',
5555
:'operator' => :'String',
56-
:'target_value' => :'Object'
56+
:'target_value' => :'SyntheticsAssertionTargetValue'
5757
}
5858
end
5959

lib/datadog_api_client/v1/models/synthetics_assertion_target.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SyntheticsAssertionTarget
2727
# The associated assertion property.
2828
attr_accessor :property
2929

30-
# Value used by the operator.
30+
# Value used by the operator in assertions. Can be either a number or string.
3131
attr_reader :target
3232

3333
# Timings scope for response time assertions.
@@ -56,7 +56,7 @@ def self.openapi_types
5656
{
5757
:'operator' => :'SyntheticsAssertionOperator',
5858
:'property' => :'String',
59-
:'target' => :'Object',
59+
:'target' => :'SyntheticsAssertionTargetValue',
6060
:'timings_scope' => :'SyntheticsAssertionTimingsScope',
6161
:'type' => :'SyntheticsAssertionType'
6262
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
=begin
2+
#Datadog API V1 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V1
20+
# Value used by the operator in assertions. Can be either a number or string.
21+
module SyntheticsAssertionTargetValue
22+
class << self
23+
include BaseOneOfModel
24+
include BaseOneOfModelNoDiscriminator
25+
26+
# List of class defined in oneOf (OpenAPI v3)
27+
def openapi_one_of
28+
[
29+
:'Float',
30+
:'String'
31+
]
32+
end
33+
# Builds the object
34+
# @param data [Mixed] Data to be matched against the list of oneOf items
35+
# @return [Object] Returns the model or the data itself
36+
def build(data)
37+
# Go through the list of oneOf items and attempt to identify the appropriate one.
38+
# Note:
39+
# - We do not attempt to check whether exactly one item matches.
40+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
42+
# - TODO: scalar values are de facto behaving as if they were nullable.
43+
# - TODO: logging when debugging is set.
44+
openapi_one_of.each do |klass|
45+
begin
46+
next if klass == :AnyType # "nullable: true"
47+
typed_data = find_and_cast_into_type(klass, data)
48+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49+
return typed_data if typed_data
50+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
51+
end
52+
end
53+
54+
if openapi_one_of.include?(:AnyType)
55+
data
56+
else
57+
self._unparsed = true
58+
DatadogAPIClient::UnparsedObject.new(data)
59+
end
60+
end
61+
end
62+
end
63+
end

lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SyntheticsAssertionXPathTargetTarget
2424
# The specific operator to use on the path.
2525
attr_accessor :operator
2626

27-
# The path target value to compare to.
27+
# Value used by the operator in assertions. Can be either a number or string.
2828
attr_accessor :target_value
2929

3030
# The X path to assert.
@@ -47,7 +47,7 @@ def self.attribute_map
4747
def self.openapi_types
4848
{
4949
:'operator' => :'String',
50-
:'target_value' => :'Object',
50+
:'target_value' => :'SyntheticsAssertionTargetValue',
5151
:'x_path' => :'String'
5252
}
5353
end

0 commit comments

Comments
 (0)