knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.7k stars 303 forks source link

Using `file` (Content-Type: multipart/form-data) together with array or objects doesn't work #710

Open Zuruckt opened 1 year ago

Zuruckt commented 1 year ago

Scribe version

4.22.0 | Laravel 10.x

Your question

When using file type, the content type is changed to multipart/form-data as expected. This, however make me unable to use the object type, has the format it sends the parameters is modified. image

Is there something I'm missing here to use both object/arrays and file types in the same requisition? When I remove the file/content-type it works fine image

Docs

shalvah commented 1 year ago

Oof, thanks for the screenshots, but I also need to see the code snippets (the docblocks/attributes) to understand. Also not sure if your question I about Try It Out, response calls or something else.

Mohdk911 commented 1 year ago

@shalvah , @Zuruckt I'm facing the same issue, is it fixed? It's with Try It Out response calls

Mohdk911 commented 1 year ago

@shalvah Any updates ?!

Zuruckt commented 1 year ago

Oof, thanks for the screenshots, but I also need to see the code snippets (the docblocks/attributes) to understand. Also not sure if your question I about Try It Out, response calls or something else.

Oh sorry, I didn't see your response until @Mohdk911 brought back this issue. I was in a hurry in the time so I ended up doing some other method for this problem so I don't have the code anymore. But I still think it's a relevant issue and I can try to make a reproduction case later this week.

Mohdk911 commented 1 year ago

@Zuruckt Thank you very much. Could you please provide me with a workaround to resolve this issue? I attempted to utilize "No-example," but it no longer recognizes the uploaded image as an UploadedFile instance. Instead, it reads the image as an empty array.

 *  @bodyParam image_file file image required No-example
 *  Image file 
Mohdk911 commented 11 months ago

@Zuruckt Is there any update about this issue ?!