Skip to content

Commit ad97c3d

Browse files
kwentclaude
andauthored
Release v1.3.0: Regenerate client from latest OpenAPI spec (#6)
* Release v1.3.0: Regenerate client from latest OpenAPI spec Why: The Python SDK was out of date with the latest Rootly API v1 spec, missing new endpoints and models added since v1.2.1. - Regenerate client from latest OpenAPI specification - Apply nullable enum fix to 1,350 model files - Add new endpoints: API Keys, SLAs, On-Calls, On-Call Pay Reports, Meeting Recordings, Catalog Checklist Templates, Catalog Entity Checklists, Catalog Properties - Add new incident actions: detach_from_parent, unmark_as_duplicate - Add new workflow task types: JSM Ops paging and alerts - Add new role permission types (catalogs, communication, SLAs, etc.) - BREAKING: Catalog Fields renamed to Catalog Properties - Restore pyproject.toml settings overwritten by generator - Update CHANGELOG.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix escalation path generation with OpenAPI spec patching The real issue was not anyOf vs oneOf — openapi-python-client cannot handle inline oneOf variants (objects with properties/required but no $ref). Additionally, the upstream spec has urgency_ids arrays missing items definitions. Added tools/fix_openapi_escalation_paths.py that: - Extracts inline rule variants into named component schemas - Fixes arrays missing items definitions - Replaces inline definitions with $ref pointers Escalation path endpoints now fully generate with typed rule models: alert_urgency, working_hour, json_path, field, service, deferral_window. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix ruff formatting on fix_openapi_escalation_paths.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Regenerate client after upstream urgency_ids array items fix Upstream spec now includes items: {type: "string"} on urgency_ids arrays. Regenerated output is identical since fix_openapi_escalation_paths.py already patched this, but swagger.json no longer needs to be committed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove array items patching from escalation paths fix script Upstream spec now correctly defines items on all array properties. Only the inline oneOf → $ref extraction is still needed (client bug). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Bump minimum Python version to 3.10 Generated code uses PEP 604 union syntax (str | None) via ruff UP rules. No from __future__ import annotations in generated files, so 3.9 would fail at runtime. CI test matrix already starts at 3.10. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Regenerate client with latest OpenAPI spec updates New fields from upstream spec changes: - filter[notification_types] on /v1/oncalls endpoint - calling_tree_enabled on live call router - time_zone, csv_file_url, xlsx_file_url on on-call pay reports - links.last now nullable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5d64fe7 commit ad97c3d

2,561 files changed

Lines changed: 64996 additions & 33835 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.3.0] - 2026-04-21
11+
12+
### Added
13+
- New Escalation Paths endpoints (create, read, update, delete, list) with typed rule models (alert urgency, working hour, JSON path, field, service, deferral window)
14+
- New API Keys endpoints (create, read, update, delete, list, rotate)
15+
- New SLA endpoints (create, read, update, delete, list)
16+
- New On-Call endpoints (list on-call users)
17+
- New On-Call Pay Reports endpoints (create, read, update, delete, list)
18+
- New Meeting Recordings endpoints (read, list)
19+
- New Catalog Checklist Templates endpoints (create, read, update, delete, list)
20+
- New Catalog Entity Checklists endpoints (read, list)
21+
- New Catalog Properties endpoints (create, read, update, delete, list) — replaces Catalog Fields
22+
- Catalog property endpoints for causes, environments, functionalities, incident types, services, and teams
23+
- New incident actions: `detach_from_parent_incident`, `unmark_as_duplicate_incident`
24+
- New workflow task type: `PageJsmopsOnCallRespondersTaskParams` — page JSM Ops on-call responders
25+
- New workflow task type: `CreateJsmopsAlertTaskParams` — create JSM Ops alerts
26+
- New role permission types: catalogs, communication, edge connectors, incident communication, paging, SLAs, sub-statuses
27+
- Alert trigger params: alert condition urgency support
28+
- Status page: CNAME records and section ordering support
29+
- Page Rootly on-call responders: functionality target support
30+
- GitHub issue task params: issue type and labels support
31+
- Zoom meeting: global dial-in numbers support
32+
33+
### Changed
34+
- Regenerated client from latest OpenAPI specification
35+
- **BREAKING**: Catalog Fields renamed to Catalog Properties across all endpoints and models
36+
- **BREAKING**: Minimum Python version bumped to 3.10
37+
38+
### Removed
39+
- Catalog Fields endpoints and models (replaced by Catalog Properties)
40+
- Some escalation policy path rule type models (consolidated in upstream spec)
41+
42+
### Fixed
43+
- Applied nullable enum fix to 1,348 model files via `tools/fix_nullable_enums.py`
44+
- Escalation path endpoints now fully generated — added `tools/fix_openapi_escalation_paths.py` to patch inline `oneOf` variants into named `$ref` schemas ([upstream bug](https://github.com/openapi-generators/openapi-python-client/issues/1428))
45+
1046
## [1.2.1] - 2025-03-02
1147

1248
### Fixed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "rootly"
3-
version = "1.2.1"
3+
version = "1.3.0"
44
description = "A client library for accessing Rootly API v1"
55
authors = []
66
readme = "README.md"
@@ -10,8 +10,8 @@ packages = [
1010
include = ["CHANGELOG.md", "rootly_sdk/py.typed"]
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.9"
14-
httpx = ">=0.23.0,<0.29.0"
13+
python = "^3.10"
14+
httpx = ">=0.20.0,<0.29.0"
1515
attrs = ">=22.2.0"
1616
python-dateutil = "^2.8.0"
1717

rootly_sdk/api/alert_events/create_alert_event.py

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from http import HTTPStatus
22
from typing import Any
3+
from urllib.parse import quote
34

45
import httpx
56

@@ -8,22 +9,25 @@
89
from ...models.alert_event_response import AlertEventResponse
910
from ...models.errors_list import ErrorsList
1011
from ...models.new_alert_event import NewAlertEvent
11-
from ...types import Response
12+
from ...types import UNSET, Response, Unset
1213

1314

1415
def _get_kwargs(
1516
alert_id: str,
1617
*,
17-
body: NewAlertEvent,
18+
body: NewAlertEvent | Unset = UNSET,
1819
) -> dict[str, Any]:
1920
headers: dict[str, Any] = {}
2021

2122
_kwargs: dict[str, Any] = {
2223
"method": "post",
23-
"url": f"/v1/alerts/{alert_id}/events",
24+
"url": "/v1/alerts/{alert_id}/events".format(
25+
alert_id=quote(str(alert_id), safe=""),
26+
),
2427
}
2528

26-
_kwargs["json"] = body.to_dict()
29+
if not isinstance(body, Unset):
30+
_kwargs["json"] = body.to_dict()
2731

2832
headers["Content-Type"] = "application/vnd.api+json"
2933

@@ -65,22 +69,22 @@ def sync_detailed(
6569
alert_id: str,
6670
*,
6771
client: AuthenticatedClient,
68-
body: NewAlertEvent,
72+
body: NewAlertEvent | Unset = UNSET,
6973
) -> Response[AlertEventResponse | ErrorsList]:
7074
"""Create alert event
7175
7276
Creates a new alert event
7377
7478
Args:
7579
alert_id (str):
76-
body (NewAlertEvent):
80+
body (NewAlertEvent | Unset):
7781
7882
Raises:
7983
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
8084
httpx.TimeoutException: If the request takes longer than Client.timeout.
8185
8286
Returns:
83-
Response[Union[AlertEventResponse, ErrorsList]]
87+
Response[AlertEventResponse | ErrorsList]
8488
"""
8589

8690
kwargs = _get_kwargs(
@@ -99,22 +103,22 @@ def sync(
99103
alert_id: str,
100104
*,
101105
client: AuthenticatedClient,
102-
body: NewAlertEvent,
106+
body: NewAlertEvent | Unset = UNSET,
103107
) -> AlertEventResponse | ErrorsList | None:
104108
"""Create alert event
105109
106110
Creates a new alert event
107111
108112
Args:
109113
alert_id (str):
110-
body (NewAlertEvent):
114+
body (NewAlertEvent | Unset):
111115
112116
Raises:
113117
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
114118
httpx.TimeoutException: If the request takes longer than Client.timeout.
115119
116120
Returns:
117-
Union[AlertEventResponse, ErrorsList]
121+
AlertEventResponse | ErrorsList
118122
"""
119123

120124
return sync_detailed(
@@ -128,22 +132,22 @@ async def asyncio_detailed(
128132
alert_id: str,
129133
*,
130134
client: AuthenticatedClient,
131-
body: NewAlertEvent,
135+
body: NewAlertEvent | Unset = UNSET,
132136
) -> Response[AlertEventResponse | ErrorsList]:
133137
"""Create alert event
134138
135139
Creates a new alert event
136140
137141
Args:
138142
alert_id (str):
139-
body (NewAlertEvent):
143+
body (NewAlertEvent | Unset):
140144
141145
Raises:
142146
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
143147
httpx.TimeoutException: If the request takes longer than Client.timeout.
144148
145149
Returns:
146-
Response[Union[AlertEventResponse, ErrorsList]]
150+
Response[AlertEventResponse | ErrorsList]
147151
"""
148152

149153
kwargs = _get_kwargs(
@@ -160,22 +164,22 @@ async def asyncio(
160164
alert_id: str,
161165
*,
162166
client: AuthenticatedClient,
163-
body: NewAlertEvent,
167+
body: NewAlertEvent | Unset = UNSET,
164168
) -> AlertEventResponse | ErrorsList | None:
165169
"""Create alert event
166170
167171
Creates a new alert event
168172
169173
Args:
170174
alert_id (str):
171-
body (NewAlertEvent):
175+
body (NewAlertEvent | Unset):
172176
173177
Raises:
174178
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
175179
httpx.TimeoutException: If the request takes longer than Client.timeout.
176180
177181
Returns:
178-
Union[AlertEventResponse, ErrorsList]
182+
AlertEventResponse | ErrorsList
179183
"""
180184

181185
return (

rootly_sdk/api/alert_events/delete_alert_event.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from http import HTTPStatus
22
from typing import Any, cast
3+
from urllib.parse import quote
34

45
import httpx
56

@@ -12,9 +13,12 @@
1213
def _get_kwargs(
1314
id: str,
1415
) -> dict[str, Any]:
16+
1517
_kwargs: dict[str, Any] = {
1618
"method": "delete",
17-
"url": f"/v1/alert_events/{id}",
19+
"url": "/v1/alert_events/{id}".format(
20+
id=quote(str(id), safe=""),
21+
),
1822
}
1923

2024
return _kwargs
@@ -63,7 +67,7 @@ def sync_detailed(
6367
httpx.TimeoutException: If the request takes longer than Client.timeout.
6468
6569
Returns:
66-
Response[Union[Any, ErrorsList]]
70+
Response[Any | ErrorsList]
6771
"""
6872

6973
kwargs = _get_kwargs(
@@ -95,7 +99,7 @@ def sync(
9599
httpx.TimeoutException: If the request takes longer than Client.timeout.
96100
97101
Returns:
98-
Union[Any, ErrorsList]
102+
Any | ErrorsList
99103
"""
100104

101105
return sync_detailed(
@@ -122,7 +126,7 @@ async def asyncio_detailed(
122126
httpx.TimeoutException: If the request takes longer than Client.timeout.
123127
124128
Returns:
125-
Response[Union[Any, ErrorsList]]
129+
Response[Any | ErrorsList]
126130
"""
127131

128132
kwargs = _get_kwargs(
@@ -152,7 +156,7 @@ async def asyncio(
152156
httpx.TimeoutException: If the request takes longer than Client.timeout.
153157
154158
Returns:
155-
Union[Any, ErrorsList]
159+
Any | ErrorsList
156160
"""
157161

158162
return (

rootly_sdk/api/alert_events/get_alert_event.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from http import HTTPStatus
22
from typing import Any
3+
from urllib.parse import quote
34

45
import httpx
56

@@ -13,9 +14,12 @@
1314
def _get_kwargs(
1415
id: str,
1516
) -> dict[str, Any]:
17+
1618
_kwargs: dict[str, Any] = {
1719
"method": "get",
18-
"url": f"/v1/alert_events/{id}",
20+
"url": "/v1/alert_events/{id}".format(
21+
id=quote(str(id), safe=""),
22+
),
1923
}
2024

2125
return _kwargs
@@ -68,7 +72,7 @@ def sync_detailed(
6872
httpx.TimeoutException: If the request takes longer than Client.timeout.
6973
7074
Returns:
71-
Response[Union[AlertEventResponse, ErrorsList]]
75+
Response[AlertEventResponse | ErrorsList]
7276
"""
7377

7478
kwargs = _get_kwargs(
@@ -99,7 +103,7 @@ def sync(
99103
httpx.TimeoutException: If the request takes longer than Client.timeout.
100104
101105
Returns:
102-
Union[AlertEventResponse, ErrorsList]
106+
AlertEventResponse | ErrorsList
103107
"""
104108

105109
return sync_detailed(
@@ -125,7 +129,7 @@ async def asyncio_detailed(
125129
httpx.TimeoutException: If the request takes longer than Client.timeout.
126130
127131
Returns:
128-
Response[Union[AlertEventResponse, ErrorsList]]
132+
Response[AlertEventResponse | ErrorsList]
129133
"""
130134

131135
kwargs = _get_kwargs(
@@ -154,7 +158,7 @@ async def asyncio(
154158
httpx.TimeoutException: If the request takes longer than Client.timeout.
155159
156160
Returns:
157-
Union[AlertEventResponse, ErrorsList]
161+
AlertEventResponse | ErrorsList
158162
"""
159163

160164
return (

0 commit comments

Comments
 (0)