connexion (version 2.14.2) is failing to extract parameter from multipart/form-data POST body with one string parameter and one file parameter #1679
Replies: 1 comment 2 replies
-
I looked into the latest code in github. It may have a fix for the bug. The function prep_kwargs passes content_type=request.mimetype to get_arguments and eventually _get_body_argument uses this content_type. This may work for my case. Is there any released version that I can install for trying this new code? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here is a part of my openapi spec.
There are two required parameters in the requestBody. This format should be valid if the following example from https://swagger.io/docs/specification/describing-request-body/file-upload/ is valid.
The only difference in my spec is that I marked both of the properties as required.
The connexion module is failing to extract the pcap_name argument from the body. I am using openapi version 3.0.0. So the function _get_body_argument from connexion/operations/openapi.py is getting called.
Am I doing anything wrong here? If not then there is a bug in the _get_body_argument function (at least in the version I am using).
Replacing the last line by return result (instead of return {}) fixes the problem.
Please share your thoughts and let me know what the proper fix should be.
Is there some other version that I should upgrade to? I installed my version recently using pip install connexion.
Beta Was this translation helpful? Give feedback.
All reactions