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

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

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

Comments

@scott-fehrman-sp
Copy link

Run: python3 test_Workflows.py

Code:

from typing import List
import sailpoint.v3
import sailpoint.beta
import json
from sailpoint.configuration import Configuration
from pydantic import StrictStr

configuration: Configuration = None
results: List[sailpoint.v3.Workflow] = None
result: sailpoint.v3.Workflow = None
data: str = None

configuration = Configuration()

with sailpoint.v3.ApiClient(configuration) as api_client:
    results = sailpoint.v3.WorkflowsApi(api_client).list_workflows()
    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_Workflows.py", line 18, 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'>
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