-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix multipart body file array #938
base: main
Are you sure you want to change the base?
fix: Fix multipart body file array #938
Conversation
651fddc
to
fe841d7
Compare
Thanks for adding this support! I believe this is a breaking change, since it's possible someone was using the JSON serialization behavior before (even though it seems wrong in general). I'll need to do some manual testing just to make sure I know how to describe the breaking change 😅. I'd also love to get someone to test a real running API and verify it all functions (maybe you've already done this?) |
Yes, I already use the updated model template as a custom template in a project. Unfortunately this project is not public yet and the API it is developed for, isn't publicly accessible, too |
Hi, just tested this out with an api I am working on. It works great. |
# Conflicts: # end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py # end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py # end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py # end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py # end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py # end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py # openapi_python_client/templates/model.py.jinja
As described in #692 arrays of files are not handled correctly, if they are part of multipart/form-data. This is fixed in this PR by letting
to_multipart
return aList[Tuple[str, Any]]
instead of aDict[str, Any]
.