From a169996f4b5467f59d58cf68fd5b6c84cc9f4c26 Mon Sep 17 00:00:00 2001 From: Nathan O'Sullivan Date: Fri, 28 Feb 2025 09:45:38 +1000 Subject: [PATCH] chore: update to API 0.29.0 --- .../post_v2_servers_server_id_actions.py | 17 +- ...servers_server_id_actions_change_region.py | 217 ++++++++++++++++++ lib/binarylane/models/change_region.py | 70 ++++++ lib/binarylane/models/change_region_type.py | 10 + lib/binarylane/models/host.py | 2 +- pyproject.toml | 4 + .../console/commands/api/__init__.py | 5 + .../console/commands/api/get_v2_servers.py | 3 +- .../api/post_v2_servers_server_id_actions.py | 2 +- ...servers_server_id_actions_change_region.py | 97 ++++++++ templates/endpoint_module.py.jinja | 1 - templates/endpoint_module/list_runner.jinja | 1 - 12 files changed, 419 insertions(+), 10 deletions(-) create mode 100644 lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_region.py create mode 100644 lib/binarylane/models/change_region.py create mode 100644 lib/binarylane/models/change_region_type.py create mode 100644 src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_region.py diff --git a/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py b/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py index c221bd75..d39f1bca 100644 --- a/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py +++ b/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py @@ -21,6 +21,7 @@ from binarylane.models.change_offsite_backup_location import ChangeOffsiteBackupLocation from binarylane.models.change_partner import ChangePartner from binarylane.models.change_port_blocking import ChangePortBlocking +from binarylane.models.change_region import ChangeRegion from binarylane.models.change_reverse_name import ChangeReverseName from binarylane.models.change_separate_private_network_interface import ChangeSeparatePrivateNetworkInterface from binarylane.models.change_source_and_destination_check import ChangeSourceAndDestinationCheck @@ -72,6 +73,7 @@ def _get_kwargs( "ChangeOffsiteBackupLocation", "ChangePartner", "ChangePortBlocking", + "ChangeRegion", "ChangeReverseName", "ChangeSeparatePrivateNetworkInterface", "ChangeSourceAndDestinationCheck", @@ -148,6 +150,9 @@ def _get_kwargs( elif isinstance(json_body, ChangePortBlocking): json_json_body = json_body.to_dict() + elif isinstance(json_body, ChangeRegion): + json_json_body = json_body.to_dict() + elif isinstance(json_body, ChangeReverseName): json_json_body = json_body.to_dict() @@ -298,6 +303,7 @@ def sync_detailed( "ChangeOffsiteBackupLocation", "ChangePartner", "ChangePortBlocking", + "ChangeRegion", "ChangeReverseName", "ChangeSeparatePrivateNetworkInterface", "ChangeSourceAndDestinationCheck", @@ -342,7 +348,7 @@ def sync_detailed( 'ChangeAdvancedFirewallRules', 'ChangeBackupSchedule', 'ChangeIpv6', 'ChangeIpv6ReverseNameservers', 'ChangeKernel', 'ChangeManageOffsiteBackupCopies', 'ChangeNetwork', 'ChangeOffsiteBackupLocation', 'ChangePartner', 'ChangePortBlocking', - 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', + 'ChangeRegion', 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', 'ChangeSourceAndDestinationCheck', 'ChangeThresholdAlerts', 'ChangeVpcIpv4', 'CloneUsingBackup', 'DeleteDisk', 'DetachBackup', 'DisableBackups', 'DisableSelinux', 'EnableBackups', 'EnableIpv6', 'IsRunning', 'PasswordReset', 'Ping', 'PowerCycle', @@ -389,6 +395,7 @@ def sync( "ChangeOffsiteBackupLocation", "ChangePartner", "ChangePortBlocking", + "ChangeRegion", "ChangeReverseName", "ChangeSeparatePrivateNetworkInterface", "ChangeSourceAndDestinationCheck", @@ -433,7 +440,7 @@ def sync( 'ChangeAdvancedFirewallRules', 'ChangeBackupSchedule', 'ChangeIpv6', 'ChangeIpv6ReverseNameservers', 'ChangeKernel', 'ChangeManageOffsiteBackupCopies', 'ChangeNetwork', 'ChangeOffsiteBackupLocation', 'ChangePartner', 'ChangePortBlocking', - 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', + 'ChangeRegion', 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', 'ChangeSourceAndDestinationCheck', 'ChangeThresholdAlerts', 'ChangeVpcIpv4', 'CloneUsingBackup', 'DeleteDisk', 'DetachBackup', 'DisableBackups', 'DisableSelinux', 'EnableBackups', 'EnableIpv6', 'IsRunning', 'PasswordReset', 'Ping', 'PowerCycle', @@ -473,6 +480,7 @@ async def asyncio_detailed( "ChangeOffsiteBackupLocation", "ChangePartner", "ChangePortBlocking", + "ChangeRegion", "ChangeReverseName", "ChangeSeparatePrivateNetworkInterface", "ChangeSourceAndDestinationCheck", @@ -517,7 +525,7 @@ async def asyncio_detailed( 'ChangeAdvancedFirewallRules', 'ChangeBackupSchedule', 'ChangeIpv6', 'ChangeIpv6ReverseNameservers', 'ChangeKernel', 'ChangeManageOffsiteBackupCopies', 'ChangeNetwork', 'ChangeOffsiteBackupLocation', 'ChangePartner', 'ChangePortBlocking', - 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', + 'ChangeRegion', 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', 'ChangeSourceAndDestinationCheck', 'ChangeThresholdAlerts', 'ChangeVpcIpv4', 'CloneUsingBackup', 'DeleteDisk', 'DetachBackup', 'DisableBackups', 'DisableSelinux', 'EnableBackups', 'EnableIpv6', 'IsRunning', 'PasswordReset', 'Ping', 'PowerCycle', @@ -562,6 +570,7 @@ async def asyncio( "ChangeOffsiteBackupLocation", "ChangePartner", "ChangePortBlocking", + "ChangeRegion", "ChangeReverseName", "ChangeSeparatePrivateNetworkInterface", "ChangeSourceAndDestinationCheck", @@ -606,7 +615,7 @@ async def asyncio( 'ChangeAdvancedFirewallRules', 'ChangeBackupSchedule', 'ChangeIpv6', 'ChangeIpv6ReverseNameservers', 'ChangeKernel', 'ChangeManageOffsiteBackupCopies', 'ChangeNetwork', 'ChangeOffsiteBackupLocation', 'ChangePartner', 'ChangePortBlocking', - 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', + 'ChangeRegion', 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', 'ChangeSourceAndDestinationCheck', 'ChangeThresholdAlerts', 'ChangeVpcIpv4', 'CloneUsingBackup', 'DeleteDisk', 'DetachBackup', 'DisableBackups', 'DisableSelinux', 'EnableBackups', 'EnableIpv6', 'IsRunning', 'PasswordReset', 'Ping', 'PowerCycle', diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_region.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_region.py new file mode 100644 index 00000000..be42ffc2 --- /dev/null +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_region.py @@ -0,0 +1,217 @@ +from __future__ import annotations + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from binarylane import errors +from binarylane.client import Client +from binarylane.models.action_response import ActionResponse +from binarylane.models.change_region import ChangeRegion +from binarylane.models.problem_details import ProblemDetails +from binarylane.models.validation_problem_details import ValidationProblemDetails +from binarylane.types import Response + + +def _get_kwargs( + server_id: int, + *, + client: Client, + json_body: ChangeRegion, +) -> Dict[str, Any]: + url = "{}/v2/servers/{server_id}/actions#ChangeRegion".format(client.base_url, server_id=server_id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _parse_response( + *, client: Client, response: httpx.Response +) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: + if response.status_code == HTTPStatus.OK: + response_200 = ActionResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.ACCEPTED: + response_202 = cast(Any, None) + return response_202 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = ValidationProblemDetails.from_dict(response.json()) + + return response_400 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = ProblemDetails.from_dict(response.json()) + + return response_404 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}") + else: + return None + + +def _build_response( + *, client: Client, response: httpx.Response +) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + server_id: int, + *, + client: Client, + json_body: ChangeRegion, +) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: + """Change the Region of a Server + + This is used to move a server to a different region. + Please check our knowledge base article for the current requirements for servers to be able to move + between regions. + + + Args: + server_id (int): The ID of the server on which the action should be performed. + json_body (ChangeRegion): Change the Region of a Server + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] + """ + + kwargs = _get_kwargs( + server_id=server_id, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + server_id: int, + *, + client: Client, + json_body: ChangeRegion, +) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: + """Change the Region of a Server + + This is used to move a server to a different region. + Please check our knowledge base article for the current requirements for servers to be able to move + between regions. + + + Args: + server_id (int): The ID of the server on which the action should be performed. + json_body (ChangeRegion): Change the Region of a Server + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] + """ + + return sync_detailed( + server_id=server_id, + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + server_id: int, + *, + client: Client, + json_body: ChangeRegion, +) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: + """Change the Region of a Server + + This is used to move a server to a different region. + Please check our knowledge base article for the current requirements for servers to be able to move + between regions. + + + Args: + server_id (int): The ID of the server on which the action should be performed. + json_body (ChangeRegion): Change the Region of a Server + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] + """ + + kwargs = _get_kwargs( + server_id=server_id, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + server_id: int, + *, + client: Client, + json_body: ChangeRegion, +) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: + """Change the Region of a Server + + This is used to move a server to a different region. + Please check our knowledge base article for the current requirements for servers to be able to move + between regions. + + + Args: + server_id (int): The ID of the server on which the action should be performed. + json_body (ChangeRegion): Change the Region of a Server + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] + """ + + return ( + await asyncio_detailed( + server_id=server_id, + client=client, + json_body=json_body, + ) + ).parsed diff --git a/lib/binarylane/models/change_region.py b/lib/binarylane/models/change_region.py new file mode 100644 index 00000000..52f3cab1 --- /dev/null +++ b/lib/binarylane/models/change_region.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from binarylane.models.change_region_type import ChangeRegionType + +T = TypeVar("T", bound="ChangeRegion") + + +@attr.s(auto_attribs=True) +class ChangeRegion: + """Change the Region of a Server + + Attributes: + type (ChangeRegionType): + region (str): The slug of the selected region. + """ + + type: ChangeRegionType + region: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + region = self.region + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + "region": region, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ChangeRegionType(d.pop("type")) + + region = d.pop("region") + + change_region = cls( + type=type, + region=region, + ) + + change_region.additional_properties = d + return change_region + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lib/binarylane/models/change_region_type.py b/lib/binarylane/models/change_region_type.py new file mode 100644 index 00000000..dfa74e49 --- /dev/null +++ b/lib/binarylane/models/change_region_type.py @@ -0,0 +1,10 @@ +from __future__ import annotations + +from enum import Enum + + +class ChangeRegionType(str, Enum): + CHANGE_REGION = "change_region" + + def __str__(self) -> str: + return str(self.value) diff --git a/lib/binarylane/models/host.py b/lib/binarylane/models/host.py index c1d1b12b..fafdcd32 100644 --- a/lib/binarylane/models/host.py +++ b/lib/binarylane/models/host.py @@ -13,7 +13,7 @@ class Host: """ Attributes: - display_name (str): The name for this host. + display_name (str): The name for this host. If this is a dedicated host this property will be empty. uptime_ms (Union[Unset, None, int]): The current uptime in milliseconds of this host. status_page (Union[Unset, None, str]): This is the URL of the status page of the host. This will normally only be set if the host is under maintenance. diff --git a/pyproject.toml b/pyproject.toml index 87e2d3bc..8ba20d7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,10 @@ explicit_package_bases = true [tool.pyright] extraPaths = ["src", "lib"] +# Required by binarylane-openapi-client +[tool.black] +line-length = 120 + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/src/binarylane/console/commands/api/__init__.py b/src/binarylane/console/commands/api/__init__.py index 3d376448..e8ab8251 100644 --- a/src/binarylane/console/commands/api/__init__.py +++ b/src/binarylane/console/commands/api/__init__.py @@ -373,6 +373,11 @@ def add_descriptor(module_path: str, name: str, description: str) -> None: "server action change-partner", "Add, Update or Remove a Partner Server for a Server", ) +add_descriptor( + ".commands.api.post_v_2_servers_server_id_actions_change_region", + "server action change-region", + "Change the Region of a Server", +) add_descriptor( ".commands.api.post_v_2_servers_server_id_actions_disable_selinux", "server action disable-selinux", diff --git a/src/binarylane/console/commands/api/get_v2_servers.py b/src/binarylane/console/commands/api/get_v2_servers.py index a8f75d8d..333002c8 100644 --- a/src/binarylane/console/commands/api/get_v2_servers.py +++ b/src/binarylane/console/commands/api/get_v2_servers.py @@ -4,12 +4,11 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union from binarylane.api.servers.get_v2_servers import sync_detailed +from binarylane.console.util import create_client from binarylane.models.links import Links from binarylane.models.servers_response import ServersResponse from binarylane.types import UNSET, Unset -from binarylane.console.util import create_client - if TYPE_CHECKING: from binarylane.client import Client diff --git a/src/binarylane/console/commands/api/post_v2_servers_server_id_actions.py b/src/binarylane/console/commands/api/post_v2_servers_server_id_actions.py index 0bf3074d..4aa80975 100644 --- a/src/binarylane/console/commands/api/post_v2_servers_server_id_actions.py +++ b/src/binarylane/console/commands/api/post_v2_servers_server_id_actions.py @@ -1,4 +1,4 @@ from __future__ import annotations # json_body unions are not implmemented -# Type: Union['AddDisk', 'AttachBackup', 'ChangeAdvancedFeatures', 'ChangeAdvancedFirewallRules', 'ChangeBackupSchedule', 'ChangeIpv6', 'ChangeIpv6ReverseNameservers', 'ChangeKernel', 'ChangeManageOffsiteBackupCopies', 'ChangeNetwork', 'ChangeOffsiteBackupLocation', 'ChangePartner', 'ChangePortBlocking', 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', 'ChangeSourceAndDestinationCheck', 'ChangeThresholdAlerts', 'ChangeVpcIpv4', 'CloneUsingBackup', 'DeleteDisk', 'DetachBackup', 'DisableBackups', 'DisableSelinux', 'EnableBackups', 'EnableIpv6', 'IsRunning', 'PasswordReset', 'Ping', 'PowerCycle', 'PowerOff', 'PowerOn', 'Reboot', 'Rebuild', 'Rename', 'Resize', 'ResizeDisk', 'Restore', 'Shutdown', 'TakeBackup', 'Uncancel', 'Uptime'] +# Type: Union['AddDisk', 'AttachBackup', 'ChangeAdvancedFeatures', 'ChangeAdvancedFirewallRules', 'ChangeBackupSchedule', 'ChangeIpv6', 'ChangeIpv6ReverseNameservers', 'ChangeKernel', 'ChangeManageOffsiteBackupCopies', 'ChangeNetwork', 'ChangeOffsiteBackupLocation', 'ChangePartner', 'ChangePortBlocking', 'ChangeRegion', 'ChangeReverseName', 'ChangeSeparatePrivateNetworkInterface', 'ChangeSourceAndDestinationCheck', 'ChangeThresholdAlerts', 'ChangeVpcIpv4', 'CloneUsingBackup', 'DeleteDisk', 'DetachBackup', 'DisableBackups', 'DisableSelinux', 'EnableBackups', 'EnableIpv6', 'IsRunning', 'PasswordReset', 'Ping', 'PowerCycle', 'PowerOff', 'PowerOn', 'Reboot', 'Rebuild', 'Rename', 'Resize', 'ResizeDisk', 'Restore', 'Shutdown', 'TakeBackup', 'Uncancel', 'Uptime'] diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_region.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_region.py new file mode 100644 index 00000000..e7612bb0 --- /dev/null +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_region.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from http import HTTPStatus +from typing import TYPE_CHECKING, Tuple, Union + +from binarylane.api.server_actions.post_v_2_servers_server_id_actions_change_region import sync_detailed +from binarylane.models.action_response import ActionResponse +from binarylane.models.change_region import ChangeRegion +from binarylane.models.change_region_type import ChangeRegionType +from binarylane.models.problem_details import ProblemDetails +from binarylane.models.validation_problem_details import ValidationProblemDetails + +if TYPE_CHECKING: + from binarylane.client import Client + +import binarylane.console.commands.api.get_v2_servers as api_get_v2_servers +from binarylane.console.parser import Mapping, PrimitiveAttribute +from binarylane.console.runners.action import ActionRunner + + +class CommandRequest: + server_id: int + json_body: ChangeRegion + + def __init__(self, server_id: int, json_body: ChangeRegion) -> None: + self.server_id = server_id + self.json_body = json_body + + +class Command(ActionRunner): + @property + def reference_url(self) -> str: + return "https://api.binarylane.com.au/reference/#tag/ServerActions/paths/~1v2~1servers~1%7Bserver_id%7D~1actions#ChangeRegion/post" + + def create_mapping(self) -> Mapping: + mapping = Mapping(CommandRequest) + + def lookup_server_id(ref: str) -> Union[None, int]: + return api_get_v2_servers.Command(self._context).lookup(ref) + + mapping.add( + PrimitiveAttribute( + "server_id", + int, + required=True, + option_name=None, + metavar="server", + description="""The ID or name of the server on which the action should be performed.""", + lookup=lookup_server_id, + ) + ) + + json_body = mapping.add_json_body(ChangeRegion) + + json_body.add( + PrimitiveAttribute( + "type", + ChangeRegionType, + required=True, + option_name="type", + ) + ) + + json_body.add( + PrimitiveAttribute( + "region", + str, + required=True, + option_name="region", + description="""The slug of the selected region.""", + ) + ) + + return mapping + + @property + def ok_response_type(self) -> type: + return ActionResponse + + def request( + self, + client: Client, + request: object, + ) -> Tuple[HTTPStatus, Union[ActionResponse, None, ProblemDetails, ValidationProblemDetails]]: + assert isinstance(request, CommandRequest) + + # HTTPStatus.OK: ActionResponse + # HTTPStatus.ACCEPTED: Any + # HTTPStatus.BAD_REQUEST: ValidationProblemDetails + # HTTPStatus.NOT_FOUND: ProblemDetails + # HTTPStatus.UNAUTHORIZED: Any + page_response = sync_detailed( + server_id=request.server_id, + client=client, + json_body=request.json_body, + ) + return page_response.status_code, page_response.parsed diff --git a/templates/endpoint_module.py.jinja b/templates/endpoint_module.py.jinja index 9b4bc4c2..5338e1a9 100644 --- a/templates/endpoint_module.py.jinja +++ b/templates/endpoint_module.py.jinja @@ -32,7 +32,6 @@ class Command({{ response_class['name'] }}): {% if response_class.get('list') %} {% include "endpoint_module/list_runner.jinja" %} {% endif %} - @property def reference_url(self) -> str: return "https://api.binarylane.com.au/reference/#tag/{{ endpoint.data["tags"][0] }}/paths/{{ endpoint.path.replace("/","~1").replace("{","%7B").replace("}","%7D") }}/{{ endpoint.method }}" diff --git a/templates/endpoint_module/list_runner.jinja b/templates/endpoint_module/list_runner.jinja index d09f9702..3b28caff 100644 --- a/templates/endpoint_module/list_runner.jinja +++ b/templates/endpoint_module/list_runner.jinja @@ -1,5 +1,4 @@ {% set list_response = response_class.get('list') %} - def response(self, status_code: int, received: Any) -> None: {# When API client library knows the operation's 200 response type,