Skip to content

Commit ba7182a

Browse files
Merge pull request #81 from devopsarr/feature/code-generation
fix(deps): update openapitools/openapi-generator-cli docker tag to v7.11.0
2 parents d9ee3af + 8a1e7ad commit ba7182a

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
55

66
- API version: v4.0.12.2823
77
- Package version: 1.0.2 <!--- x-release-please-version -->
8-
- Generator version: 7.10.0
8+
- Generator version: 7.11.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

1111
## Requirements.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include = ["sonarr/py.typed"]
1212
[tool.poetry.dependencies]
1313
python = "^3.8"
1414

15-
urllib3 = ">= 1.25.3 < 3.0.0"
15+
urllib3 = ">= 1.25.3, < 3.0.0"
1616
python-dateutil = ">= 2.8.2"
1717
pydantic = ">= 2"
1818
typing-extensions = ">= 4.7.1"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application.
4848
""", # noqa: E501
4949
package_data={"sonarr": ["py.typed"]},
50-
)
50+
)

sonarr/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def parameters_to_url_query(self, params, collection_formats):
517517
if k in collection_formats:
518518
collection_format = collection_formats[k]
519519
if collection_format == 'multi':
520-
new_params.extend((k, str(value)) for value in v)
520+
new_params.extend((k, quote(str(value))) for value in v)
521521
else:
522522
if collection_format == 'ssv':
523523
delimiter = ' '

sonarr/exceptions.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ def from_response(
150150
if http_resp.status == 404:
151151
raise NotFoundException(http_resp=http_resp, body=body, data=data)
152152

153+
# Added new conditions for 409 and 422
154+
if http_resp.status == 409:
155+
raise ConflictException(http_resp=http_resp, body=body, data=data)
156+
157+
if http_resp.status == 422:
158+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
159+
153160
if 500 <= http_resp.status <= 599:
154161
raise ServiceException(http_resp=http_resp, body=body, data=data)
155162
raise ApiException(http_resp=http_resp, body=body, data=data)
@@ -188,6 +195,16 @@ class ServiceException(ApiException):
188195
pass
189196

190197

198+
class ConflictException(ApiException):
199+
"""Exception for HTTP 409 Conflict."""
200+
pass
201+
202+
203+
class UnprocessableEntityException(ApiException):
204+
"""Exception for HTTP 422 Unprocessable Entity."""
205+
pass
206+
207+
191208
def render_path(path_to_item):
192209
"""Returns a string representation of a path"""
193210
result = ""

0 commit comments

Comments
 (0)