from typing import List
import sailpoint.v3
import sailpoint.beta
import json
from sailpoint.configuration import Configuration
from pydantic import StrictStr
configuration: Configuration = Configuration()
results: List[sailpoint.v3.IdentityProfile] = None
result: sailpoint.v3.IdentityProfile = None
data: str = None
with sailpoint.v3.ApiClient(configuration) as api_client:
results = sailpoint.v3.IdentityProfilesApi(api_client).list_identity_profiles()
result = results[0]
data = result.model_dump_json(by_alias=True, indent=4) # ERROR
print(data)
Output:
Unable to serialize unknown type: <class 'typing_extensions._LiteralGenericAlias'>
File "test_IdentityProfiles.py", line 16, in <module>
data = result.model_dump_json(by_alias=True, indent=4)
pydantic_core._pydantic_core.PydanticSerializationError:
Unable to serialize unknown type: <class 'typing_extensions._LiteralGenericAlias'>
run:
python3 test_IdentityProfiles.py
code:
Output: