kuto
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: kuto | ||
| Version: 0.0.73 | ||
| Version: 0.0.74 | ||
| Summary: 全平台自动化测试框架 | ||
@@ -5,0 +5,0 @@ Home-page: https://gitee.com/bluepang2021/kuto |
+1
-1
@@ -14,3 +14,3 @@ from allure import * | ||
| __version__ = "0.0.73" | ||
| __version__ = "0.0.74" | ||
| __description__ = "全平台自动化测试框架" |
| # @Time : 2022/2/11 9:00 | ||
| # @Author : kang.yang@qizhidao.com | ||
| # @File : swagger.py | ||
| import sys | ||
| import requests | ||
| import urllib3 | ||
| urllib3.disable_warnings() | ||
@@ -48,3 +48,3 @@ | ||
| tag_dict[name] = des | ||
| print(tag_dict) | ||
| # print(tag_dict) | ||
| # 获取接口信息 | ||
@@ -57,3 +57,5 @@ paths = data_json.get('paths') | ||
| apiPath = apiPath.replace('}', '') | ||
| print(apiPath) | ||
| for method, content in value.items(): | ||
| print(content) | ||
| tag = content['tags'][0] | ||
@@ -72,3 +74,26 @@ if is_chinese(tag): | ||
| apiDesc = apiDesc.replace('"', '') | ||
| api_list.append([method, project, moduleName, moduleDesc, apiPath, apiDesc]) | ||
| params = [item for item in content.get('parameters', [])] | ||
| for i, param in enumerate(params): | ||
| _in = param.get("in") | ||
| _param = None | ||
| if _in == 'body': | ||
| _schema = param.get("schema") | ||
| if _schema.get("originalRef", None) is not None: | ||
| _ref = _schema["originalRef"] | ||
| _param = data_json["definitions"][_ref]['properties'] | ||
| else: | ||
| _items = _schema.get("items") | ||
| if _items.get('originalRef', None) is not None: | ||
| _ref = _schema["items"]["originalRef"] | ||
| _param = data_json["definitions"][_ref]['properties'] | ||
| _param = [_param] | ||
| else: | ||
| _param = param | ||
| _param["type"] = param["schema"]["items"]["type"] | ||
| _param = [_param] | ||
| if _param is not None: | ||
| params[i] = {"in": "body", "value": _param} | ||
| api_list.append([method, project, moduleName, moduleDesc, apiPath, apiDesc, params]) | ||
| for index, api in enumerate(api_list): | ||
@@ -79,2 +104,4 @@ print(index, api) | ||
| if __name__ == '__main__': | ||
| get_swagger_data("http://app-test-lan.qizhidao.com/kz-bff-scrm/v2/api-docs?group=%E4%BC%81%E7%9F%A5%E9%81%93") | ||
@@ -89,2 +116,1 @@ | ||
+1
-1
| Metadata-Version: 2.1 | ||
| Name: kuto | ||
| Version: 0.0.73 | ||
| Version: 0.0.74 | ||
| Summary: 全平台自动化测试框架 | ||
@@ -5,0 +5,0 @@ Home-page: https://gitee.com/bluepang2021/kuto |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
229174
0.57%5505
0.44%