Skip to content

Commit 490edd1

Browse files
daniel-m-ddci.datadog-api-specNaOHman
authored
Fix api_instance name with a dash (#2398)
* Fix api_instance name with a dash * pre-commit fixes --------- Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: Jeffrey <jeffrey.lyman@datadoghq.com>
1 parent 0caf79b commit 490edd1

11 files changed

+12
-11
lines changed

.generator/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ def operation_specs(specs):
279279
def api(context, api_version, specs, name):
280280
"""Return an API instance."""
281281
assert name in {tag["name"].replace(" ", "") for tag in specs[api_version]["tags"]}
282-
context["api_instance"] = {"name": name}
282+
instance_name = name.replace("-", "")
283+
context["api_instance"] = {"name": instance_name}
283284

284285

285286
@given(parsers.parse('operation "{name}" enabled'))

examples/v2/on-call/CreateOnCallEscalationPolicy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Create on-call escalation policy returns "Created" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "user" in the system
77
USER_DATA_ID = ENV["USER_DATA_ID"]

examples/v2/on-call/CreateOnCallSchedule.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Create on-call schedule returns "Created" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "user" in the system
77
USER_DATA_ID = ENV["USER_DATA_ID"]

examples/v2/on-call/DeleteOnCallEscalationPolicy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Delete on-call escalation policy returns "No Content" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "escalation_policy" in the system
77
ESCALATION_POLICY_DATA_ID = ENV["ESCALATION_POLICY_DATA_ID"]

examples/v2/on-call/DeleteOnCallSchedule.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Delete on-call schedule returns "No Content" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "schedule" in the system
77
SCHEDULE_DATA_ID = ENV["SCHEDULE_DATA_ID"]

examples/v2/on-call/GetOnCallEscalationPolicy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Get on-call escalation policy returns "OK" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "escalation_policy" in the system
77
ESCALATION_POLICY_DATA_ID = ENV["ESCALATION_POLICY_DATA_ID"]

examples/v2/on-call/GetOnCallSchedule.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Get on-call schedule returns "OK" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "schedule" in the system
77
SCHEDULE_DATA_ID = ENV["SCHEDULE_DATA_ID"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Get on-call team routing rules returns "OK" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55
p api_instance.get_on_call_team_routing_rules("27590dae-47be-4a7d-9abf-8f4e45124020")

examples/v2/on-call/SetOnCallTeamRoutingRules.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Set on-call team routing rules returns "OK" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "dd_team" in the system
77
DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"]

examples/v2/on-call/UpdateOnCallEscalationPolicy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Update on-call escalation policy returns "OK" response
22

33
require "datadog_api_client"
4-
api_instance = DatadogAPIClient::V2::On - CallAPI.new
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
55

66
# there is a valid "escalation_policy" in the system
77
ESCALATION_POLICY_DATA_ID = ENV["ESCALATION_POLICY_DATA_ID"]

0 commit comments

Comments
 (0)