openapi-generator/samples/openapi3/client/petstore/python-pydantic-v1/docs/UploadFileWithAdditionalPropertiesRequestObject.md
Rory Schadler 8171648eb4
fix(python,asyncio): multipart form data serialization (#19302)
* fix: object serialization for multipart requests

This PR is essentially
<https://github.com/OpenAPITools/openapi-generator/pull/18140> but for
the asyncio client.

* fix: int serialization for multipart requests

urllib3 handles serializing ints in post params (ref 1), while asyncio
explicitly does not (ref 2).

ref 1: <9316764e90/src/urllib3/filepost.py (L75-L76)>
ref 2: <https://github.com/aio-libs/aiohttp/issues/920>

* test: new fake multipart endpoint with files and body

* test: regression test for stringified body params

* fix: mypy tweak

* fix: FILES regeneration

* feat: object, int serialization for multipart reqs

Extends previous commits (and #18140) to cover the python-pydantic-v1
client as well.

* fix: use async with in test

* test: regression test for pydantic-v1-aiohttp

* test: add regression test to pydantic-v1

Also brings the second test in line with the first, patching
`urllib3.PoolManager.urlopen`
2024-09-09 17:43:25 +08:00

1.3 KiB

UploadFileWithAdditionalPropertiesRequestObject

Additional object

Properties

Name Type Description Notes
name str [optional]

Example

from petstore_api.models.upload_file_with_additional_properties_request_object import UploadFileWithAdditionalPropertiesRequestObject

# TODO update the JSON string below
json = "{}"
# create an instance of UploadFileWithAdditionalPropertiesRequestObject from a JSON string
upload_file_with_additional_properties_request_object_instance = UploadFileWithAdditionalPropertiesRequestObject.from_json(json)
# print the JSON string representation of the object
print UploadFileWithAdditionalPropertiesRequestObject.to_json()

# convert the object into a dict
upload_file_with_additional_properties_request_object_dict = upload_file_with_additional_properties_request_object_instance.to_dict()
# create an instance of UploadFileWithAdditionalPropertiesRequestObject from a dict
upload_file_with_additional_properties_request_object_from_dict = UploadFileWithAdditionalPropertiesRequestObject.from_dict(upload_file_with_additional_properties_request_object_dict)

[Back to Model list] [Back to API list] [Back to README]