-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Describe the bug
The SailPoint SDK v2024 has a missing import in the requestable_object.py model file, causing a NameError when deserializing API responses from RequestableObjectsApi.
To Reproduce
Steps to reproduce the behavior:
- Install sailpoint SDK version 1.3.4
- Import RequestableObjectsApi
- Call list_requestable_objects method with a valid identity_id
- The API call succeeds but fails during response deserialization
Error Message:
NameError: name 'RequestableObjectRequestStatus' is not defined
Full Traceback:
Traceback (most recent call last):
File "/Users/adunker/dev/code/isc-pyth-ident-sync/requestable_object_test.py", line 22, in <module>
results = RequestableObjectsApi(api_client).list_requestable_objects(identity_id=identity_id)
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/pydantic/_internal/_validate_call.py", line 39, in wrapper_function
return wrapper(*args, **kwargs)
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/pydantic/_internal/_validate_call.py", line 136, in __call__
res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/api/requestable_objects_api.py", line 141, in list_requestable_objects
return self.api_client.response_deserialize(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
response_data=response_data,
^^^^^^^^^^^^^^^^^~~~~~
response_types_map=_response_types_map,
^^^^^^^^^^^^^^^^^^^^^^^
).data
^
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/api_client.py", line 339, in response_deserialize
return_data = self.deserialize(response_text, response_type, content_type)
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/api_client.py", line 479, in deserialize
return_data = self.__deserialize(data, response_type)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/api_client.py", line 497, in __deserialize
return [self.__deserialize(sub_data, sub_kls)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/api_client.py", line 526, in __deserialize
return self.__deserialize_model(data, klass)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/api_client.py", line 864, in __deserialize_model
return klass.from_dict(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
File "/Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/models/requestable_object.py", line 128, in from_dict
"requestStatus": RequestableObjectRequestStatus.from_dict(obj["requestStatus"]) if obj.get("requestStatus") is not None else None,
^^^^^^^^^^^^^^^^^^^^^^^^
NameError: name 'RequestableObjectRequestStatus' is not defined
Root Cause Analysis
The error occurs in /Users/adunker/dev/code/isc-pyth-ident-sync/venv/lib/python3.13/site-packages/sailpoint/v2024/models/requestable_object.py at line 128, where the code attempts to use RequestableObjectRequestStatus without importing it.
Problematic Code Location:
# In requestable_object.py line 128
"requestStatus": RequestableObjectRequestStatus.from_dict(obj["requestStatus"]) if obj.get("requestStatus") is not None else None,Minimal Code Example:
from sailpoint.v2024.api.requestable_objects_api import RequestableObjectsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()
configuration.experimental = True
with ApiClient(configuration) as api_client:
api_instance = RequestableObjectsApi(api_client)
# This line causes the error:
result = api_instance.list_requestable_objects(identity_id="your_identity_id")Expected behavior
The RequestableObjectsApi should successfully deserialize the API response and return the requestable objects data.
Actual behavior
The API call succeeds but fails during response deserialization.
Operating System (please complete the following information):
- Python Version: 3.13.3
- SDK Version: 1.3.4
- OS: macOS (Darwin 24.5.0)
- Architecture: ARM64
- Pydantic Version: 2.11.7
Browser (please complete the following information):
- Browser: [e.g. Chrome, Firefox, Brave, Safari]
- Version [e.g. 1.04]
Additional context Add any other context about the problem here.