Skip to content

Commit f6388f3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1b65cdd4 of spec repo
1 parent 19259ec commit f6388f3

File tree

5 files changed

+82
-7
lines changed

5 files changed

+82
-7
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": "2024-10-28 23:07:48.631310",
8-
"spec_repo_commit": "4251a422"
7+
"regenerated": "2024-10-29 15:52:27.609726",
8+
"spec_repo_commit": "1b65cdd4"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-28 23:07:48.650835",
13-
"spec_repo_commit": "4251a422"
12+
"regenerated": "2024-10-29 15:52:27.628265",
13+
"spec_repo_commit": "1b65cdd4"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15546,8 +15546,7 @@ components:
1554615546
step type.
1554715547
type: string
1554815548
value:
15549-
description: Values used in the step. Used in multiple step types.
15550-
type: string
15549+
$ref: '#/components/schemas/SyntheticsMobileStepParamsValue'
1555115550
variable:
1555215551
$ref: '#/components/schemas/SyntheticsMobileStepParamsVariable'
1555315552
withEnter:
@@ -15677,6 +15676,18 @@ components:
1567715676
format: int64
1567815677
type: integer
1567915678
type: object
15679+
SyntheticsMobileStepParamsValue:
15680+
description: Values used in the step. Used in multiple step types.
15681+
oneOf:
15682+
- $ref: '#/components/schemas/SyntheticsMobileStepParamsValueString'
15683+
- $ref: '#/components/schemas/SyntheticsMobileStepParamsValueNumber'
15684+
SyntheticsMobileStepParamsValueNumber:
15685+
description: Value used in the step. Used in multiple step types.
15686+
format: int64
15687+
type: integer
15688+
SyntheticsMobileStepParamsValueString:
15689+
description: Value used in the step. Used in multiple step types.
15690+
type: string
1568015691
SyntheticsMobileStepParamsVariable:
1568115692
description: Variable object for `extractVariable` step type.
1568215693
properties:

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ def overrides
646646
"v1.synthetics_mobile_step_params_element_user_locator_values_items" => "SyntheticsMobileStepParamsElementUserLocatorValuesItems",
647647
"v1.synthetics_mobile_step_params_element_user_locator_values_items_type" => "SyntheticsMobileStepParamsElementUserLocatorValuesItemsType",
648648
"v1.synthetics_mobile_step_params_positions_items" => "SyntheticsMobileStepParamsPositionsItems",
649+
"v1.synthetics_mobile_step_params_value" => "SyntheticsMobileStepParamsValue",
649650
"v1.synthetics_mobile_step_params_variable" => "SyntheticsMobileStepParamsVariable",
650651
"v1.synthetics_mobile_step_type" => "SyntheticsMobileStepType",
651652
"v1.synthetics_mobile_test" => "SyntheticsMobileTest",

lib/datadog_api_client/v1/models/synthetics_mobile_step_params.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def self.openapi_types
9494
:'max_scrolls' => :'Integer',
9595
:'positions' => :'Array<SyntheticsMobileStepParamsPositionsItems>',
9696
:'subtest_public_id' => :'String',
97-
:'value' => :'String',
97+
:'value' => :'SyntheticsMobileStepParamsValue',
9898
:'variable' => :'SyntheticsMobileStepParamsVariable',
9999
:'with_enter' => :'Boolean',
100100
:'x' => :'Integer',
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+
# Values used in the step. Used in multiple step types.
21+
module SyntheticsMobileStepParamsValue
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+
:'String',
30+
:'Integer'
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

0 commit comments

Comments
 (0)