Skip to content

Commit f748d5f

Browse files
Update src/hackingBuddyGPT/usecases/web_api_testing/documentation/parsing/openapi_converter.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b5f5688 commit f748d5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/hackingBuddyGPT/usecases/web_api_testing/documentation/parsing/openapi_converter.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def extract_openapi_info(self, openapi_spec_file, output_path=""):
130130
}
131131
filename = os.path.basename(openapi_spec_file)
132132
filename = filename.replace("_oas", "_config")
133-
output_filename = filename.replace(f".{openapi_spec_file}", f".json")
133+
base_name, _ = os.path.splitext(filename)
134+
output_filename = f"{base_name}.json"
134135
output_path = os.path.join(output_path, output_filename)
135136

136137
os.makedirs(os.path.dirname(output_path), exist_ok=True)

0 commit comments

Comments
 (0)