diff --git a/pyproject.toml b/pyproject.toml index d926ffa4..6db278ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spectree" -version = "1.2.7" +version = "1.2.8" dynamic = [] description = "generate OpenAPI document and validate request&response with Python annotations." readme = "README.md" diff --git a/spectree/plugins/falcon_plugin.py b/spectree/plugins/falcon_plugin.py index 063190c6..2b68fe37 100644 --- a/spectree/plugins/falcon_plugin.py +++ b/spectree/plugins/falcon_plugin.py @@ -223,7 +223,7 @@ def validate( before(_req, _resp, req_validation_error, _self) if req_validation_error: - return + return None result = func(*args, **kwargs) @@ -243,6 +243,8 @@ def validate( after(_req, _resp, resp_validation_error, _self) + # `falcon` doesn't use this return value. However, some users may have + # their own processing logics that depend on this return value. return result @staticmethod @@ -325,7 +327,7 @@ async def validate( before(_req, _resp, req_validation_error, _self) if req_validation_error: - return + return None result = ( await func(*args, **kwargs)