Skip to content

Commit 3a2574a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 41a70110 of spec repo
1 parent d0fd161 commit 3a2574a

File tree

5 files changed

+175
-5
lines changed

5 files changed

+175
-5
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-01-03 18:07:37.914799",
8-
"spec_repo_commit": "08abd462"
7+
"regenerated": "2025-01-06 14:49:11.898745",
8+
"spec_repo_commit": "41a70110"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-03 18:07:37.929790",
13-
"spec_repo_commit": "08abd462"
12+
"regenerated": "2025-01-06 14:49:11.913579",
13+
"spec_repo_commit": "41a70110"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15133,6 +15133,12 @@ components:
1513315133
the error.
1513415134
example: Missing required attribute in body
1513515135
type: string
15136+
meta:
15137+
additionalProperties: {}
15138+
description: Non-standard meta-information about the error
15139+
type: object
15140+
source:
15141+
$ref: '#/components/schemas/JSONAPIErrorItemSource'
1513615142
status:
1513715143
description: Status code of the response.
1513815144
example: '400'
@@ -15142,6 +15148,24 @@ components:
1514215148
example: Bad Request
1514315149
type: string
1514415150
type: object
15151+
JSONAPIErrorItemSource:
15152+
description: References to the source of the error.
15153+
properties:
15154+
header:
15155+
description: A string indicating the name of a single request header which
15156+
caused the error.
15157+
example: Authorization
15158+
type: string
15159+
parameter:
15160+
description: A string indicating which URI query parameter caused the error.
15161+
example: limit
15162+
type: string
15163+
pointer:
15164+
description: A JSON pointer to the value in the request document that caused
15165+
the error.
15166+
example: /data/attributes/title
15167+
type: string
15168+
type: object
1514515169
JSONAPIErrorResponse:
1514615170
description: API error response.
1514715171
properties:

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,6 +1809,7 @@ def overrides
18091809
"v2.job_definition" => "JobDefinition",
18101810
"v2.job_definition_from_rule" => "JobDefinitionFromRule",
18111811
"v2.jsonapi_error_item" => "JSONAPIErrorItem",
1812+
"v2.jsonapi_error_item_source" => "JSONAPIErrorItemSource",
18121813
"v2.jsonapi_error_response" => "JSONAPIErrorResponse",
18131814
"v2.leaked_key" => "LeakedKey",
18141815
"v2.leaked_key_attributes" => "LeakedKeyAttributes",

lib/datadog_api_client/v2/models/jsonapi_error_item.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ class JSONAPIErrorItem
2424
# A human-readable explanation specific to this occurrence of the error.
2525
attr_accessor :detail
2626

27+
# Non-standard meta-information about the error
28+
attr_accessor :meta
29+
30+
# References to the source of the error.
31+
attr_accessor :source
32+
2733
# Status code of the response.
2834
attr_accessor :status
2935

@@ -37,6 +43,8 @@ class JSONAPIErrorItem
3743
def self.attribute_map
3844
{
3945
:'detail' => :'detail',
46+
:'meta' => :'meta',
47+
:'source' => :'source',
4048
:'status' => :'status',
4149
:'title' => :'title'
4250
}
@@ -47,6 +55,8 @@ def self.attribute_map
4755
def self.openapi_types
4856
{
4957
:'detail' => :'String',
58+
:'meta' => :'Hash<String, Object>',
59+
:'source' => :'JSONAPIErrorItemSource',
5060
:'status' => :'String',
5161
:'title' => :'String'
5262
}
@@ -74,6 +84,14 @@ def initialize(attributes = {})
7484
self.detail = attributes[:'detail']
7585
end
7686

87+
if attributes.key?(:'meta')
88+
self.meta = attributes[:'meta']
89+
end
90+
91+
if attributes.key?(:'source')
92+
self.source = attributes[:'source']
93+
end
94+
7795
if attributes.key?(:'status')
7896
self.status = attributes[:'status']
7997
end
@@ -110,6 +128,8 @@ def ==(o)
110128
return true if self.equal?(o)
111129
self.class == o.class &&
112130
detail == o.detail &&
131+
meta == o.meta &&
132+
source == o.source &&
113133
status == o.status &&
114134
title == o.title &&
115135
additional_properties == o.additional_properties
@@ -119,7 +139,7 @@ def ==(o)
119139
# @return [Integer] Hash code
120140
# @!visibility private
121141
def hash
122-
[detail, status, title, additional_properties].hash
142+
[detail, meta, source, status, title, additional_properties].hash
123143
end
124144
end
125145
end
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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+
# References to the source of the error.
21+
class JSONAPIErrorItemSource
22+
include BaseGenericModel
23+
24+
# A string indicating the name of a single request header which caused the error.
25+
attr_accessor :header
26+
27+
# A string indicating which URI query parameter caused the error.
28+
attr_accessor :parameter
29+
30+
# A JSON pointer to the value in the request document that caused the error.
31+
attr_accessor :pointer
32+
33+
attr_accessor :additional_properties
34+
35+
# Attribute mapping from ruby-style variable name to JSON key.
36+
# @!visibility private
37+
def self.attribute_map
38+
{
39+
:'header' => :'header',
40+
:'parameter' => :'parameter',
41+
:'pointer' => :'pointer'
42+
}
43+
end
44+
45+
# Attribute type mapping.
46+
# @!visibility private
47+
def self.openapi_types
48+
{
49+
:'header' => :'String',
50+
:'parameter' => :'String',
51+
:'pointer' => :'String'
52+
}
53+
end
54+
55+
# Initializes the object
56+
# @param attributes [Hash] Model attributes in the form of hash
57+
# @!visibility private
58+
def initialize(attributes = {})
59+
if (!attributes.is_a?(Hash))
60+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JSONAPIErrorItemSource` initialize method"
61+
end
62+
63+
self.additional_properties = {}
64+
# check to see if the attribute exists and convert string to symbol for hash key
65+
attributes = attributes.each_with_object({}) { |(k, v), h|
66+
if (!self.class.attribute_map.key?(k.to_sym))
67+
self.additional_properties[k.to_sym] = v
68+
else
69+
h[k.to_sym] = v
70+
end
71+
}
72+
73+
if attributes.key?(:'header')
74+
self.header = attributes[:'header']
75+
end
76+
77+
if attributes.key?(:'parameter')
78+
self.parameter = attributes[:'parameter']
79+
end
80+
81+
if attributes.key?(:'pointer')
82+
self.pointer = attributes[:'pointer']
83+
end
84+
end
85+
86+
# Returns the object in the form of hash, with additionalProperties support.
87+
# @return [Hash] Returns the object in the form of hash
88+
# @!visibility private
89+
def to_hash
90+
hash = {}
91+
self.class.attribute_map.each_pair do |attr, param|
92+
value = self.send(attr)
93+
if value.nil?
94+
is_nullable = self.class.openapi_nullable.include?(attr)
95+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96+
end
97+
98+
hash[param] = _to_hash(value)
99+
end
100+
self.additional_properties.each_pair do |attr, value|
101+
hash[attr] = value
102+
end
103+
hash
104+
end
105+
106+
# Checks equality by comparing each attribute.
107+
# @param o [Object] Object to be compared
108+
# @!visibility private
109+
def ==(o)
110+
return true if self.equal?(o)
111+
self.class == o.class &&
112+
header == o.header &&
113+
parameter == o.parameter &&
114+
pointer == o.pointer &&
115+
additional_properties == o.additional_properties
116+
end
117+
118+
# Calculates hash code according to all attributes.
119+
# @return [Integer] Hash code
120+
# @!visibility private
121+
def hash
122+
[header, parameter, pointer, additional_properties].hash
123+
end
124+
end
125+
end

0 commit comments

Comments
 (0)