Skip to content

Commit

Permalink
Merge pull request #91 from devopsarr/feature/code-generation
Browse files Browse the repository at this point in the history
fix(deps): update openapitools/openapi-generator-cli docker tag to v7.11.0
  • Loading branch information
devopsarr[bot] authored Jan 20, 2025
2 parents 9743dcd + aad773e commit 18fbcc8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:

- API version: v5.17.2.9580
- Package version: 1.1.1 <!--- x-release-please-version -->
- Generator version: 7.10.0
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include = ["radarr/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"

urllib3 = ">= 1.25.3 < 3.0.0"
urllib3 = ">= 1.25.3, < 3.0.0"
python-dateutil = ">= 2.8.2"
pydantic = ">= 2"
typing-extensions = ">= 4.7.1"
Expand Down
2 changes: 1 addition & 1 deletion radarr/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def parameters_to_url_query(self, params, collection_formats):
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
new_params.extend((k, str(value)) for value in v)
new_params.extend((k, quote(str(value))) for value in v)
else:
if collection_format == 'ssv':
delimiter = ' '
Expand Down
17 changes: 17 additions & 0 deletions radarr/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ def from_response(
if http_resp.status == 404:
raise NotFoundException(http_resp=http_resp, body=body, data=data)

# Added new conditions for 409 and 422
if http_resp.status == 409:
raise ConflictException(http_resp=http_resp, body=body, data=data)

if http_resp.status == 422:
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)

if 500 <= http_resp.status <= 599:
raise ServiceException(http_resp=http_resp, body=body, data=data)
raise ApiException(http_resp=http_resp, body=body, data=data)
Expand Down Expand Up @@ -188,6 +195,16 @@ class ServiceException(ApiException):
pass


class ConflictException(ApiException):
"""Exception for HTTP 409 Conflict."""
pass


class UnprocessableEntityException(ApiException):
"""Exception for HTTP 422 Unprocessable Entity."""
pass


def render_path(path_to_item):
"""Returns a string representation of a path"""
result = ""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
Radarr API docs
""", # noqa: E501
package_data={"radarr": ["py.typed"]},
)
)

0 comments on commit 18fbcc8

Please sign in to comment.