You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from typing import List
import sailpoint.v3
import sailpoint.beta
import json
from sailpoint.configuration import Configuration
from pydantic import StrictStr
configuration = Configuration()
results: List[sailpoint.v3.GetActiveCampaigns200ResponseInner] = None
result: sailpoint.v3.GetActiveCampaigns200ResponseInner = None
with sailpoint.v3.ApiClient(configuration) as api_client:
results = sailpoint.v3.CertificationCampaignsApi(api_client).get_active_campaigns()
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 "/Documents/Projects/Python/python-example/test_CertificationCampaigns.py", line 13, 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'>
The text was updated successfully, but these errors were encountered:
scott-fehrman-sp
changed the title
GetActiveCampaigns200ResponseInner: Unable to serialize unknown type: <class 'typing_extensions._LiteralGenericAlias'>
get_active_campaigns(): Unable to serialize unknown type: <class 'typing_extensions._LiteralGenericAlias'>
Jul 2, 2024
Run:
python3 test_CertificationCampaigns.py
Output:
The text was updated successfully, but these errors were encountered: