修复寻找依赖接口,只能找yaml结尾文件,不能找yml结尾文件的问题

This commit is contained in:
floraachy
2024-04-15 17:11:20 +08:00
parent fd9e5b8df1
commit 81f1a0c251

View File

@@ -28,7 +28,7 @@ def get_api_data(api_file_path: str, key: str = None):
api_data = []
if os.path.isdir(api_file_path):
logger.debug(f"目标路径是一个目录:{api_file_path}")
api_files = get_files(target=api_file_path, end=".yaml")
api_files = get_files(target=api_file_path, end=".yaml") + get_files(target=api_file_path, end=".yml")
for api_file in api_files:
api_data.append(YamlHandle(filename=api_file).read_yaml)