Loading config/config.json +3 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ "service-kpis": "" }, "publish_req" : { "service_api_id":"", "publisher_apf_id":"APFf02496247da926df31ebeaf0e513d7", "publisher_aefs_ids":["AEF859e36f7e3f11818650fdafa16a0c7","AEF44d5838a3884f4885cb8e6ffc98f41"] "service_api_id":"6d3fbdcc138f81b36c7b1595229377", "publisher_apf_id":"APFdf22044ce6988b136b253a8c5b26f1", "publisher_aefs_ids":["AEF0f66526ff2fd8a1be721ace3506adb","AEF212b55c43b1b16116192043bab9e05"] }, "api_description_path":"/Users/IDB0128/git_repos/pesp_capif_sdk/samples/provider_api_description_sample.json" } No newline at end of file samples/provider_api_description_sample.json +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ "apiName": "Api-de-prueba-2", "aefProfiles": [ { "aefId": "AEF859e36f7e3f11818650fdafa16a0c7", "aefId": "AEF0f66526ff2fd8a1be721ace3506adb", "versions": [ { "apiVersion": "v1", Loading Loading @@ -61,7 +61,7 @@ ] }, { "aefId": "AEF44d5838a3884f4885cb8e6ffc98f41", "aefId": "AEF212b55c43b1b16116192043bab9e05", "versions": [ { "apiVersion": "v1", Loading sdk/sdk.py +14 −24 Original line number Diff line number Diff line Loading @@ -536,6 +536,13 @@ class CAPIFProviderConnector: self.csr_email_address = csr_email_address self.aefs = int(aefs) self.apfs = int(apfs) config=config["publish_req"] self.publish_req = { "service_api_id": os.getenv('SERVICE_API_ID', config.get('service_api_id', '')).strip(), "publisher_apf_id": os.getenv('PUBLISHER_APF_ID', config.get('publisher_apf_id', '')).strip(), "publisher_aefs_ids": os.getenv('PUBLISHER_AEFS_IDS', config.get('publisher_aefs_ids', '')) } self.api_description_path=api_description_path self.capif_https_port = str(capif_https_port) Loading Loading @@ -802,10 +809,8 @@ class CAPIFProviderConnector: with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] AEFs_list = chosenAPFsandAEFs["publisher_aefs_ids"] Loading Loading @@ -928,10 +933,7 @@ class CAPIFProviderConnector: publish_url=provider_details["publish_url"] # Load provider details json_path = self.config_path +"config.json" with open(json_path, 'r') as f: publish = json.load(f) publish=publish["publish_req"] publish=self.publish_req api_id="/" + publish["service_api_id"] APF_api_prov_func_id=publish["publisher_apf_id"] AEFs_list = publish["publisher_aefs_ids"] Loading Loading @@ -1043,7 +1045,7 @@ class CAPIFProviderConnector: with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] Loading Loading @@ -1114,14 +1116,8 @@ class CAPIFProviderConnector: provider_details=self.__load_provider_api_details() publish_url=provider_details["publish_url"] json_path = self.config_path + "config.json" with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] Loading Loading @@ -1196,14 +1192,8 @@ class CAPIFProviderConnector: provider_details=self.__load_provider_api_details() publish_url=provider_details["publish_url"] json_path = self.config_path + "config.json" with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] AEFs_list = chosenAPFsandAEFs["publisher_aefs_ids"] Loading Loading @@ -1928,7 +1918,7 @@ class ServiceDiscoverer: # Filtrar parámetros que no sean vacíos " filters=self.discover_filter print(filters) query_params = {k: v for k, v in filters.items() if v.strip() } # Formar la URL con los parámetros de query Loading Loading
config/config.json +3 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ "service-kpis": "" }, "publish_req" : { "service_api_id":"", "publisher_apf_id":"APFf02496247da926df31ebeaf0e513d7", "publisher_aefs_ids":["AEF859e36f7e3f11818650fdafa16a0c7","AEF44d5838a3884f4885cb8e6ffc98f41"] "service_api_id":"6d3fbdcc138f81b36c7b1595229377", "publisher_apf_id":"APFdf22044ce6988b136b253a8c5b26f1", "publisher_aefs_ids":["AEF0f66526ff2fd8a1be721ace3506adb","AEF212b55c43b1b16116192043bab9e05"] }, "api_description_path":"/Users/IDB0128/git_repos/pesp_capif_sdk/samples/provider_api_description_sample.json" } No newline at end of file
samples/provider_api_description_sample.json +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ "apiName": "Api-de-prueba-2", "aefProfiles": [ { "aefId": "AEF859e36f7e3f11818650fdafa16a0c7", "aefId": "AEF0f66526ff2fd8a1be721ace3506adb", "versions": [ { "apiVersion": "v1", Loading Loading @@ -61,7 +61,7 @@ ] }, { "aefId": "AEF44d5838a3884f4885cb8e6ffc98f41", "aefId": "AEF212b55c43b1b16116192043bab9e05", "versions": [ { "apiVersion": "v1", Loading
sdk/sdk.py +14 −24 Original line number Diff line number Diff line Loading @@ -536,6 +536,13 @@ class CAPIFProviderConnector: self.csr_email_address = csr_email_address self.aefs = int(aefs) self.apfs = int(apfs) config=config["publish_req"] self.publish_req = { "service_api_id": os.getenv('SERVICE_API_ID', config.get('service_api_id', '')).strip(), "publisher_apf_id": os.getenv('PUBLISHER_APF_ID', config.get('publisher_apf_id', '')).strip(), "publisher_aefs_ids": os.getenv('PUBLISHER_AEFS_IDS', config.get('publisher_aefs_ids', '')) } self.api_description_path=api_description_path self.capif_https_port = str(capif_https_port) Loading Loading @@ -802,10 +809,8 @@ class CAPIFProviderConnector: with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] AEFs_list = chosenAPFsandAEFs["publisher_aefs_ids"] Loading Loading @@ -928,10 +933,7 @@ class CAPIFProviderConnector: publish_url=provider_details["publish_url"] # Load provider details json_path = self.config_path +"config.json" with open(json_path, 'r') as f: publish = json.load(f) publish=publish["publish_req"] publish=self.publish_req api_id="/" + publish["service_api_id"] APF_api_prov_func_id=publish["publisher_apf_id"] AEFs_list = publish["publisher_aefs_ids"] Loading Loading @@ -1043,7 +1045,7 @@ class CAPIFProviderConnector: with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] Loading Loading @@ -1114,14 +1116,8 @@ class CAPIFProviderConnector: provider_details=self.__load_provider_api_details() publish_url=provider_details["publish_url"] json_path = self.config_path + "config.json" with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] Loading Loading @@ -1196,14 +1192,8 @@ class CAPIFProviderConnector: provider_details=self.__load_provider_api_details() publish_url=provider_details["publish_url"] json_path = self.config_path + "config.json" with open(json_path, 'r') as f: chosenAPFsandAEFs = json.load(f) chosenAPFsandAEFs=chosenAPFsandAEFs["publish_req"] chosenAPFsandAEFs=self.publish_req APF_api_prov_func_id = chosenAPFsandAEFs["publisher_apf_id"] AEFs_list = chosenAPFsandAEFs["publisher_aefs_ids"] Loading Loading @@ -1928,7 +1918,7 @@ class ServiceDiscoverer: # Filtrar parámetros que no sean vacíos " filters=self.discover_filter print(filters) query_params = {k: v for k, v in filters.items() if v.strip() } # Formar la URL con los parámetros de query Loading