This PR fixes the multipart/form-data functionality in flask_pydantic_spec to allow us to extend the body with extra parameters.
In OpenAPI, it is not possible to provide a spec that allows the user to choose the key that the file data lives under. As such, the file name will be static.
This PR fixes the validation to allow us to successfully instantiate a pydantic object from the form data if provided, validating it as per usual.
I would suggest this should be a major version jump as I renamed the file_name attribute on MultipartFormRequest as it's currently unclear the purpose of the attribute.
This PR fixes the multipart/form-data functionality in
flask_pydantic_spec
to allow us to extend the body with extra parameters.In OpenAPI, it is not possible to provide a spec that allows the user to choose the key that the file data lives under. As such, the file name will be static.
This PR fixes the validation to allow us to successfully instantiate a pydantic object from the form data if provided, validating it as per usual.
I would suggest this should be a major version jump as I renamed the
file_name
attribute onMultipartFormRequest
as it's currently unclear the purpose of the attribute.