From 5142b9f54a524ac1584fe7889faa52727184d066 Mon Sep 17 00:00:00 2001 From: SoulPancake Date: Tue, 12 May 2026 23:55:27 +0530 Subject: [PATCH] chore: sync with generator --- .openapi-generator-ignore | 4 +- .openapi-generator/FILES | 2 - README.md | 1 + openfga_sdk/api/open_fga_api.py | 89 +++++++++++++++++++++++++++------ 4 files changed, 77 insertions(+), 19 deletions(-) diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 2d6e183..18ddf6d 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -14,5 +14,7 @@ openfga_sdk/api/open_fga_api openfga_sdk/sync/open_fga_api.py openfga_sdk/api_client.py openfga_sdk/configuration.py +openfga_sdk/constants.py openfga_sdk/exceptions.py -openfga_sdk/rest.py \ No newline at end of file +openfga_sdk/rest.py +VERSION.txt diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 12e588d..049e49c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,7 +7,6 @@ CONTRIBUTING.md LICENSE README.md -VERSION.txt docs/AbortedMessageResponse.md docs/Any.md docs/Assertion.md @@ -98,7 +97,6 @@ docs/WriteRequest.md docs/WriteRequestDeletes.md docs/WriteRequestWrites.md openfga_sdk/api/open_fga_api.py -openfga_sdk/constants.py openfga_sdk/models/__init__.py openfga_sdk/models/aborted_message_response.py openfga_sdk/models/any.py diff --git a/README.md b/README.md index 72dafa6..6b013a9 100644 --- a/README.md +++ b/README.md @@ -1381,6 +1381,7 @@ response = await fga_client.execute_api_request( ) ``` + ### Retries If a network request fails with a 429 or 5xx error from the server, the SDK will automatically retry the request up to 3 times with a minimum wait time of 100 milliseconds between each attempt. diff --git a/openfga_sdk/api/open_fga_api.py b/openfga_sdk/api/open_fga_api.py index b1a2b1d..124c0e0 100644 --- a/openfga_sdk/api/open_fga_api.py +++ b/openfga_sdk/api/open_fga_api.py @@ -447,7 +447,9 @@ async def batch_check_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -457,6 +459,7 @@ async def batch_check_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -541,7 +544,9 @@ async def check_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -551,6 +556,7 @@ async def check_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -635,7 +641,9 @@ async def create_store_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -645,6 +653,14 @@ async def create_store_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set + if ( + self.api_client.client_side_validation + and local_var_params.get("body") is None + ): + raise ApiValueError( + "Missing the required parameter `body` when calling `create_store`" + ) return await self._execute( method="POST", path="/stores", @@ -799,7 +815,9 @@ async def expand_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -809,6 +827,7 @@ async def expand_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -975,7 +994,9 @@ async def list_objects_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -985,6 +1006,7 @@ async def list_objects_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -1077,7 +1099,11 @@ async def list_stores_with_http_info(self, **kwargs): local_var_params = locals() - all_params = ["page_size", "continuation_token", "name"] + all_params = [ + "page_size", + "continuation_token", + "name", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1168,7 +1194,9 @@ async def list_users_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1178,6 +1206,7 @@ async def list_users_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -1262,7 +1291,9 @@ async def read_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1272,6 +1303,7 @@ async def read_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -1358,7 +1390,9 @@ async def read_assertions_with_http_info(self, authorization_model_id, **kwargs) local_var_params = locals() - all_params = ["authorization_model_id"] + all_params = [ + "authorization_model_id", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1451,7 +1485,9 @@ async def read_authorization_model_with_http_info(self, id, **kwargs): local_var_params = locals() - all_params = ["id"] + all_params = [ + "id", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1548,7 +1584,10 @@ async def read_authorization_models_with_http_info(self, **kwargs): local_var_params = locals() - all_params = ["page_size", "continuation_token"] + all_params = [ + "page_size", + "continuation_token", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1654,7 +1693,12 @@ async def read_changes_with_http_info(self, **kwargs): local_var_params = locals() - all_params = ["type", "page_size", "continuation_token", "start_time"] + all_params = [ + "type", + "page_size", + "continuation_token", + "start_time", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1752,7 +1796,9 @@ async def streamed_list_objects_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1762,6 +1808,7 @@ async def streamed_list_objects_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -1846,7 +1893,9 @@ async def write_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1856,6 +1905,7 @@ async def write_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -1948,7 +1998,10 @@ async def write_assertions_with_http_info( local_var_params = locals() - all_params = ["authorization_model_id", "body"] + all_params = [ + "authorization_model_id", + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -1965,6 +2018,7 @@ async def write_assertions_with_http_info( raise ApiValueError( "Missing the required parameter `authorization_model_id` when calling `write_assertions`" ) + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None @@ -2049,7 +2103,9 @@ async def write_authorization_model_with_http_info(self, body, **kwargs): local_var_params = locals() - all_params = ["body"] + all_params = [ + "body", + ] all_params.extend(self._COMMON_PARAMS) for key, val in local_var_params["kwargs"].items(): @@ -2059,6 +2115,7 @@ async def write_authorization_model_with_http_info(self, body, **kwargs): ) local_var_params[key] = val del local_var_params["kwargs"] + # verify the required parameter 'body' is set if ( self.api_client.client_side_validation and local_var_params.get("body") is None