Skip to content

Commit

Permalink
feat: sdk generation alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
devopsarr[bot] committed Mar 24, 2023
1 parent 8c13479 commit ada5e4d
Show file tree
Hide file tree
Showing 38 changed files with 107 additions and 423 deletions.
7 changes: 1 addition & 6 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ docs/HistoryResource.md
docs/HistoryResourcePagingResource.md
docs/HostConfigApi.md
docs/HostConfigResource.md
docs/HttpUri.md
docs/ImportListApi.md
docs/ImportListExclusionApi.md
docs/ImportListExclusionResource.md
Expand Down Expand Up @@ -197,7 +196,6 @@ docs/TagDifference.md
docs/TagResource.md
docs/TaskApi.md
docs/TaskResource.md
docs/TimeSpan.md
docs/TrackedDownloadState.md
docs/TrackedDownloadStatus.md
docs/TrackedDownloadStatusMessage.md
Expand All @@ -208,9 +206,9 @@ docs/UpdateChanges.md
docs/UpdateLogFileApi.md
docs/UpdateMechanism.md
docs/UpdateResource.md
docs/Version.md
docs/WriteAudioTagsType.md
docs/WriteBookTagsType.md
pyproject.toml
readarr/__init__.py
readarr/api/__init__.py
readarr/api/authentication_api.py
Expand Down Expand Up @@ -343,7 +341,6 @@ readarr/models/history_event_type.py
readarr/models/history_resource.py
readarr/models/history_resource_paging_resource.py
readarr/models/host_config_resource.py
readarr/models/http_uri.py
readarr/models/import_list_exclusion_resource.py
readarr/models/import_list_monitor_type.py
readarr/models/import_list_resource.py
Expand Down Expand Up @@ -416,15 +413,13 @@ readarr/models/tag_details_resource.py
readarr/models/tag_difference.py
readarr/models/tag_resource.py
readarr/models/task_resource.py
readarr/models/time_span.py
readarr/models/tracked_download_state.py
readarr/models/tracked_download_status.py
readarr/models/tracked_download_status_message.py
readarr/models/ui_config_resource.py
readarr/models/update_changes.py
readarr/models/update_mechanism.py
readarr/models/update_resource.py
readarr/models/version.py
readarr/models/write_audio_tags_type.py
readarr/models/write_book_tags_type.py
readarr/rest.py
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.0-SNAPSHOT
6.5.0-SNAPSHOT
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ Readarr API docs

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

[comment]: # (x-release-please-start-version)
- Package version: 0.1.0

[comment]: # (x-release-please-end)
- API version: 0.1.0
- Package version: 0.0.1

- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen

## Requirements.
Expand Down Expand Up @@ -365,7 +369,6 @@ Class | Method | HTTP request | Description
- [HistoryResource](docs/HistoryResource.md)
- [HistoryResourcePagingResource](docs/HistoryResourcePagingResource.md)
- [HostConfigResource](docs/HostConfigResource.md)
- [HttpUri](docs/HttpUri.md)
- [ImportListExclusionResource](docs/ImportListExclusionResource.md)
- [ImportListMonitorType](docs/ImportListMonitorType.md)
- [ImportListResource](docs/ImportListResource.md)
Expand Down Expand Up @@ -438,15 +441,13 @@ Class | Method | HTTP request | Description
- [TagDifference](docs/TagDifference.md)
- [TagResource](docs/TagResource.md)
- [TaskResource](docs/TaskResource.md)
- [TimeSpan](docs/TimeSpan.md)
- [TrackedDownloadState](docs/TrackedDownloadState.md)
- [TrackedDownloadStatus](docs/TrackedDownloadStatus.md)
- [TrackedDownloadStatusMessage](docs/TrackedDownloadStatusMessage.md)
- [UiConfigResource](docs/UiConfigResource.md)
- [UpdateChanges](docs/UpdateChanges.md)
- [UpdateMechanism](docs/UpdateMechanism.md)
- [UpdateResource](docs/UpdateResource.md)
- [Version](docs/Version.md)
- [WriteAudioTagsType](docs/WriteAudioTagsType.md)
- [WriteBookTagsType](docs/WriteBookTagsType.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/CommandResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name | Type | Description | Notes
**queued** | **datetime** | | [optional]
**started** | **datetime** | | [optional]
**ended** | **datetime** | | [optional]
**duration** | [**TimeSpan**](TimeSpan.md) | | [optional]
**duration** | **str** | | [optional]
**exception** | **str** | | [optional]
**trigger** | [**CommandTrigger**](CommandTrigger.md) | | [optional]
**client_user_agent** | **str** | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/HealthResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name | Type | Description | Notes
**source** | **str** | | [optional]
**type** | [**HealthCheckResult**](HealthCheckResult.md) | | [optional]
**message** | **str** | | [optional]
**wiki_url** | [**HttpUri**](HttpUri.md) | | [optional]
**wiki_url** | **str** | | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/ParsedTrackInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Name | Type | Description | Notes
**source** | **str** | | [optional]
**catalog_number** | **str** | | [optional]
**disambiguation** | **str** | | [optional]
**duration** | [**TimeSpan**](TimeSpan.md) | | [optional]
**duration** | **str** | | [optional]
**quality** | [**QualityModel**](QualityModel.md) | | [optional]
**media_info** | [**MediaInfoModel**](MediaInfoModel.md) | | [optional]
**track_numbers** | **List[int]** | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/QueueResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name | Type | Description | Notes
**size** | **float** | | [optional]
**title** | **str** | | [optional]
**sizeleft** | **float** | | [optional]
**timeleft** | [**TimeSpan**](TimeSpan.md) | | [optional]
**timeleft** | **str** | | [optional]
**estimated_completion_time** | **datetime** | | [optional]
**status** | **str** | | [optional]
**tracked_download_status** | [**TrackedDownloadStatus**](TrackedDownloadStatus.md) | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/TaskResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**last_execution** | **datetime** | | [optional]
**last_start_time** | **datetime** | | [optional]
**next_execution** | **datetime** | | [optional]
**last_duration** | [**TimeSpan**](TimeSpan.md) | | [optional]
**last_duration** | **str** | | [optional]

## Example

Expand Down
7 changes: 3 additions & 4 deletions readarr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

from __future__ import absolute_import

__version__ = "0.0.1"
# x-release-please-start-version
__version__ = "0.1.0"
# x-release-please-end

# import apis into sdk package
from readarr.api.authentication_api import AuthenticationApi
Expand Down Expand Up @@ -154,7 +156,6 @@
from readarr.models.history_resource import HistoryResource
from readarr.models.history_resource_paging_resource import HistoryResourcePagingResource
from readarr.models.host_config_resource import HostConfigResource
from readarr.models.http_uri import HttpUri
from readarr.models.import_list_exclusion_resource import ImportListExclusionResource
from readarr.models.import_list_monitor_type import ImportListMonitorType
from readarr.models.import_list_resource import ImportListResource
Expand Down Expand Up @@ -227,14 +228,12 @@
from readarr.models.tag_difference import TagDifference
from readarr.models.tag_resource import TagResource
from readarr.models.task_resource import TaskResource
from readarr.models.time_span import TimeSpan
from readarr.models.tracked_download_state import TrackedDownloadState
from readarr.models.tracked_download_status import TrackedDownloadStatus
from readarr.models.tracked_download_status_message import TrackedDownloadStatusMessage
from readarr.models.ui_config_resource import UiConfigResource
from readarr.models.update_changes import UpdateChanges
from readarr.models.update_mechanism import UpdateMechanism
from readarr.models.update_resource import UpdateResource
from readarr.models.version import Version
from readarr.models.write_audio_tags_type import WriteAudioTagsType
from readarr.models.write_book_tags_type import WriteBookTagsType
6 changes: 3 additions & 3 deletions readarr/api/book_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import StrictBool, StrictInt, StrictStr
from pydantic import StrictBool, StrictInt, StrictStr, conlist

from typing import List, Optional

Expand Down Expand Up @@ -468,7 +468,7 @@ def get_book_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501
_request_auth=_params.get('_request_auth'))

@validate_arguments
def list_book(self, author_id : Optional[StrictInt] = None, book_ids : Optional[List[StrictInt]] = None, title_slug : Optional[StrictStr] = None, include_all_author_books : Optional[StrictBool] = None, **kwargs) -> List[BookResource]: # noqa: E501
def list_book(self, author_id : Optional[StrictInt] = None, book_ids : Optional[conlist(StrictInt)] = None, title_slug : Optional[StrictStr] = None, include_all_author_books : Optional[StrictBool] = None, **kwargs) -> List[BookResource]: # noqa: E501
"""list_book # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -504,7 +504,7 @@ def list_book(self, author_id : Optional[StrictInt] = None, book_ids : Optional[
return self.list_book_with_http_info(author_id, book_ids, title_slug, include_all_author_books, **kwargs) # noqa: E501

@validate_arguments
def list_book_with_http_info(self, author_id : Optional[StrictInt] = None, book_ids : Optional[List[StrictInt]] = None, title_slug : Optional[StrictStr] = None, include_all_author_books : Optional[StrictBool] = None, **kwargs): # noqa: E501
def list_book_with_http_info(self, author_id : Optional[StrictInt] = None, book_ids : Optional[conlist(StrictInt)] = None, title_slug : Optional[StrictStr] = None, include_all_author_books : Optional[StrictBool] = None, **kwargs): # noqa: E501
"""list_book # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down
6 changes: 3 additions & 3 deletions readarr/api/book_file_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import StrictBool, StrictInt, StrictStr
from pydantic import StrictBool, StrictInt, StrictStr, conlist

from typing import List, Optional

Expand Down Expand Up @@ -462,7 +462,7 @@ def get_book_file_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa:
_request_auth=_params.get('_request_auth'))

@validate_arguments
def list_book_file(self, author_id : Optional[StrictInt] = None, book_file_ids : Optional[List[StrictInt]] = None, book_id : Optional[List[StrictInt]] = None, unmapped : Optional[StrictBool] = None, **kwargs) -> List[BookFileResource]: # noqa: E501
def list_book_file(self, author_id : Optional[StrictInt] = None, book_file_ids : Optional[conlist(StrictInt)] = None, book_id : Optional[conlist(StrictInt)] = None, unmapped : Optional[StrictBool] = None, **kwargs) -> List[BookFileResource]: # noqa: E501
"""list_book_file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -498,7 +498,7 @@ def list_book_file(self, author_id : Optional[StrictInt] = None, book_file_ids :
return self.list_book_file_with_http_info(author_id, book_file_ids, book_id, unmapped, **kwargs) # noqa: E501

@validate_arguments
def list_book_file_with_http_info(self, author_id : Optional[StrictInt] = None, book_file_ids : Optional[List[StrictInt]] = None, book_id : Optional[List[StrictInt]] = None, unmapped : Optional[StrictBool] = None, **kwargs): # noqa: E501
def list_book_file_with_http_info(self, author_id : Optional[StrictInt] = None, book_file_ids : Optional[conlist(StrictInt)] = None, book_id : Optional[conlist(StrictInt)] = None, unmapped : Optional[StrictBool] = None, **kwargs): # noqa: E501
"""list_book_file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down
6 changes: 3 additions & 3 deletions readarr/api/manual_import_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import StrictBool, StrictInt, StrictStr
from pydantic import StrictBool, StrictInt, StrictStr, conlist

from typing import List, Optional

Expand Down Expand Up @@ -212,7 +212,7 @@ def list_manual_import_with_http_info(self, folder : Optional[StrictStr] = None,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def put_manual_import(self, manual_import_resource : Optional[List[ManualImportResource]] = None, **kwargs) -> None: # noqa: E501
def put_manual_import(self, manual_import_resource : Optional[conlist(ManualImportResource)] = None, **kwargs) -> None: # noqa: E501
"""put_manual_import # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -242,7 +242,7 @@ def put_manual_import(self, manual_import_resource : Optional[List[ManualImportR
return self.put_manual_import_with_http_info(manual_import_resource, **kwargs) # noqa: E501

@validate_arguments
def put_manual_import_with_http_info(self, manual_import_resource : Optional[List[ManualImportResource]] = None, **kwargs): # noqa: E501
def put_manual_import_with_http_info(self, manual_import_resource : Optional[conlist(ManualImportResource)] = None, **kwargs): # noqa: E501
"""put_manual_import # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down
6 changes: 3 additions & 3 deletions readarr/api/quality_definition_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import StrictInt, StrictStr
from pydantic import StrictInt, StrictStr, conlist

from typing import List, Optional

Expand Down Expand Up @@ -318,7 +318,7 @@ def list_quality_definition_with_http_info(self, **kwargs): # noqa: E501
_request_auth=_params.get('_request_auth'))

@validate_arguments
def put_quality_definition_update(self, quality_definition_resource : Optional[List[QualityDefinitionResource]] = None, **kwargs) -> None: # noqa: E501
def put_quality_definition_update(self, quality_definition_resource : Optional[conlist(QualityDefinitionResource)] = None, **kwargs) -> None: # noqa: E501
"""put_quality_definition_update # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -348,7 +348,7 @@ def put_quality_definition_update(self, quality_definition_resource : Optional[L
return self.put_quality_definition_update_with_http_info(quality_definition_resource, **kwargs) # noqa: E501

@validate_arguments
def put_quality_definition_update_with_http_info(self, quality_definition_resource : Optional[List[QualityDefinitionResource]] = None, **kwargs): # noqa: E501
def put_quality_definition_update_with_http_info(self, quality_definition_resource : Optional[conlist(QualityDefinitionResource)] = None, **kwargs): # noqa: E501
"""put_quality_definition_update # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down
6 changes: 3 additions & 3 deletions readarr/api/queue_details_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import StrictBool, StrictInt
from pydantic import StrictBool, StrictInt, conlist

from typing import List, Optional

Expand Down Expand Up @@ -184,7 +184,7 @@ def get_queue_details_by_id_with_http_info(self, id : StrictInt, **kwargs): # n
_request_auth=_params.get('_request_auth'))

@validate_arguments
def list_queue_details(self, author_id : Optional[StrictInt] = None, book_ids : Optional[List[StrictInt]] = None, include_author : Optional[StrictBool] = None, include_book : Optional[StrictBool] = None, **kwargs) -> List[QueueResource]: # noqa: E501
def list_queue_details(self, author_id : Optional[StrictInt] = None, book_ids : Optional[conlist(StrictInt)] = None, include_author : Optional[StrictBool] = None, include_book : Optional[StrictBool] = None, **kwargs) -> List[QueueResource]: # noqa: E501
"""list_queue_details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -220,7 +220,7 @@ def list_queue_details(self, author_id : Optional[StrictInt] = None, book_ids :
return self.list_queue_details_with_http_info(author_id, book_ids, include_author, include_book, **kwargs) # noqa: E501

@validate_arguments
def list_queue_details_with_http_info(self, author_id : Optional[StrictInt] = None, book_ids : Optional[List[StrictInt]] = None, include_author : Optional[StrictBool] = None, include_book : Optional[StrictBool] = None, **kwargs): # noqa: E501
def list_queue_details_with_http_info(self, author_id : Optional[StrictInt] = None, book_ids : Optional[conlist(StrictInt)] = None, include_author : Optional[StrictBool] = None, include_book : Optional[StrictBool] = None, **kwargs): # noqa: E501
"""list_queue_details # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down
6 changes: 4 additions & 2 deletions readarr/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Readarr-py/v0.0.1'
# x-release-please-start-version
self.user_agent = 'readarr-py/v0.1.0'
# x-release-please-end
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down Expand Up @@ -543,7 +545,7 @@ def parameters_to_url_query(self, params, collection_formats):
else:
new_params.append((k, v))

return "&".join(["=".join(item) for item in new_params])
return "&".join(["=".join(repr(item)) for item in new_params])

def files_parameters(self, files=None):
"""Builds form parameters.
Expand Down
4 changes: 3 additions & 1 deletion readarr/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.1.0\n"\
"SDK Package Version: 0.0.1".\
// x-release-please-start-version
"SDK Package Version: 0.1.0".\
// x-release-please-end
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
3 changes: 0 additions & 3 deletions readarr/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
from readarr.models.history_resource import HistoryResource
from readarr.models.history_resource_paging_resource import HistoryResourcePagingResource
from readarr.models.host_config_resource import HostConfigResource
from readarr.models.http_uri import HttpUri
from readarr.models.import_list_exclusion_resource import ImportListExclusionResource
from readarr.models.import_list_monitor_type import ImportListMonitorType
from readarr.models.import_list_resource import ImportListResource
Expand Down Expand Up @@ -146,14 +145,12 @@
from readarr.models.tag_difference import TagDifference
from readarr.models.tag_resource import TagResource
from readarr.models.task_resource import TaskResource
from readarr.models.time_span import TimeSpan
from readarr.models.tracked_download_state import TrackedDownloadState
from readarr.models.tracked_download_status import TrackedDownloadStatus
from readarr.models.tracked_download_status_message import TrackedDownloadStatusMessage
from readarr.models.ui_config_resource import UiConfigResource
from readarr.models.update_changes import UpdateChanges
from readarr.models.update_mechanism import UpdateMechanism
from readarr.models.update_resource import UpdateResource
from readarr.models.version import Version
from readarr.models.write_audio_tags_type import WriteAudioTagsType
from readarr.models.write_book_tags_type import WriteBookTagsType
4 changes: 2 additions & 2 deletions readarr/models/allow_fingerprinting.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ class AllowFingerprinting(str, Enum):
"""

NEVER = 'never'
NEW_FILES = 'newFiles'
ALL_FILES = 'allFiles'
NEWFILES = 'newFiles'
ALLFILES = 'allFiles'

2 changes: 1 addition & 1 deletion readarr/models/authentication_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AuthenticationType(str, Enum):
allowed enum values
"""

var_NONE = 'none'
NONE = 'none'
BASIC = 'basic'
FORMS = 'forms'

2 changes: 1 addition & 1 deletion readarr/models/certificate_validation_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ class CertificateValidationType(str, Enum):
"""

ENABLED = 'enabled'
DISABLED_FOR_LOCAL_ADDRESSES = 'disabledForLocalAddresses'
DISABLEDFORLOCALADDRESSES = 'disabledForLocalAddresses'
DISABLED = 'disabled'

Loading

0 comments on commit ada5e4d

Please sign in to comment.