Skip to content

Commit

Permalink
Allow empty return type
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanarijit committed Dec 22, 2023
1 parent 507f4ca commit dd9631f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apphelpers/rest/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ def build(self, method, method_args, method_kw, f):
method_kw["operation_id"] = f"{ep}_{module}"
if "tags" not in method_kw:
method_kw["tags"] = [module]
if "response_model" not in method_kw and "response_class" not in method_kw:
if (
"response_model" not in method_kw
and "response_class" not in method_kw
and return_type is not inspect.Signature.empty
):
method_kw["response_model"] = return_type

print(
Expand Down

0 comments on commit dd9631f

Please sign in to comment.