Skip to content

Commit 964fa8f

Browse files
authored
✨ re-add validate_call to API methods (#163)
1 parent f55c73f commit 964fa8f

29 files changed

+209
-31
lines changed

aries_cloudcontroller/api/action_menu_api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -46,6 +46,7 @@ def __init__(self, api_client=None) -> None:
4646
api_client = ApiClient.get_default()
4747
self.api_client = api_client
4848

49+
@validate_call
4950
async def close_active_menu(
5051
self,
5152
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -272,6 +273,7 @@ def _close_active_menu_serialize(
272273
_request_auth=_request_auth,
273274
)
274275

276+
@validate_call
275277
async def fetch_active_menu(
276278
self,
277279
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -498,6 +500,7 @@ def _fetch_active_menu_serialize(
498500
_request_auth=_request_auth,
499501
)
500502

503+
@validate_call
501504
async def perform_action(
502505
self,
503506
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -749,6 +752,7 @@ def _perform_action_serialize(
749752
_request_auth=_request_auth,
750753
)
751754

755+
@validate_call
752756
async def request_active_menu(
753757
self,
754758
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -975,6 +979,7 @@ def _request_active_menu_serialize(
975979
_request_auth=_request_auth,
976980
)
977981

982+
@validate_call
978983
async def send_menu(
979984
self,
980985
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],

aries_cloudcontroller/api/basicmessage_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -44,6 +44,7 @@ def __init__(self, api_client=None) -> None:
4444
api_client = ApiClient.get_default()
4545
self.api_client = api_client
4646

47+
@validate_call
4748
async def send_message(
4849
self,
4950
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],

aries_cloudcontroller/api/connection_api.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -61,6 +61,7 @@ def __init__(self, api_client=None) -> None:
6161
api_client = ApiClient.get_default()
6262
self.api_client = api_client
6363

64+
@validate_call
6465
async def accept_invitation(
6566
self,
6667
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -359,6 +360,7 @@ def _accept_invitation_serialize(
359360
_request_auth=_request_auth,
360361
)
361362

363+
@validate_call
362364
async def accept_request(
363365
self,
364366
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -610,6 +612,7 @@ def _accept_request_serialize(
610612
_request_auth=_request_auth,
611613
)
612614

615+
@validate_call
613616
async def create_invitation(
614617
self,
615618
alias: Annotated[Optional[StrictStr], Field(description="Alias")] = None,
@@ -937,6 +940,7 @@ def _create_invitation_serialize(
937940
_request_auth=_request_auth,
938941
)
939942

943+
@validate_call
940944
async def create_static_connection(
941945
self,
942946
body: Optional[ConnectionStaticRequest] = None,
@@ -1179,6 +1183,7 @@ def _create_static_connection_serialize(
11791183
_request_auth=_request_auth,
11801184
)
11811185

1186+
@validate_call
11821187
async def delete_connection(
11831188
self,
11841189
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -1405,6 +1410,7 @@ def _delete_connection_serialize(
14051410
_request_auth=_request_auth,
14061411
)
14071412

1413+
@validate_call
14081414
async def get_connection(
14091415
self,
14101416
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -1631,6 +1637,7 @@ def _get_connection_serialize(
16311637
_request_auth=_request_auth,
16321638
)
16331639

1640+
@validate_call
16341641
async def get_connection_endpoint(
16351642
self,
16361643
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -1857,6 +1864,7 @@ def _get_connection_endpoint_serialize(
18571864
_request_auth=_request_auth,
18581865
)
18591866

1867+
@validate_call
18601868
async def get_connections(
18611869
self,
18621870
alias: Annotated[Optional[StrictStr], Field(description="Alias")] = None,
@@ -2272,6 +2280,7 @@ def _get_connections_serialize(
22722280
_request_auth=_request_auth,
22732281
)
22742282

2283+
@validate_call
22752284
async def get_metadata(
22762285
self,
22772286
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -2520,6 +2529,7 @@ def _get_metadata_serialize(
25202529
_request_auth=_request_auth,
25212530
)
25222531

2532+
@validate_call
25232533
async def receive_invitation(
25242534
self,
25252535
alias: Annotated[Optional[StrictStr], Field(description="Alias")] = None,
@@ -2822,6 +2832,7 @@ def _receive_invitation_serialize(
28222832
_request_auth=_request_auth,
28232833
)
28242834

2835+
@validate_call
28252836
async def set_metadata(
28262837
self,
28272838
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],

aries_cloudcontroller/api/credential_definition_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -55,6 +55,7 @@ def __init__(self, api_client=None) -> None:
5555
api_client = ApiClient.get_default()
5656
self.api_client = api_client
5757

58+
@validate_call
5859
async def credential_definitions_cred_def_id_write_record_post(
5960
self,
6061
cred_def_id: Annotated[
@@ -293,6 +294,7 @@ def _credential_definitions_cred_def_id_write_record_post_serialize(
293294
_request_auth=_request_auth,
294295
)
295296

297+
@validate_call
296298
async def get_created_cred_defs(
297299
self,
298300
cred_def_id: Annotated[
@@ -657,6 +659,7 @@ def _get_created_cred_defs_serialize(
657659
_request_auth=_request_auth,
658660
)
659661

662+
@validate_call
660663
async def get_cred_def(
661664
self,
662665
cred_def_id: Annotated[
@@ -895,6 +898,7 @@ def _get_cred_def_serialize(
895898
_request_auth=_request_auth,
896899
)
897900

901+
@validate_call
898902
async def publish_cred_def(
899903
self,
900904
conn_id: Annotated[

aries_cloudcontroller/api/credentials_api.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -54,6 +54,7 @@ def __init__(self, api_client=None) -> None:
5454
api_client = ApiClient.get_default()
5555
self.api_client = api_client
5656

57+
@validate_call
5758
async def delete_record(
5859
self,
5960
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
@@ -280,6 +281,7 @@ def _delete_record_serialize(
280281
_request_auth=_request_auth,
281282
)
282283

284+
@validate_call
283285
async def delete_w3c_credential(
284286
self,
285287
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
@@ -506,6 +508,7 @@ def _delete_w3c_credential_serialize(
506508
_request_auth=_request_auth,
507509
)
508510

511+
@validate_call
509512
async def get_credential_mime_types(
510513
self,
511514
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
@@ -738,6 +741,7 @@ def _get_credential_mime_types_serialize(
738741
_request_auth=_request_auth,
739742
)
740743

744+
@validate_call
741745
async def get_record(
742746
self,
743747
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
@@ -964,6 +968,7 @@ def _get_record_serialize(
964968
_request_auth=_request_auth,
965969
)
966970

971+
@validate_call
967972
async def get_records(
968973
self,
969974
count: Annotated[
@@ -1250,6 +1255,7 @@ def _get_records_serialize(
12501255
_request_auth=_request_auth,
12511256
)
12521257

1258+
@validate_call
12531259
async def get_revocation_status(
12541260
self,
12551261
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
@@ -1532,6 +1538,7 @@ def _get_revocation_status_serialize(
15321538
_request_auth=_request_auth,
15331539
)
15341540

1541+
@validate_call
15351542
async def get_w3c_credential(
15361543
self,
15371544
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
@@ -1758,6 +1765,7 @@ def _get_w3c_credential_serialize(
17581765
_request_auth=_request_auth,
17591766
)
17601767

1768+
@validate_call
17611769
async def get_w3c_credentials(
17621770
self,
17631771
count: Annotated[

aries_cloudcontroller/api/default_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None:
3838
api_client = ApiClient.get_default()
3939
self.api_client = api_client
4040

41+
@validate_call
4142
async def establish_inbound(
4243
self,
4344
_request_timeout: Union[
@@ -244,6 +245,7 @@ def _establish_inbound_serialize(
244245
_request_auth=_request_auth,
245246
)
246247

248+
@validate_call
247249
async def get_features(
248250
self,
249251
_request_timeout: Union[

aries_cloudcontroller/api/did_exchange_api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -46,6 +46,7 @@ def __init__(self, api_client=None) -> None:
4646
api_client = ApiClient.get_default()
4747
self.api_client = api_client
4848

49+
@validate_call
4950
async def accept_invitation(
5051
self,
5152
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -319,6 +320,7 @@ def _accept_invitation_serialize(
319320
_request_auth=_request_auth,
320321
)
321322

323+
@validate_call
322324
async def accept_request(
323325
self,
324326
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -620,6 +622,7 @@ def _accept_request_serialize(
620622
_request_auth=_request_auth,
621623
)
622624

625+
@validate_call
623626
async def create_request(
624627
self,
625628
their_public_did: Annotated[
@@ -1046,6 +1049,7 @@ def _create_request_serialize(
10461049
_request_auth=_request_auth,
10471050
)
10481051

1052+
@validate_call
10491053
async def didexchange_conn_id_reject_post(
10501054
self,
10511055
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -1297,6 +1301,7 @@ def _didexchange_conn_id_reject_post_serialize(
12971301
_request_auth=_request_auth,
12981302
)
12991303

1304+
@validate_call
13001305
async def receive_request(
13011306
self,
13021307
alias: Annotated[

aries_cloudcontroller/api/discover_features_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
1818

1919
try:
2020
from typing import Annotated
@@ -47,6 +47,7 @@ def __init__(self, api_client=None) -> None:
4747
api_client = ApiClient.get_default()
4848
self.api_client = api_client
4949

50+
@validate_call
5051
async def discover_features_query_get(
5152
self,
5253
comment: Annotated[Optional[StrictStr], Field(description="Comment")] = None,
@@ -327,6 +328,7 @@ def _discover_features_query_get_serialize(
327328
_request_auth=_request_auth,
328329
)
329330

331+
@validate_call
330332
async def discover_features_records_get(
331333
self,
332334
connection_id: Annotated[

0 commit comments

Comments
 (0)