Skip to content

Commit

Permalink
Attempt to fix a situation where form data is thrown away when the re…
Browse files Browse the repository at this point in the history
…questBody has no name
  • Loading branch information
rsnyman committed May 22, 2019
1 parent 1bda065 commit 9341956
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions connexion/operations/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ def _get_body_argument(self, body, arguments, has_kwargs, sanitize):

if x_body_name in arguments or has_kwargs:
return {x_body_name: res}
# If the content type is "multipart/form-data" return the properties as-is
if self.consumes[0] == 'multipart/form-data':
return res
return {}

def _sanitize_body_argument(self, body_arg, body_props, additional_props, sanitize):
Expand Down

0 comments on commit 9341956

Please sign in to comment.