Closed wissembs closed 1 month ago
Thanks for raising this @wissembs
At the moment, Kiota expects an encoding object to come with the multipart definition to be present in the open api description. https://spec.openapis.org/oas/v3.0.3.html#encoding-object-example
This is however looks to be an incorrect assumption as the spec provides for defaults to use in the event the object is not present. https://spec.openapis.org/oas/v3.0.3.html#special-considerations-for-multipart-content
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Windows executable
Client library/SDK language
Csharp .net8
Describe the bug
I am facing an issue while generating a C# client for my FastAPI application using Kiota. The API has an endpoint for file uploads, but the generated client does not utilize
multipart/form-data
, which is required for this operation.The generated Client's method:
Generated model Body_upload_file_uploadfile__post.cs:
Expected behavior
The generated client should properly handle multipart/form-data for file uploads in accordance with the OpenAPI specification. Kiota should generate a method with MultipartBody like this:
How to reproduce
Here’s the relevant code snippet for my FastAPI application:
main.py :
requirements.txt
Open API description file
Kiota Version
1.18.0+5c6b5d0ef23865ba2f9d9f0b9fe4b944cf26b1ec
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
Click to expand log
```Other information
No response