Skip to content

Commit eeae5e4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 957a4550 of spec repo
1 parent 71b3269 commit eeae5e4

File tree

7 files changed

+115
-7
lines changed

7 files changed

+115
-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": "2025-02-04 14:10:05.819748",
8-
"spec_repo_commit": "4fb9047a"
7+
"regenerated": "2025-02-04 21:28:24.814452",
8+
"spec_repo_commit": "957a4550"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-04 14:10:05.835266",
13-
"spec_repo_commit": "4fb9047a"
12+
"regenerated": "2025-02-04 21:28:24.830116",
13+
"spec_repo_commit": "957a4550"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,22 @@ components:
19651965
deployment:
19661966
$ref: '#/components/schemas/DeploymentRelationship'
19671967
type: object
1968+
AppVersionSelector:
1969+
description: The version selector parameter used in endpoints such as Get App
1970+
oneOf:
1971+
- $ref: '#/components/schemas/AppVersionSelectorConstants'
1972+
- format: int64
1973+
minimum: 0
1974+
type: integer
1975+
AppVersionSelectorConstants:
1976+
description: Constants that always select a particular version of an app
1977+
enum:
1978+
- latest
1979+
- deployed
1980+
type: string
1981+
x-enum-varnames:
1982+
- LATEST
1983+
- DEPLOYED
19681984
ApplicationKeyCreateAttributes:
19691985
description: Attributes used to create an application Key.
19701986
properties:
@@ -32494,7 +32510,7 @@ paths:
3249432510
name: version
3249532511
required: false
3249632512
schema:
32497-
type: string
32513+
$ref: '#/components/schemas/AppVersionSelector'
3249832514
responses:
3249932515
'200':
3250032516
content:

features/scenarios_model_mapping.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@
980980
},
981981
"v2.GetApp" => {
982982
"app_id" => "UUID",
983-
"version" => "String",
983+
"version" => "AppVersionSelector",
984984
},
985985
"v2.UpdateApp" => {
986986
"app_id" => "UUID",

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,8 @@ def overrides
958958
"v2.app_meta" => "AppMeta",
959959
"v2.app_relationship" => "AppRelationship",
960960
"v2.apps_sort_field" => "AppsSortField",
961+
"v2.app_version_selector" => "AppVersionSelector",
962+
"v2.app_version_selector_constants" => "AppVersionSelectorConstants",
961963
"v2.asset" => "Asset",
962964
"v2.asset_attributes" => "AssetAttributes",
963965
"v2.asset_entity_type" => "AssetEntityType",

lib/datadog_api_client/v2/api/app_builder_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def get_app(app_id, opts = {})
254254
#
255255
# @param app_id [UUID] The ID of the app to retrieve.
256256
# @param opts [Hash] the optional parameters
257-
# @option opts [String] :version The version number of the app to retrieve. If not specified, the latest version is returned. Version numbers start at 1 and increment with each update. The special values `latest` and `deployed` can be used to retrieve the latest version or the published version, respectively.
257+
# @option opts [AppVersionSelector] :version The version number of the app to retrieve. If not specified, the latest version is returned. Version numbers start at 1 and increment with each update. The special values `latest` and `deployed` can be used to retrieve the latest version or the published version, respectively.
258258
# @return [Array<(GetAppResponse, Integer, Hash)>] GetAppResponse data, response status code and response headers
259259
def get_app_with_http_info(app_id, opts = {})
260260
unstable_enabled = @api_client.config.unstable_operations["v2.get_app".to_sym]
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
=begin
2+
#Datadog API V2 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::V2
20+
# The version selector parameter used in endpoints such as Get App
21+
module AppVersionSelector
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+
:'AppVersionSelectorConstants',
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
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
=begin
2+
#Datadog API V2 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::V2
20+
# Constants that always select a particular version of an app
21+
class AppVersionSelectorConstants
22+
include BaseEnumModel
23+
24+
LATEST = "latest".freeze
25+
DEPLOYED = "deployed".freeze
26+
end
27+
end

0 commit comments

Comments
 (0)