Skip to content

Commit ff3a62f

Browse files
committed
Release v1.1.1: Fix nullable enums, regenerate client
- Fix nullable enum properties handling null values from API - Add post-generation fix script (tools/fix_nullable_enums.py) - New incident list filters (functionality_names, service_names, team_names) - New workflow tasks (MS Teams, Confluence, Datadog, Dropbox, Quip, SharePoint) - Deprecate Catalog Entity Property endpoints - Upstream bug filed: openapi-generators/openapi-python-client#1405
1 parent 6c0deff commit ff3a62f

1,513 files changed

Lines changed: 21736 additions & 3045 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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.1] - 2025-02-25
11+
12+
### Fixed
13+
- Nullable enum properties now correctly handle `null` values from the API ([#1405](https://github.com/openapi-generators/openapi-python-client/issues/1405))
14+
- Added post-generation fix script (`tools/fix_nullable_enums.py`) to patch enum check functions
15+
- Resolves `TypeError: Unexpected value None` when API returns null for nullable enum fields like `conditionable_type`
16+
17+
### Added
18+
- New incident list filters: `filter[functionality_names]`, `filter[service_names]`, `filter[team_names]`
19+
- New workflow task types:
20+
- `AddMicrosoftTeamsChatTabTaskParams` - Add tabs to Microsoft Teams chats
21+
- `SendMicrosoftTeamsChatMessageTaskParams` - Send messages to Microsoft Teams chats
22+
- `UpdateConfluencePageTaskParams` - Update Confluence pages
23+
- `UpdateDatadogNotebookTaskParams` - Update Datadog notebooks
24+
- `UpdateDropboxPaperPageTaskParams` - Update Dropbox Paper pages
25+
- `UpdateQuipPageTaskParams` - Update Quip pages
26+
- `UpdateSharepointPageTaskParams` - Update SharePoint pages
27+
- Alert route and alert group endpoint enhancements
28+
29+
### Changed
30+
- Regenerated client from latest OpenAPI specification
31+
- Updated Makefile to automatically apply nullable enum fix after regeneration
32+
33+
### Deprecated
34+
- Catalog Entity Property endpoints - use `fields` attribute on catalog entities or native catalog endpoints instead
35+
1036
## [1.1.0] - 2025-12-18
1137

1238
### Added

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ regenerate:
3939
--output-path . \
4040
--overwrite \
4141
--config tools/config.yaml
42+
@echo "Applying nullable enum fix..."
43+
@python tools/fix_nullable_enums.py
4244

4345
test:
4446
python -c "import rootly_sdk; print('SDK imports successfully')"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "rootly"
3-
version = "v1"
3+
version = "1.1.1"
44
description = "A client library for accessing Rootly API v1"
55
authors = []
66
readme = "README.md"

rootly_sdk/api/alert_groups/create_alert_group.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ def sync_detailed(
7272
) -> Response[Union[AlertGroupResponse, ErrorsList]]:
7373
"""Creates an alert group
7474
75-
Creates a new alert group
75+
Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider
76+
using the advanced alert grouping with `conditions` field instead of the legacy
77+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
7678
7779
Args:
7880
body (NewAlertGroup):
@@ -103,7 +105,9 @@ def sync(
103105
) -> Optional[Union[AlertGroupResponse, ErrorsList]]:
104106
"""Creates an alert group
105107
106-
Creates a new alert group
108+
Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider
109+
using the advanced alert grouping with `conditions` field instead of the legacy
110+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
107111
108112
Args:
109113
body (NewAlertGroup):
@@ -129,7 +133,9 @@ async def asyncio_detailed(
129133
) -> Response[Union[AlertGroupResponse, ErrorsList]]:
130134
"""Creates an alert group
131135
132-
Creates a new alert group
136+
Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider
137+
using the advanced alert grouping with `conditions` field instead of the legacy
138+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
133139
134140
Args:
135141
body (NewAlertGroup):
@@ -158,7 +164,9 @@ async def asyncio(
158164
) -> Optional[Union[AlertGroupResponse, ErrorsList]]:
159165
"""Creates an alert group
160166
161-
Creates a new alert group
167+
Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider
168+
using the advanced alert grouping with `conditions` field instead of the legacy
169+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
162170
163171
Args:
164172
body (NewAlertGroup):

rootly_sdk/api/alert_groups/update_alert_group.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ def sync_detailed(
7070
) -> Response[Union[AlertGroupResponse, ErrorsList]]:
7171
"""Update an alert group
7272
73-
Update a specific alert group by id
73+
Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility,
74+
consider using the advanced alert grouping with `conditions` field instead of the legacy
75+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
7476
7577
Args:
7678
id (Union[UUID, str]):
@@ -104,7 +106,9 @@ def sync(
104106
) -> Optional[Union[AlertGroupResponse, ErrorsList]]:
105107
"""Update an alert group
106108
107-
Update a specific alert group by id
109+
Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility,
110+
consider using the advanced alert grouping with `conditions` field instead of the legacy
111+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
108112
109113
Args:
110114
id (Union[UUID, str]):
@@ -133,7 +137,9 @@ async def asyncio_detailed(
133137
) -> Response[Union[AlertGroupResponse, ErrorsList]]:
134138
"""Update an alert group
135139
136-
Update a specific alert group by id
140+
Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility,
141+
consider using the advanced alert grouping with `conditions` field instead of the legacy
142+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
137143
138144
Args:
139145
id (Union[UUID, str]):
@@ -165,7 +171,9 @@ async def asyncio(
165171
) -> Optional[Union[AlertGroupResponse, ErrorsList]]:
166172
"""Update an alert group
167173
168-
Update a specific alert group by id
174+
Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility,
175+
consider using the advanced alert grouping with `conditions` field instead of the legacy
176+
`group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields.
169177
170178
Args:
171179
id (Union[UUID, str]):

rootly_sdk/api/alert_routes/get_alert_route.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ def sync_detailed(
6666
Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing.
6767
If you're unsure whether you have access to this feature, please contact Rootly customer support.**
6868
69+
## Optional Parameters
70+
71+
- **show_nested_ids** (query parameter): When set to `true`, the response will include IDs for all
72+
nested resources (destinations, condition_groups, conditions). This is useful when you need to
73+
reference these nested resources for updates or deletions via PATCH requests.
74+
75+
Example: `GET /v1/alert_routes/{id}?show_nested_ids=true`
76+
6977
Args:
7078
id (str):
7179
@@ -98,6 +106,14 @@ def sync(
98106
Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing.
99107
If you're unsure whether you have access to this feature, please contact Rootly customer support.**
100108
109+
## Optional Parameters
110+
111+
- **show_nested_ids** (query parameter): When set to `true`, the response will include IDs for all
112+
nested resources (destinations, condition_groups, conditions). This is useful when you need to
113+
reference these nested resources for updates or deletions via PATCH requests.
114+
115+
Example: `GET /v1/alert_routes/{id}?show_nested_ids=true`
116+
101117
Args:
102118
id (str):
103119
@@ -125,6 +141,14 @@ async def asyncio_detailed(
125141
Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing.
126142
If you're unsure whether you have access to this feature, please contact Rootly customer support.**
127143
144+
## Optional Parameters
145+
146+
- **show_nested_ids** (query parameter): When set to `true`, the response will include IDs for all
147+
nested resources (destinations, condition_groups, conditions). This is useful when you need to
148+
reference these nested resources for updates or deletions via PATCH requests.
149+
150+
Example: `GET /v1/alert_routes/{id}?show_nested_ids=true`
151+
128152
Args:
129153
id (str):
130154
@@ -155,6 +179,14 @@ async def asyncio(
155179
Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing.
156180
If you're unsure whether you have access to this feature, please contact Rootly customer support.**
157181
182+
## Optional Parameters
183+
184+
- **show_nested_ids** (query parameter): When set to `true`, the response will include IDs for all
185+
nested resources (destinations, condition_groups, conditions). This is useful when you need to
186+
reference these nested resources for updates or deletions via PATCH requests.
187+
188+
Example: `GET /v1/alert_routes/{id}?show_nested_ids=true`
189+
158190
Args:
159191
id (str):
160192
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
from http import HTTPStatus
2+
from typing import Any, Optional, Union
3+
4+
import httpx
5+
6+
from ... import errors
7+
from ...client import AuthenticatedClient, Client
8+
from ...models.alert_route_response import AlertRouteResponse
9+
from ...models.errors_list import ErrorsList
10+
from ...models.patch_alert_route import PatchAlertRoute
11+
from ...types import Response
12+
13+
14+
def _get_kwargs(
15+
id: str,
16+
*,
17+
body: PatchAlertRoute,
18+
) -> dict[str, Any]:
19+
headers: dict[str, Any] = {}
20+
21+
_kwargs: dict[str, Any] = {
22+
"method": "patch",
23+
"url": f"/v1/alert_routes/{id}",
24+
}
25+
26+
_kwargs["json"] = body.to_dict()
27+
28+
headers["Content-Type"] = "application/vnd.api+json"
29+
30+
_kwargs["headers"] = headers
31+
return _kwargs
32+
33+
34+
def _parse_response(
35+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
36+
) -> Optional[Union[AlertRouteResponse, ErrorsList]]:
37+
if response.status_code == 200:
38+
response_200 = AlertRouteResponse.from_dict(response.json())
39+
40+
return response_200
41+
42+
if response.status_code == 401:
43+
response_401 = ErrorsList.from_dict(response.json())
44+
45+
return response_401
46+
47+
if response.status_code == 404:
48+
response_404 = ErrorsList.from_dict(response.json())
49+
50+
return response_404
51+
52+
if response.status_code == 422:
53+
response_422 = ErrorsList.from_dict(response.json())
54+
55+
return response_422
56+
57+
if client.raise_on_unexpected_status:
58+
raise errors.UnexpectedStatus(response.status_code, response.content)
59+
else:
60+
return None
61+
62+
63+
def _build_response(
64+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
65+
) -> Response[Union[AlertRouteResponse, ErrorsList]]:
66+
return Response(
67+
status_code=HTTPStatus(response.status_code),
68+
content=response.content,
69+
headers=response.headers,
70+
parsed=_parse_response(client=client, response=response),
71+
)
72+
73+
74+
def sync_detailed(
75+
id: str,
76+
*,
77+
client: AuthenticatedClient,
78+
body: PatchAlertRoute,
79+
) -> Response[Union[AlertRouteResponse, ErrorsList]]:
80+
"""Update an alert route
81+
82+
Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're
83+
unsure whether you have access to this feature, please contact Rootly customer support.**
84+
85+
Args:
86+
id (str):
87+
body (PatchAlertRoute):
88+
89+
Raises:
90+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
91+
httpx.TimeoutException: If the request takes longer than Client.timeout.
92+
93+
Returns:
94+
Response[Union[AlertRouteResponse, ErrorsList]]
95+
"""
96+
97+
kwargs = _get_kwargs(
98+
id=id,
99+
body=body,
100+
)
101+
102+
response = client.get_httpx_client().request(
103+
**kwargs,
104+
)
105+
106+
return _build_response(client=client, response=response)
107+
108+
109+
def sync(
110+
id: str,
111+
*,
112+
client: AuthenticatedClient,
113+
body: PatchAlertRoute,
114+
) -> Optional[Union[AlertRouteResponse, ErrorsList]]:
115+
"""Update an alert route
116+
117+
Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're
118+
unsure whether you have access to this feature, please contact Rootly customer support.**
119+
120+
Args:
121+
id (str):
122+
body (PatchAlertRoute):
123+
124+
Raises:
125+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
126+
httpx.TimeoutException: If the request takes longer than Client.timeout.
127+
128+
Returns:
129+
Union[AlertRouteResponse, ErrorsList]
130+
"""
131+
132+
return sync_detailed(
133+
id=id,
134+
client=client,
135+
body=body,
136+
).parsed
137+
138+
139+
async def asyncio_detailed(
140+
id: str,
141+
*,
142+
client: AuthenticatedClient,
143+
body: PatchAlertRoute,
144+
) -> Response[Union[AlertRouteResponse, ErrorsList]]:
145+
"""Update an alert route
146+
147+
Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're
148+
unsure whether you have access to this feature, please contact Rootly customer support.**
149+
150+
Args:
151+
id (str):
152+
body (PatchAlertRoute):
153+
154+
Raises:
155+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
156+
httpx.TimeoutException: If the request takes longer than Client.timeout.
157+
158+
Returns:
159+
Response[Union[AlertRouteResponse, ErrorsList]]
160+
"""
161+
162+
kwargs = _get_kwargs(
163+
id=id,
164+
body=body,
165+
)
166+
167+
response = await client.get_async_httpx_client().request(**kwargs)
168+
169+
return _build_response(client=client, response=response)
170+
171+
172+
async def asyncio(
173+
id: str,
174+
*,
175+
client: AuthenticatedClient,
176+
body: PatchAlertRoute,
177+
) -> Optional[Union[AlertRouteResponse, ErrorsList]]:
178+
"""Update an alert route
179+
180+
Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're
181+
unsure whether you have access to this feature, please contact Rootly customer support.**
182+
183+
Args:
184+
id (str):
185+
body (PatchAlertRoute):
186+
187+
Raises:
188+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
189+
httpx.TimeoutException: If the request takes longer than Client.timeout.
190+
191+
Returns:
192+
Union[AlertRouteResponse, ErrorsList]
193+
"""
194+
195+
return (
196+
await asyncio_detailed(
197+
id=id,
198+
client=client,
199+
body=body,
200+
)
201+
).parsed

0 commit comments

Comments
 (0)