Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_by_jsonpath匹配规则,未做空处理,需要优化下 #4

Open
1373822829 opened this issue Dec 4, 2023 · 0 comments
Open

Comments

@1373822829
Copy link

1373822829 commented Dec 4, 2023

在./aomaker/cache.py155行,get_by_jsonpath方法需要增加expr_index为None时,返回list数字
获取响应结果中list参数时,会引发异常
jsonpath表达式:$..id
响应结果:
{ "code": 0, "msg": "操作成功", "data": [ { "create_user": 6, "body": null, "update_user": 6, "body_type": 0, "name": "用例163625", "directory_id": 332, "id": 281, "request_type": 1, "tag": null, "created_at": "2023-12-04 16:36:25", "url": "https://www.baidu.com", "status": 3, "updated_at": "2023-12-04 16:36:25", "request_method": "GET", "priority": "P0", "deleted_at": 0, "request_headers": "{}", "case_type": 0, "base_path": null }, { "create_user": 6, "body": null, "update_user": 6, "body_type": 0, "name": "用例164214", "directory_id": 332, "id": 282, "request_type": 1, "tag": null, "created_at": "2023-12-04 16:42:14", "url": "https://www.baidu.com", "status": 3, "updated_at": "2023-12-04 16:42:14", "request_method": "GET", "priority": "P0", "deleted_at": 0, "request_headers": "{}", "case_type": 0, "base_path": null } ] }

问题错误截图:
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant