Skip to content

Commit dcd8a2b

Browse files
Merge pull request #99 from devopsarr/feature/code-generation
fix(deps): update openapitools/openapi-generator-cli docker tag to v7.21.0
2 parents a32556f + a539516 commit dcd8a2b

105 files changed

Lines changed: 439 additions & 317 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.

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.17.2952
77
- Package version: 1.1.1 <!--- x-release-please-version -->
8-
- Generator version: 7.20.0
8+
- Generator version: 7.21.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
@@ -13,7 +13,7 @@ requires-python = ">=3.9"
1313
dependencies = [
1414
"urllib3 (>=2.1.0,<3.0.0)",
1515
"python-dateutil (>=2.8.2)",
16-
"pydantic (>=2)",
16+
"pydantic (>=2.11)",
1717
"typing-extensions (>=4.7.1)",
1818
]
1919

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
urllib3 >= 2.1.0, < 3.0.0
22
python_dateutil >= 2.8.2
3-
pydantic >= 2
3+
pydantic >= 2.11
44
typing-extensions >= 4.7.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
REQUIRES = [
2525
"urllib3 >= 2.1.0, < 3.0.0",
2626
"python-dateutil >= 2.8.2",
27-
"pydantic >= 2",
27+
"pydantic >= 2.11",
2828
"typing-extensions >= 4.7.1",
2929
]
3030

sonarr/api_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class ApiClient:
6868
'date': datetime.date,
6969
'datetime': datetime.datetime,
7070
'decimal': decimal.Decimal,
71+
'UUID': uuid.UUID,
7172
'object': object,
7273
}
7374
_pool = None
@@ -305,7 +306,7 @@ def response_deserialize(
305306
response_text = None
306307
return_data = None
307308
try:
308-
if response_type == "bytearray":
309+
if response_type in ("bytearray", "bytes"):
309310
return_data = response_data.data
310311
elif response_type == "file":
311312
return_data = self.__deserialize_file(response_data)
@@ -467,6 +468,8 @@ def __deserialize(self, data, klass):
467468
return self.__deserialize_datetime(data)
468469
elif klass is decimal.Decimal:
469470
return decimal.Decimal(data)
471+
elif klass is uuid.UUID:
472+
return uuid.UUID(data)
470473
elif issubclass(klass, Enum):
471474
return self.__deserialize_enum(data, klass)
472475
else:

sonarr/configuration.py

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,25 @@ class Configuration:
157157
string values to replace variables in templated server configuration.
158158
The validation of enums is performed for variables with defined enum
159159
values before.
160+
:param verify_ssl: bool - Set this to false to skip verifying SSL certificate
161+
when calling API from https server.
160162
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
161163
in PEM format.
162164
:param retries: int | urllib3.util.retry.Retry - Retry configuration.
163165
:param ca_cert_data: verify the peer using concatenated CA certificate data
164166
in PEM (str) or DER (bytes) format.
165167
:param cert_file: the path to a client certificate file, for mTLS.
166168
:param key_file: the path to a client key file, for mTLS.
169+
:param assert_hostname: Set this to True/False to enable/disable SSL hostname verification.
170+
:param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server.
171+
:param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync.
172+
:param proxy: Proxy URL.
173+
:param proxy_headers: Proxy headers.
174+
:param safe_chars_for_path_param: Safe characters for path parameter encoding.
175+
:param client_side_validation: Enable client-side validation. Default True.
176+
:param socket_options: Options to pass down to the underlying urllib3 socket.
177+
:param datetime_format: Datetime format string for serialization.
178+
:param date_format: Date format string for serialization.
167179
168180
:Example:
169181
@@ -207,6 +219,17 @@ def __init__(
207219
ca_cert_data: Optional[Union[str, bytes]] = None,
208220
cert_file: Optional[str]=None,
209221
key_file: Optional[str]=None,
222+
verify_ssl: bool=True,
223+
assert_hostname: Optional[bool]=None,
224+
tls_server_name: Optional[str]=None,
225+
connection_pool_maxsize: Optional[int]=None,
226+
proxy: Optional[str]=None,
227+
proxy_headers: Optional[Any]=None,
228+
safe_chars_for_path_param: str='',
229+
client_side_validation: bool=True,
230+
socket_options: Optional[Any]=None,
231+
datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z",
232+
date_format: str="%Y-%m-%d",
210233
*,
211234
debug: Optional[bool] = None,
212235
) -> None:
@@ -276,7 +299,7 @@ def __init__(
276299
"""Debug switch
277300
"""
278301

279-
self.verify_ssl = True
302+
self.verify_ssl = verify_ssl
280303
"""SSL/TLS verification
281304
Set this to false to skip verifying SSL certificate when calling API
282305
from https server.
@@ -294,46 +317,43 @@ def __init__(
294317
self.key_file = key_file
295318
"""client key file
296319
"""
297-
self.assert_hostname = None
320+
self.assert_hostname = assert_hostname
298321
"""Set this to True/False to enable/disable SSL hostname verification.
299322
"""
300-
self.tls_server_name = None
323+
self.tls_server_name = tls_server_name
301324
"""SSL/TLS Server Name Indication (SNI)
302325
Set this to the SNI value expected by the server.
303326
"""
304327

305-
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
328+
self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5
306329
"""urllib3 connection pool's maximum number of connections saved
307-
per pool. urllib3 uses 1 connection as default value, but this is
308-
not the best value when you are making a lot of possibly parallel
309-
requests to the same host, which is often the case here.
310-
cpu_count * 5 is used as default value to increase performance.
330+
per pool. None in the constructor is coerced to cpu_count * 5.
311331
"""
312332

313-
self.proxy: Optional[str] = None
333+
self.proxy = proxy
314334
"""Proxy URL
315335
"""
316-
self.proxy_headers = None
336+
self.proxy_headers = proxy_headers
317337
"""Proxy headers
318338
"""
319-
self.safe_chars_for_path_param = ''
339+
self.safe_chars_for_path_param = safe_chars_for_path_param
320340
"""Safe chars for path_param
321341
"""
322342
self.retries = retries
323343
"""Retry configuration
324344
"""
325345
# Enable client side validation
326-
self.client_side_validation = True
346+
self.client_side_validation = client_side_validation
327347

328-
self.socket_options = None
348+
self.socket_options = socket_options
329349
"""Options to pass down to the underlying urllib3 socket
330350
"""
331351

332-
self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
352+
self.datetime_format = datetime_format
333353
"""datetime format
334354
"""
335355

336-
self.date_format = "%Y-%m-%d"
356+
self.date_format = date_format
337357
"""date format
338358
"""
339359

sonarr/models/add_series_options.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from sonarr.models.monitor_types import MonitorTypes
2323
from typing import Optional, Set
2424
from typing_extensions import Self
25+
from pydantic_core import to_jsonable_python
2526

2627
class AddSeriesOptions(BaseModel):
2728
"""
@@ -35,7 +36,8 @@ class AddSeriesOptions(BaseModel):
3536
__properties: ClassVar[List[str]] = ["ignoreEpisodesWithFiles", "ignoreEpisodesWithoutFiles", "monitor", "searchForMissingEpisodes", "searchForCutoffUnmetEpisodes"]
3637

3738
model_config = ConfigDict(
38-
populate_by_name=True,
39+
validate_by_name=True,
40+
validate_by_alias=True,
3941
validate_assignment=True,
4042
protected_namespaces=(),
4143
)
@@ -47,8 +49,7 @@ def to_str(self) -> str:
4749

4850
def to_json(self) -> str:
4951
"""Returns the JSON representation of the model using alias"""
50-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51-
return json.dumps(self.to_dict())
52+
return json.dumps(to_jsonable_python(self.to_dict()))
5253

5354
@classmethod
5455
def from_json(cls, json_str: str) -> Optional[Self]:

sonarr/models/alternate_title_resource.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from typing import Any, ClassVar, Dict, Optional
2222
from typing import Optional, Set
2323
from typing_extensions import Self
24+
from pydantic_core import to_jsonable_python
2425

2526
class AlternateTitleResource(BaseModel):
2627
"""
@@ -34,7 +35,8 @@ class AlternateTitleResource(BaseModel):
3435
__properties: ClassVar[List[str]] = ["title", "seasonNumber", "sceneSeasonNumber", "sceneOrigin", "comment"]
3536

3637
model_config = ConfigDict(
37-
populate_by_name=True,
38+
validate_by_name=True,
39+
validate_by_alias=True,
3840
validate_assignment=True,
3941
protected_namespaces=(),
4042
)
@@ -46,8 +48,7 @@ def to_str(self) -> str:
4648

4749
def to_json(self) -> str:
4850
"""Returns the JSON representation of the model using alias"""
49-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50-
return json.dumps(self.to_dict())
51+
return json.dumps(to_jsonable_python(self.to_dict()))
5152

5253
@classmethod
5354
def from_json(cls, json_str: str) -> Optional[Self]:

sonarr/models/auto_tagging_resource.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from sonarr.models.auto_tagging_specification_schema import AutoTaggingSpecificationSchema
2323
from typing import Optional, Set
2424
from typing_extensions import Self
25+
from pydantic_core import to_jsonable_python
2526

2627
class AutoTaggingResource(BaseModel):
2728
"""
@@ -35,7 +36,8 @@ class AutoTaggingResource(BaseModel):
3536
__properties: ClassVar[List[str]] = ["id", "name", "removeTagsAutomatically", "tags", "specifications"]
3637

3738
model_config = ConfigDict(
38-
populate_by_name=True,
39+
validate_by_name=True,
40+
validate_by_alias=True,
3941
validate_assignment=True,
4042
protected_namespaces=(),
4143
)
@@ -47,8 +49,7 @@ def to_str(self) -> str:
4749

4850
def to_json(self) -> str:
4951
"""Returns the JSON representation of the model using alias"""
50-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51-
return json.dumps(self.to_dict())
52+
return json.dumps(to_jsonable_python(self.to_dict()))
5253

5354
@classmethod
5455
def from_json(cls, json_str: str) -> Optional[Self]:

sonarr/models/auto_tagging_specification_schema.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from sonarr.models.contract_field import ContractField
2323
from typing import Optional, Set
2424
from typing_extensions import Self
25+
from pydantic_core import to_jsonable_python
2526

2627
class AutoTaggingSpecificationSchema(BaseModel):
2728
"""
@@ -37,7 +38,8 @@ class AutoTaggingSpecificationSchema(BaseModel):
3738
__properties: ClassVar[List[str]] = ["id", "name", "implementation", "implementationName", "negate", "required", "fields"]
3839

3940
model_config = ConfigDict(
40-
populate_by_name=True,
41+
validate_by_name=True,
42+
validate_by_alias=True,
4143
validate_assignment=True,
4244
protected_namespaces=(),
4345
)
@@ -49,8 +51,7 @@ def to_str(self) -> str:
4951

5052
def to_json(self) -> str:
5153
"""Returns the JSON representation of the model using alias"""
52-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53-
return json.dumps(self.to_dict())
54+
return json.dumps(to_jsonable_python(self.to_dict()))
5455

5556
@classmethod
5657
def from_json(cls, json_str: str) -> Optional[Self]:

0 commit comments

Comments
 (0)