Skip to content

Commit 774ea50

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 281416b6 of spec repo
1 parent a1efc3f commit 774ea50

File tree

7 files changed

+41
-56
lines changed

7 files changed

+41
-56
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-27 10:37:41.709330",
8-
"spec_repo_commit": "c75940cb"
7+
"regenerated": "2025-05-27 12:00:48.164902",
8+
"spec_repo_commit": "281416b6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-27 10:37:41.725491",
13-
"spec_repo_commit": "c75940cb"
12+
"regenerated": "2025-05-27 12:00:48.181366",
13+
"spec_repo_commit": "281416b6"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30401,6 +30401,7 @@ components:
3040130401
type: string
3040230402
time_restriction:
3040330403
$ref: '#/components/schemas/TimeRestrictions'
30404+
nullable: true
3040430405
urgency:
3040530406
$ref: '#/components/schemas/Urgency'
3040630407
type: object
@@ -30416,8 +30417,7 @@ components:
3041630417
properties:
3041730418
data:
3041830419
$ref: '#/components/schemas/RoutingRuleRelationshipsPolicyData'
30419-
required:
30420-
- data
30420+
nullable: true
3042130421
type: object
3042230422
RoutingRuleRelationshipsPolicyData:
3042330423
description: Represents the policy data reference, containing the policy's ID
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-21T11:01:55.512Z
1+
2025-05-27T08:25:42.329Z

cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.yml

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/v2/on-call/SetOnCallTeamRoutingRules.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
}),
4040
],
4141
}),
42-
urgency: DatadogAPIClient::V2::Urgency::HIGH,
4342
}),
4443
DatadogAPIClient::V2::TeamRoutingRulesRequestRule.new({
4544
policy_id: ESCALATION_POLICY_DATA_ID,
@@ -52,4 +51,7 @@
5251
type: DatadogAPIClient::V2::TeamRoutingRulesRequestDataType::TEAM_ROUTING_RULES,
5352
}),
5453
})
55-
p api_instance.set_on_call_team_routing_rules(DD_TEAM_DATA_ID, body)
54+
opts = {
55+
include: "rules",
56+
}
57+
p api_instance.set_on_call_team_routing_rules(DD_TEAM_DATA_ID, body, opts)

features/v2/on-call.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ Feature: On-Call
154154
And there is a valid "schedule" in the system
155155
And there is a valid "escalation_policy" in the system
156156
And request contains "team_id" parameter from "dd_team.data.id"
157-
And body with value {"data": {"attributes": {"rules": [{"actions": [{"channel": "channel", "type": "send_slack_message", "workspace": "workspace"}], "query": "tags.service:test", "time_restriction": {"time_zone": "Europe/Paris", "restrictions": [{"end_day": "monday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}, {"end_day": "tuesday", "end_time": "17:00:00", "start_day": "tuesday", "start_time": "09:00:00"}]}, "urgency": "high"}, {"policy_id": "{{ escalation_policy.data.id }}", "query": "", "urgency": "low"}]}, "id": "{{ dd_team.data.id }}", "type": "team_routing_rules"}}
157+
And body with value {"data": {"attributes": {"rules": [{"actions": [{"channel": "channel", "type": "send_slack_message", "workspace": "workspace"}], "query": "tags.service:test", "time_restriction": {"time_zone": "Europe/Paris", "restrictions": [{"end_day": "monday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}, {"end_day": "tuesday", "end_time": "17:00:00", "start_day": "tuesday", "start_time": "09:00:00"}]}}, {"policy_id": "{{ escalation_policy.data.id }}", "query": "", "urgency": "low"}]}, "id": "{{ dd_team.data.id }}", "type": "team_routing_rules"}}
158+
And request contains "include" parameter with value "rules"
158159
When the request is sent
159160
Then the response status is 200 OK
160161

lib/datadog_api_client/v2/models/routing_rule_relationships_policy.rb

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class RoutingRuleRelationshipsPolicy
2222
include BaseGenericModel
2323

2424
# Represents the policy data reference, containing the policy's ID and resource type.
25-
attr_reader :data
25+
attr_accessor :data
2626

2727
attr_accessor :additional_properties
2828

@@ -65,24 +65,6 @@ def initialize(attributes = {})
6565
end
6666
end
6767

68-
# Check to see if the all the properties in the model are valid
69-
# @return true if the model is valid
70-
# @!visibility private
71-
def valid?
72-
return false if @data.nil?
73-
true
74-
end
75-
76-
# Custom attribute writer method with validation
77-
# @param data [Object] Object to be assigned
78-
# @!visibility private
79-
def data=(data)
80-
if data.nil?
81-
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
82-
end
83-
@data = data
84-
end
85-
8668
# Returns the object in the form of hash, with additionalProperties support.
8769
# @return [Hash] Returns the object in the form of hash
8870
# @!visibility private

0 commit comments

Comments
 (0)