Skip to content

Commit eb5c8c0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7b7ec49c of spec repo
1 parent 79935ce commit eb5c8c0

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": "2024-12-19 07:26:22.629677",
8-
"spec_repo_commit": "5dd2cbe4"
7+
"regenerated": "2024-12-20 20:08:03.300866",
8+
"spec_repo_commit": "7b7ec49c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-19 07:26:22.647976",
13-
"spec_repo_commit": "5dd2cbe4"
12+
"regenerated": "2024-12-20 20:08:03.315862",
13+
"spec_repo_commit": "7b7ec49c"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14770,6 +14770,12 @@ components:
1477014770
the error.
1477114771
example: Missing required attribute in body
1477214772
type: string
14773+
meta:
14774+
additionalProperties: {}
14775+
description: Non-standard meta-information about the error
14776+
type: object
14777+
source:
14778+
$ref: '#/components/schemas/JSONAPIErrorItemSource'
1477314779
status:
1477414780
description: Status code of the response.
1477514781
example: '400'
@@ -14779,6 +14785,24 @@ components:
1477914785
example: Bad Request
1478014786
type: string
1478114787
type: object
14788+
JSONAPIErrorItemSource:
14789+
description: References to the source of the error.
14790+
properties:
14791+
header:
14792+
description: a string indicating the name of a single request header which
14793+
caused the error.
14794+
example: Authorization
14795+
type: string
14796+
parameter:
14797+
description: A string indicating which URI query parameter caused the error.
14798+
example: limit
14799+
type: string
14800+
pointer:
14801+
description: A JSON Pointer to the value in the request document that caused
14802+
the error.
14803+
example: /data/attributes/title
14804+
type: string
14805+
type: object
1478214806
JSONAPIErrorResponse:
1478314807
description: API error response.
1478414808
properties:

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ def overrides
17871787
"v2.job_definition" => "JobDefinition",
17881788
"v2.job_definition_from_rule" => "JobDefinitionFromRule",
17891789
"v2.jsonapi_error_item" => "JSONAPIErrorItem",
1790+
"v2.jsonapi_error_item_source" => "JSONAPIErrorItemSource",
17901791
"v2.jsonapi_error_response" => "JSONAPIErrorResponse",
17911792
"v2.leaked_key" => "LeakedKey",
17921793
"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+
Contact: support@datadoghq.com
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)