From 19b7fcc6f9ce36fc5ff5169e47369b8f0e446574 Mon Sep 17 00:00:00 2001 From: Ruwan Date: Sun, 11 Jun 2023 08:19:14 +0200 Subject: [PATCH] Allow request body for GET and DELETE --- connexion/decorators/parameter.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/connexion/decorators/parameter.py b/connexion/decorators/parameter.py index 8aab04f5c..e4fdd3e50 100644 --- a/connexion/decorators/parameter.py +++ b/connexion/decorators/parameter.py @@ -211,18 +211,17 @@ def get_arguments( ) ) - if operation.method.upper() in ["PATCH", "POST", "PUT"]: - ret.update( - _get_body_argument( - body, - operation=operation, - arguments=arguments, - has_kwargs=has_kwargs, - sanitize=sanitize, - content_type=content_type, - ) + ret.update( + _get_body_argument( + body, + operation=operation, + arguments=arguments, + has_kwargs=has_kwargs, + sanitize=sanitize, + content_type=content_type, ) - ret.update(_get_file_arguments(files, arguments, has_kwargs)) + ) + ret.update(_get_file_arguments(files, arguments, has_kwargs)) return ret