Skip to content

Commit

Permalink
Update SDK for Experimental API warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-mairose-sp committed Jul 17, 2024
1 parent 0e34ffc commit 8f14548
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sdk-resources/resources/api_client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,8 @@ class ApiClient:
header_params['Authorization'] = self.configuration.access_token

if not self.configuration.experimental and 'X-SailPoint-Experimental' in header_params:
del header_params['X-SailPoint-Experimental']
print(f"{bcolors.WARNING}Warning: You are using Experimental APIs. Set configuration.experimental = True to enable these APIs in the SDK.{bcolors.ENDC}")
pass
elif self.configuration.experimental == True:
raise Exception(f"{bcolors.WARNING}You are using Experimental APIs. Set configuration.experimental = True to enable these APIs in the SDK.{bcolors.ENDC}")
elif self.configuration.experimental == True and 'X-SailPoint-Experimental' in header_params:
print(f"{bcolors.WARNING}Warning: You are using Experimental APIs{bcolors.ENDC}")

# path parameters
Expand Down

0 comments on commit 8f14548

Please sign in to comment.