Skip to content

Commit

Permalink
✨ re-add validate_call to API methods (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 authored Apr 4, 2024
1 parent f55c73f commit 964fa8f
Show file tree
Hide file tree
Showing 29 changed files with 209 additions and 31 deletions.
7 changes: 6 additions & 1 deletion aries_cloudcontroller/api/action_menu_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand Down Expand Up @@ -46,6 +46,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def close_active_menu(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -272,6 +273,7 @@ def _close_active_menu_serialize(
_request_auth=_request_auth,
)

@validate_call
async def fetch_active_menu(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -498,6 +500,7 @@ def _fetch_active_menu_serialize(
_request_auth=_request_auth,
)

@validate_call
async def perform_action(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -749,6 +752,7 @@ def _perform_action_serialize(
_request_auth=_request_auth,
)

@validate_call
async def request_active_menu(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -975,6 +979,7 @@ def _request_active_menu_serialize(
_request_auth=_request_auth,
)

@validate_call
async def send_menu(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down
3 changes: 2 additions & 1 deletion aries_cloudcontroller/api/basicmessage_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand Down Expand Up @@ -44,6 +44,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def send_message(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down
13 changes: 12 additions & 1 deletion aries_cloudcontroller/api/connection_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand Down Expand Up @@ -61,6 +61,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def accept_invitation(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -359,6 +360,7 @@ def _accept_invitation_serialize(
_request_auth=_request_auth,
)

@validate_call
async def accept_request(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -610,6 +612,7 @@ def _accept_request_serialize(
_request_auth=_request_auth,
)

@validate_call
async def create_invitation(
self,
alias: Annotated[Optional[StrictStr], Field(description="Alias")] = None,
Expand Down Expand Up @@ -937,6 +940,7 @@ def _create_invitation_serialize(
_request_auth=_request_auth,
)

@validate_call
async def create_static_connection(
self,
body: Optional[ConnectionStaticRequest] = None,
Expand Down Expand Up @@ -1179,6 +1183,7 @@ def _create_static_connection_serialize(
_request_auth=_request_auth,
)

@validate_call
async def delete_connection(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -1405,6 +1410,7 @@ def _delete_connection_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_connection(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -1631,6 +1637,7 @@ def _get_connection_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_connection_endpoint(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -1857,6 +1864,7 @@ def _get_connection_endpoint_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_connections(
self,
alias: Annotated[Optional[StrictStr], Field(description="Alias")] = None,
Expand Down Expand Up @@ -2272,6 +2280,7 @@ def _get_connections_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_metadata(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -2520,6 +2529,7 @@ def _get_metadata_serialize(
_request_auth=_request_auth,
)

@validate_call
async def receive_invitation(
self,
alias: Annotated[Optional[StrictStr], Field(description="Alias")] = None,
Expand Down Expand Up @@ -2822,6 +2832,7 @@ def _receive_invitation_serialize(
_request_auth=_request_auth,
)

@validate_call
async def set_metadata(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down
6 changes: 5 additions & 1 deletion aries_cloudcontroller/api/credential_definition_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand Down Expand Up @@ -55,6 +55,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def credential_definitions_cred_def_id_write_record_post(
self,
cred_def_id: Annotated[
Expand Down Expand Up @@ -293,6 +294,7 @@ def _credential_definitions_cred_def_id_write_record_post_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_created_cred_defs(
self,
cred_def_id: Annotated[
Expand Down Expand Up @@ -657,6 +659,7 @@ def _get_created_cred_defs_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_cred_def(
self,
cred_def_id: Annotated[
Expand Down Expand Up @@ -895,6 +898,7 @@ def _get_cred_def_serialize(
_request_auth=_request_auth,
)

@validate_call
async def publish_cred_def(
self,
conn_id: Annotated[
Expand Down
10 changes: 9 additions & 1 deletion aries_cloudcontroller/api/credentials_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand Down Expand Up @@ -54,6 +54,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def delete_record(
self,
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
Expand Down Expand Up @@ -280,6 +281,7 @@ def _delete_record_serialize(
_request_auth=_request_auth,
)

@validate_call
async def delete_w3c_credential(
self,
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
Expand Down Expand Up @@ -506,6 +508,7 @@ def _delete_w3c_credential_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_credential_mime_types(
self,
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
Expand Down Expand Up @@ -738,6 +741,7 @@ def _get_credential_mime_types_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_record(
self,
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
Expand Down Expand Up @@ -964,6 +968,7 @@ def _get_record_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_records(
self,
count: Annotated[
Expand Down Expand Up @@ -1250,6 +1255,7 @@ def _get_records_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_revocation_status(
self,
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
Expand Down Expand Up @@ -1532,6 +1538,7 @@ def _get_revocation_status_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_w3c_credential(
self,
credential_id: Annotated[StrictStr, Field(description="Credential identifier")],
Expand Down Expand Up @@ -1758,6 +1765,7 @@ def _get_w3c_credential_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_w3c_credentials(
self,
count: Annotated[
Expand Down
4 changes: 3 additions & 1 deletion aries_cloudcontroller/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand All @@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def establish_inbound(
self,
_request_timeout: Union[
Expand Down Expand Up @@ -244,6 +245,7 @@ def _establish_inbound_serialize(
_request_auth=_request_auth,
)

@validate_call
async def get_features(
self,
_request_timeout: Union[
Expand Down
7 changes: 6 additions & 1 deletion aries_cloudcontroller/api/did_exchange_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand Down Expand Up @@ -46,6 +46,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def accept_invitation(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -319,6 +320,7 @@ def _accept_invitation_serialize(
_request_auth=_request_auth,
)

@validate_call
async def accept_request(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -620,6 +622,7 @@ def _accept_request_serialize(
_request_auth=_request_auth,
)

@validate_call
async def create_request(
self,
their_public_did: Annotated[
Expand Down Expand Up @@ -1046,6 +1049,7 @@ def _create_request_serialize(
_request_auth=_request_auth,
)

@validate_call
async def didexchange_conn_id_reject_post(
self,
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
Expand Down Expand Up @@ -1297,6 +1301,7 @@ def _didexchange_conn_id_reject_post_serialize(
_request_auth=_request_auth,
)

@validate_call
async def receive_request(
self,
alias: Annotated[
Expand Down
4 changes: 3 additions & 1 deletion aries_cloudcontroller/api/discover_features_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

from pydantic import Field, StrictFloat, StrictInt, StrictStr
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

try:
from typing import Annotated
Expand Down Expand Up @@ -47,6 +47,7 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_call
async def discover_features_query_get(
self,
comment: Annotated[Optional[StrictStr], Field(description="Comment")] = None,
Expand Down Expand Up @@ -327,6 +328,7 @@ def _discover_features_query_get_serialize(
_request_auth=_request_auth,
)

@validate_call
async def discover_features_records_get(
self,
connection_id: Annotated[
Expand Down
Loading

0 comments on commit 964fa8f

Please sign in to comment.