Skip to content

Commit

Permalink
Applying patch spec-first#954
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Bruskiewich committed Mar 11, 2021
1 parent 1d54bb1 commit b091fb1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions connexion/operations/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ..decorators.uri_parsing import OpenAPIURIParser
from ..utils import deep_get, deep_merge, is_null, is_nullable, make_type
from ..http_facts import FORM_CONTENT_TYPES

logger = logging.getLogger("connexion.operations.openapi3")

Expand Down Expand Up @@ -297,6 +298,11 @@ 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] in FORM_CONTENT_TYPES:
return res

return {}

def _get_typed_body_values(self, body_arg, body_props, additional_props):
Expand Down

0 comments on commit b091fb1

Please sign in to comment.