sailpoint-oss / python-sdk

MIT License
6 stars 3 forks source link

list_identity_certifications(): 1 validation error for CampaignReference #21

Closed scott-fehrman-sp closed 1 week ago

scott-fehrman-sp commented 2 months ago

Run: python3 test_Certifications.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()

results: List[sailpoint.v3.IdentityCertificationDto] = None
result: sailpoint.v3.IdentityCertificationDto = None

with sailpoint.v3.ApiClient(configuration) as api_client:
    results = sailpoint.v3.CertificationsApi(api_client).list_identity_certifications() # ERROR
    result = results[0]
    print(result.model_dump_json(by_alias=True, indent=4))

Output:

1 validation error for CampaignReference
correlatedStatus
  Input should be a valid dictionary [type=dict_type, input_value='CORRELATED', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/dict_type
  File "/Documents/Projects/Python/python-example/test_Certifications.py", line 14, in <module>
   results = sailpoint.v3.CertificationsApi(api_client).list_identity_certifications()
pydantic_core._pydantic_core.ValidationError: 1 validation error for CampaignReference
correlatedStatus
  Input should be a valid dictionary [type=dict_type, input_value='CORRELATED', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/dict_type
ianphilm commented 1 month ago

Hi @scott-fehrman-sp , this is a blocker for us to get a utility script working with the Python SDK, do you have an estimate on when this might get patched in further releases?

scott-fehrman-sp commented 1 month ago

Hi @ianphilm Thank you for your feedback on this issue. Engineering is aware of this issue. As a temporary work-around, you can use the equivalent REST API. Here is a link to the same functionality, using the Python "requests" library: https://developer.sailpoint.com/docs/api/v3/list-identity-certifications

tyler-mairose-sp commented 1 week ago

Hey @ianphilm @scott-fehrman-sp, this is fixed in https://github.com/sailpoint-oss/python-sdk/commit/59b096ba03213367f492f2ed0040b44727ef08a7 and will be in the next release.