diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 46236a56..159ea519 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,7 @@ ## 3.1.9 (2022-04-17) +- fix #1174: pydantic validation error when body is None - fix #1209: only convert jmespath path for some fields in white list - fix #1233: parse upload info with session variables - fix #1246: catch exceptions when getting socket address failed diff --git a/httprunner/models.py b/httprunner/models.py index e149e407..65c4446a 100644 --- a/httprunner/models.py +++ b/httprunner/models.py @@ -133,7 +133,7 @@ class ResponseData(BaseModel): cookies: Cookies encoding: Union[Text, None] = None content_type: Text - body: Union[Text, bytes, List, Dict] + body: Union[Text, bytes, List, Dict, None] class ReqRespData(BaseModel): @@ -161,7 +161,7 @@ class StepData(BaseModel): data: Union[SessionData, List['StepData']] = None export_vars: VariablesMapping = {} - + StepData.update_forward_refs()