Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_active_campaigns(): Unable to serialize unknown type: <class 'typing_extensions._LiteralGenericAlias'> #19

Open
scott-fehrman-sp opened this issue Jul 2, 2024 · 0 comments

Comments

@scott-fehrman-sp
Copy link

Run: python3 test_CertificationCampaigns.py

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'>
@scott-fehrman-sp 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant