From 5da54baae876ec96d247b4ca2b7fdbeebc5f06cd Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 3 Jul 2025 15:41:28 +0000 Subject: [PATCH] Regenerate client from commit 86252ae7 of spec repo --- .apigentools-info | 8 +++--- .generator/schemas/v2/openapi.yaml | 4 +-- examples/v2/on-call/UpdateOnCallSchedule.py | 2 +- .../v2/model/layer_attributes.py | 2 +- .../v2/model/layer_attributes_interval.py | 2 +- ...te_request_data_attributes_layers_items.py | 2 +- ...te_request_data_attributes_layers_items.py | 2 +- ...oncall_schedule_returns_ok_response.frozen | 2 +- ...e_oncall_schedule_returns_ok_response.yaml | 28 +++++++++---------- tests/v2/features/on-call.feature | 6 ++-- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 04a4a979eb..80af36fcba 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-07-02 20:43:17.503949", - "spec_repo_commit": "e327e6df" + "regenerated": "2025-07-03 15:40:46.434231", + "spec_repo_commit": "86252ae7" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-07-02 20:43:17.520727", - "spec_repo_commit": "e327e6df" + "regenerated": "2025-07-03 15:40:46.449850", + "spec_repo_commit": "86252ae7" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 47b8b7dd30..18f71b9352 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -20008,7 +20008,7 @@ components: type: object LayerAttributesInterval: description: Defines how often the rotation repeats, using a combination of - days and optional seconds. + days and optional seconds. Should be at least 1 hour. properties: days: description: The number of days in each rotation cycle. @@ -33143,7 +33143,7 @@ components: - effective_date: '2025-02-03T05:00:00Z' end_date: '2025-12-31T00:00:00Z' interval: - seconds: 300 + seconds: 3600 members: - user: id: 00000000-aba1-0000-0000-000000000000 diff --git a/examples/v2/on-call/UpdateOnCallSchedule.py b/examples/v2/on-call/UpdateOnCallSchedule.py index 8c3500d2ee..70f5afb883 100644 --- a/examples/v2/on-call/UpdateOnCallSchedule.py +++ b/examples/v2/on-call/UpdateOnCallSchedule.py @@ -50,7 +50,7 @@ effective_date=(datetime.now() + relativedelta(days=-10)), end_date=(datetime.now() + relativedelta(days=10)), interval=LayerAttributesInterval( - seconds=300, + seconds=3600, ), members=[ ScheduleRequestDataAttributesLayersItemsMembersItems( diff --git a/src/datadog_api_client/v2/model/layer_attributes.py b/src/datadog_api_client/v2/model/layer_attributes.py index 5a2810d651..9496901068 100644 --- a/src/datadog_api_client/v2/model/layer_attributes.py +++ b/src/datadog_api_client/v2/model/layer_attributes.py @@ -62,7 +62,7 @@ def __init__( :param end_date: When the layer ceases to be active (ISO 8601). :type end_date: datetime, optional - :param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. + :param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour. :type interval: LayerAttributesInterval, optional :param name: The name of this layer. diff --git a/src/datadog_api_client/v2/model/layer_attributes_interval.py b/src/datadog_api_client/v2/model/layer_attributes_interval.py index 0a471eec49..c299e33e71 100644 --- a/src/datadog_api_client/v2/model/layer_attributes_interval.py +++ b/src/datadog_api_client/v2/model/layer_attributes_interval.py @@ -37,7 +37,7 @@ def openapi_types(_): def __init__(self_, days: Union[int, UnsetType] = unset, seconds: Union[int, UnsetType] = unset, **kwargs): """ - Defines how often the rotation repeats, using a combination of days and optional seconds. + Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour. :param days: The number of days in each rotation cycle. :type days: int, optional diff --git a/src/datadog_api_client/v2/model/schedule_create_request_data_attributes_layers_items.py b/src/datadog_api_client/v2/model/schedule_create_request_data_attributes_layers_items.py index a7ea498bf3..9457eceedd 100644 --- a/src/datadog_api_client/v2/model/schedule_create_request_data_attributes_layers_items.py +++ b/src/datadog_api_client/v2/model/schedule_create_request_data_attributes_layers_items.py @@ -71,7 +71,7 @@ def __init__( :param end_date: The date/time after which this layer no longer applies (in ISO 8601). :type end_date: datetime, optional - :param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. + :param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour. :type interval: LayerAttributesInterval :param members: A list of members who participate in this layer's rotation. diff --git a/src/datadog_api_client/v2/model/schedule_update_request_data_attributes_layers_items.py b/src/datadog_api_client/v2/model/schedule_update_request_data_attributes_layers_items.py index 6700d78184..d5a8e50b2f 100644 --- a/src/datadog_api_client/v2/model/schedule_update_request_data_attributes_layers_items.py +++ b/src/datadog_api_client/v2/model/schedule_update_request_data_attributes_layers_items.py @@ -78,7 +78,7 @@ def __init__( :param id: A unique identifier for the layer being updated. :type id: str, optional - :param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. + :param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour. :type interval: LayerAttributesInterval :param members: The members assigned to this layer. diff --git a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen index 48d671dd7d..2f290d18c0 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen @@ -1 +1 @@ -2025-05-29T04:54:24.605Z \ No newline at end of file +2025-07-03T14:30:45.232Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml index b9a6cd050c..2fa814fbf9 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1748494464@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1751553045@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1748494464@datadoghq.com","created_at":"2025-05-29T04:54:25.223093+00:00","modified_at":"2025-05-29T04:54:25.223093+00:00","email":"test-update_on_call_schedule_returns_ok_response-1748494464@datadoghq.com","icon":"https://secure.gravatar.com/avatar/6bc23e301121dc7a0a2d1adc71bbbc54?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","created_at":"2025-07-03T14:30:46.015046+00:00","modified_at":"2025-07-03T14:30:46.015046+00:00","email":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","icon":"https://secure.gravatar.com/avatar/8c4a38455f71bb12d82add5157f105a0?s=48&d=retro","title":"user title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,8 +22,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:24.605Z","end_date":"2025-06-08T04:54:24.605Z","interval":{"days":1},"members":[{"user":{"id":"fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:24.605Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","interval":{"days":1},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -33,7 +33,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"f12650c6-beae-40fd-a686-7e57d72216c6","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"b9dca7b6-b083-44d3-9971-6c2c796fb352","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -41,7 +41,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-ed2e958dacae5dbc","name":"test-name-ed2e958dacae5dbc"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-001d7ca9284aa632","name":"test-name-001d7ca9284aa632"},"type":"team"}}' headers: accept: - application/json @@ -51,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"type":"team","id":"522c3ff2-76b4-41db-8cfa-9bb9876145e4","attributes":{"name":"test-name-ed2e958dacae5dbc","handle":"test-handle-ed2e958dacae5dbc","summary":null,"description":null,"avatar":null,"banner":13,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:54:26.535052+00:00","modified_at":"2025-05-29T04:54:26.535061+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/522c3ff2-76b4-41db-8cfa-9bb9876145e4/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/522c3ff2-76b4-41db-8cfa-9bb9876145e4/permission-settings"}}}}} + string: '{"data":{"type":"team","id":"9ca20f11-ede5-4147-addb-25b7f91ce508","attributes":{"name":"test-name-001d7ca9284aa632","handle":"test-handle-001d7ca9284aa632","summary":null,"description":null,"avatar":null,"banner":13,"visible_modules":[],"hidden_modules":[],"created_at":"2025-07-03T14:30:46.275583+00:00","modified_at":"2025-07-03T14:30:46.275594+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/permission-settings"}}}}} ' headers: @@ -61,18 +61,18 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:24.605Z","end_date":"2025-06-08T04:54:24.605Z","id":"b9dca7b6-b083-44d3-9971-6c2c796fb352","interval":{"seconds":300},"members":[{"user":{"id":"fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:24.605Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"id":"f12650c6-beae-40fd-a686-7e57d72216c6","relationships":{"teams":{"data":[{"id":"522c3ff2-76b4-41db-8cfa-9bb9876145e4","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","interval":{"seconds":3600},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","relationships":{"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/schedules/f12650c6-beae-40fd-a686-7e57d72216c6 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698 response: body: - string: '{"data":{"id":"f12650c6-beae-40fd-a686-7e57d72216c6","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"b9dca7b6-b083-44d3-9971-6c2c796fb352","type":"layers"}]},"teams":{"data":[{"id":"522c3ff2-76b4-41db-8cfa-9bb9876145e4","type":"teams"}]}}}}' + string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -85,7 +85,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/522c3ff2-76b4-41db-8cfa-9bb9876145e4 + uri: https://api.datadoghq.com/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508 response: body: string: '' @@ -99,7 +99,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/f12650c6-beae-40fd-a686-7e57d72216c6 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698 response: body: string: '' @@ -113,7 +113,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382 + uri: https://api.datadoghq.com/api/v2/users/4ea279a2-581a-11f0-bb4d-bed6e06a25e4 response: body: string: '' diff --git a/tests/v2/features/on-call.feature b/tests/v2/features/on-call.feature index 2e612c6bf7..e2ee8ddd2b 100644 --- a/tests/v2/features/on-call.feature +++ b/tests/v2/features/on-call.feature @@ -221,7 +221,7 @@ Feature: On-Call Scenario: Update On-Call schedule returns "Bad Request" response Given new "UpdateOnCallSchedule" request And request contains "schedule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 300}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 3600}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 400 Bad Request @@ -229,7 +229,7 @@ Feature: On-Call Scenario: Update On-Call schedule returns "Not Found" response Given new "UpdateOnCallSchedule" request And request contains "schedule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 300}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 3600}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 404 Not Found @@ -240,6 +240,6 @@ Feature: On-Call And there is a valid "schedule" in the system And there is a valid "dd_team" in the system And request contains "schedule_id" parameter from "schedule.data.id" - And body with value {"data": { "id": "{{ schedule.data.id }}", "attributes": {"layers": [{"id": "{{ schedule.data.relationships.layers.data[0].id }}" , "effective_date": "{{ timeISO('now - 10d') }}", "end_date": "{{ timeISO('now + 10d') }}", "interval": {"seconds": 300}, "members": [{"user": {"id": "{{user.data.id}}"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "{{ timeISO('now - 5d') }}"}], "name": "{{ unique }}", "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "{{dd_team.data.id}}", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": { "id": "{{ schedule.data.id }}", "attributes": {"layers": [{"id": "{{ schedule.data.relationships.layers.data[0].id }}" , "effective_date": "{{ timeISO('now - 10d') }}", "end_date": "{{ timeISO('now + 10d') }}", "interval": {"seconds": 3600}, "members": [{"user": {"id": "{{user.data.id}}"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "{{ timeISO('now - 5d') }}"}], "name": "{{ unique }}", "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "{{dd_team.data.id}}", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 200 OK