Skip to content

Commit e04efa7

Browse files
authored
✨ Upgrade client to latest openapi-generator version (#164)
* 🚚 move autoflake/black/isort for after postprocess complete * ✨ modify sed commands to match new patterns * 🎨 update import of * 🎨 update import of typing.Set * 🎨 update to_dict method * 🎨 update from_json method * 🎨 update from_dict method * 🎨 update Union[str, Any] to Dict[str, Any] * 🎨 read key directly * 🎨 * 🎨 use new in set pattern * 🎨 read key directly if exists * 🎨 read key directly if exists * 🎨 update to_dict method * 🎨 adds previously ungenerated model field descriptions * 🎨 add import * 🎨 use new in set pattern * 🎨 read key directly if exists * 🎨 add import * 🎨 adds previously ungenerated model field descriptions * 🎨 new format for _response_types_map * 🎨 new return type: RequestSerialized * 🎨 optimise imports * 🎨 * 🎨 add space in query_param checks * ✨ new script to remove unnecessary validate_call decorators * 🎨 new format for _response_types_map * 🎨 new format for _response_types_map * ➕ Add `aiohttp_retry` dependency * ✨ new RESTClient has retry config! * 🎨 refactor exceptions * 🎨 typing * 🎨 headers are now a Mapping * ✨ Update ApiClient to latest; implements deserializing enums; drops our custom handling for booleans ... let's see if it still works 🚧 * version bump * 🎨 * ⬆️ Upgrade `black` to latest * ⬆️ Upgrade `pytest-mock` to latest * 🐛 `disclosures` field can be str or Dict * 🎨 attempt to reduce code duplication below sonarcloud quality gate threshold ...
1 parent 964fa8f commit e04efa7

File tree

324 files changed

+5448
-15185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+5448
-15185
lines changed

.github/workflows/python-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python -m pip install --upgrade pip
3838
pip install \
3939
isort~=5.13.2 \
40-
black~=24.3.0
40+
black~=24.4.0
4141
- name: Check import style with isort
4242
run: |
4343
isort . --check --profile black --diff

.github/workflows/python-test-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
python -m pip install --upgrade pip
4040
pip install \
4141
isort~=5.13.2 \
42-
black~=24.3.0
42+
black~=24.4.0
4343
- name: Check import style with isort
4444
run: |
4545
isort . --check --profile black --diff

aries_cloudcontroller/api/action_menu_api.py

+71-331
Large diffs are not rendered by default.

aries_cloudcontroller/api/basicmessage_api.py

+15-75
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,12 @@
1111
Do not edit the class manually.
1212
""" # noqa: E501
1313

14-
1514
from typing import Any, Dict, List, Optional, Tuple, Union
1615

1716
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
18-
19-
try:
20-
from typing import Annotated
21-
except ImportError:
22-
from typing_extensions import Annotated
23-
24-
from typing import Any, Dict, Optional, Union
25-
26-
from pydantic import Field, StrictStr
2717
from typing_extensions import Annotated
2818

29-
from aries_cloudcontroller.api_client import ApiClient
19+
from aries_cloudcontroller.api_client import ApiClient, RequestSerialized
3020
from aries_cloudcontroller.api_response import ApiResponse
3121
from aries_cloudcontroller.models.send_message import SendMessage
3222
from aries_cloudcontroller.rest import RESTResponseType
@@ -68,26 +58,7 @@ async def send_message(
6858
:type conn_id: str
6959
:param body:
7060
:type body: SendMessage
71-
:param _request_timeout: timeout setting for this request. If one
72-
number provided, it will be total request
73-
timeout. It can also be a pair (tuple) of
74-
(connection, read) timeouts.
75-
:type _request_timeout: int, tuple(int, int), optional
76-
:param _request_auth: set to override the auth_settings for an a single
77-
request; this effectively ignores the
78-
authentication in the spec for a single request.
79-
:type _request_auth: dict, optional
80-
:param _content_type: force content-type for the request.
81-
:type _content_type: str, Optional
82-
:param _headers: set to override the headers for a single
83-
request; this effectively ignores the headers
84-
in the spec for a single request.
85-
:type _headers: dict, optional
86-
:param _host_index: set to override the host_index for a single
87-
request; this effectively ignores the host_index
88-
in the spec for a single request.
89-
:type _host_index: int, optional
90-
:return: Returns the result object.
61+
...
9162
""" # noqa: E501
9263

9364
_param = self._send_message_serialize(
@@ -99,7 +70,9 @@ async def send_message(
9970
_host_index=_host_index,
10071
)
10172

102-
_response_types_map: Dict[str, Optional[str]] = {"200": "object"}
73+
_response_types_map: Dict[str, Optional[str]] = {
74+
"200": "object",
75+
}
10376
response_data = await self.api_client.call_api(
10477
*_param, _request_timeout=_request_timeout
10578
)
@@ -132,26 +105,7 @@ async def send_message_with_http_info(
132105
:type conn_id: str
133106
:param body:
134107
:type body: SendMessage
135-
:param _request_timeout: timeout setting for this request. If one
136-
number provided, it will be total request
137-
timeout. It can also be a pair (tuple) of
138-
(connection, read) timeouts.
139-
:type _request_timeout: int, tuple(int, int), optional
140-
:param _request_auth: set to override the auth_settings for an a single
141-
request; this effectively ignores the
142-
authentication in the spec for a single request.
143-
:type _request_auth: dict, optional
144-
:param _content_type: force content-type for the request.
145-
:type _content_type: str, Optional
146-
:param _headers: set to override the headers for a single
147-
request; this effectively ignores the headers
148-
in the spec for a single request.
149-
:type _headers: dict, optional
150-
:param _host_index: set to override the host_index for a single
151-
request; this effectively ignores the host_index
152-
in the spec for a single request.
153-
:type _host_index: int, optional
154-
:return: Returns the result object.
108+
...
155109
""" # noqa: E501
156110

157111
_param = self._send_message_serialize(
@@ -163,7 +117,9 @@ async def send_message_with_http_info(
163117
_host_index=_host_index,
164118
)
165119

166-
_response_types_map: Dict[str, Optional[str]] = {"200": "object"}
120+
_response_types_map: Dict[str, Optional[str]] = {
121+
"200": "object",
122+
}
167123
response_data = await self.api_client.call_api(
168124
*_param, _request_timeout=_request_timeout
169125
)
@@ -196,26 +152,7 @@ async def send_message_without_preload_content(
196152
:type conn_id: str
197153
:param body:
198154
:type body: SendMessage
199-
:param _request_timeout: timeout setting for this request. If one
200-
number provided, it will be total request
201-
timeout. It can also be a pair (tuple) of
202-
(connection, read) timeouts.
203-
:type _request_timeout: int, tuple(int, int), optional
204-
:param _request_auth: set to override the auth_settings for an a single
205-
request; this effectively ignores the
206-
authentication in the spec for a single request.
207-
:type _request_auth: dict, optional
208-
:param _content_type: force content-type for the request.
209-
:type _content_type: str, Optional
210-
:param _headers: set to override the headers for a single
211-
request; this effectively ignores the headers
212-
in the spec for a single request.
213-
:type _headers: dict, optional
214-
:param _host_index: set to override the host_index for a single
215-
request; this effectively ignores the host_index
216-
in the spec for a single request.
217-
:type _host_index: int, optional
218-
:return: Returns the result object.
155+
...
219156
""" # noqa: E501
220157

221158
_param = self._send_message_serialize(
@@ -227,7 +164,9 @@ async def send_message_without_preload_content(
227164
_host_index=_host_index,
228165
)
229166

230-
_response_types_map: Dict[str, Optional[str]] = {"200": "object"}
167+
_response_types_map: Dict[str, Optional[str]] = {
168+
"200": "object",
169+
}
231170
response_data = await self.api_client.call_api(
232171
*_param, _request_timeout=_request_timeout
233172
)
@@ -241,7 +180,8 @@ def _send_message_serialize(
241180
_content_type,
242181
_headers,
243182
_host_index,
244-
) -> Tuple:
183+
) -> RequestSerialized:
184+
245185
_host = None
246186

247187
_collection_formats: Dict[str, str] = {}

0 commit comments

Comments
 (0)