From 8f1454861ceb817e86d0e36b780068275daf64e1 Mon Sep 17 00:00:00 2001 From: Tyler Mairose Date: Wed, 17 Jul 2024 14:46:54 -0400 Subject: [PATCH] Update SDK for Experimental API warning --- sdk-resources/resources/api_client.mustache | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk-resources/resources/api_client.mustache b/sdk-resources/resources/api_client.mustache index a13493d11..b8514e376 100644 --- a/sdk-resources/resources/api_client.mustache +++ b/sdk-resources/resources/api_client.mustache @@ -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