From 4ead7c425d97d824bb1295e09b88190446804810 Mon Sep 17 00:00:00 2001 From: sbansla Date: Thu, 26 Sep 2024 13:08:47 +0530 Subject: [PATCH] updated comments --- scripts/build_twilio_library.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/build_twilio_library.py b/scripts/build_twilio_library.py index 99b0b871f..a98be36ab 100644 --- a/scripts/build_twilio_library.py +++ b/scripts/build_twilio_library.py @@ -117,25 +117,23 @@ def get_domain_info(oai_spec_location: str, domain: str, is_file: bool = False) return full_path, domain_name, api_version def merge_orgs_schema(from_spec, to_spec): - # Load file.json + with open(to_spec, 'r') as f1: spec1 = json.load(f1) - # Load file2.json + with open(from_spec, 'r') as f2: spec2 = json.load(f2) - # Assuming both files follow OpenAPI structure, we merge the 'paths' section if 'paths' in spec1 and 'paths' in spec2: spec1['paths'].update(spec2['paths']) else: print("One of the files doesn't contain 'paths'.") - # Save the merged result into a new file with open(to_spec, 'w') as outfile: json.dump(spec1, outfile, indent=2) - print("Files merged successfully into to_spec.") + print(f"Files merged successfully into {to_spec}.") if __name__ == '__main__':