Skip to content

Commit f873248

Browse files
Update check_openapi_version.py
1 parent cf28473 commit f873248

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/check_openapi_version.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
# if the version is different, print a message
2222
latest_folder_path = "./openapi_specs/latest"
2323
files = os.listdir(latest_folder_path)
24-
file_path = os.path.join(latest_folder_path, files[0])
24+
first_openapi_file = next((f for f in file_names if f.startswith("openapi-v")), None)
25+
file_path = os.path.join(latest_folder_path, first_openapi_file)
2526
with open(file_path, 'r') as file:
2627
openapi_spec = json.load(file)
2728
current_prod_version = openapi_spec['info']['version']

0 commit comments

Comments
 (0)