diff --git a/.sdk-version b/.sdk-version index 8a5b818..1defe53 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.0.4 +v2.1.0 diff --git a/docs/AppApiRestV2FunctionsResponsesFunction.md b/docs/AppApiRestV2FunctionsResponsesFunction.md index 0cf6d70..2782783 100644 --- a/docs/AppApiRestV2FunctionsResponsesFunction.md +++ b/docs/AppApiRestV2FunctionsResponsesFunction.md @@ -6,7 +6,7 @@ Function schema used in function strings response. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**function_id** | **int** | | +**function_id** | **int** | | [optional] **function_vaddr** | **int** | Function virtual address | ## Example diff --git a/revengai/__init__.py b/revengai/__init__.py index a67dd84..699515e 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.0.4" +__version__ = "v2.1.0" # Define package exports __all__ = [ diff --git a/revengai/api_client.py b/revengai/api_client.py index 695967e..94ae10e 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v2.0.4/python' + self.user_agent = 'OpenAPI-Generator/v2.1.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 2773af6..637f352 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -529,8 +529,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v2.0.4\n"\ - "SDK Package Version: v2.0.4".\ + "Version of the API: v2.1.0\n"\ + "SDK Package Version: v2.1.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/app_api_rest_v2_functions_responses_function.py b/revengai/models/app_api_rest_v2_functions_responses_function.py index c504480..143040f 100644 --- a/revengai/models/app_api_rest_v2_functions_responses_function.py +++ b/revengai/models/app_api_rest_v2_functions_responses_function.py @@ -17,7 +17,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -25,7 +25,7 @@ class AppApiRestV2FunctionsResponsesFunction(BaseModel): """ Function schema used in function strings response. """ # noqa: E501 - function_id: StrictInt + function_id: Optional[StrictInt] = None function_vaddr: StrictInt = Field(description="Function virtual address") __properties: ClassVar[List[str]] = ["function_id", "function_vaddr"] @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if function_id (nullable) is None + # and model_fields_set contains the field + if self.function_id is None and "function_id" in self.model_fields_set: + _dict['function_id'] = None + return _dict @classmethod diff --git a/test/test_app_api_rest_v2_functions_responses_function.py b/test/test_app_api_rest_v2_functions_responses_function.py index 63a2c00..b3f877a 100644 --- a/test/test_app_api_rest_v2_functions_responses_function.py +++ b/test/test_app_api_rest_v2_functions_responses_function.py @@ -39,7 +39,6 @@ def make_instance(self, include_optional) -> AppApiRestV2FunctionsResponsesFunct ) else: return AppApiRestV2FunctionsResponsesFunction( - function_id = 56, function_vaddr = 56, ) """