resteasy-reactive multipart and swagger upload file #31807
-
Hi. Looks like mutiny api is deprecated and quarkus suggest to migrate to resteasy-reactive. But, after migration i catch some problems. Before migration to reactive form part was:
But in this case looks like APPLICATION_OCTET_STREAM is ignored and file is uploaded as text. I read recommendations from https://quarkus.io/guides/resteasy-reactive#handling-multipart-form-data and see now it is recommended to use File or FileUpload. But if i use code like:
then swagger don't see Schema and upload button is not displayed. Are some standart way to have needed functionality? I found some workaround like https://dev.to/felipewind/uploading-a-file-through-swagger-in-quarkus-3l8l but this solution with manual describing schema is not elegant. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
/cc @FroMage (resteasy-reactive), @MikeEdgar (swagger-ui), @Sgitario (resteasy-reactive), @geoand (resteasy-reactive), @phillip-kruger (swagger-ui), @stuartwdouglas (resteasy-reactive) |
Beta Was this translation helpful? Give feedback.
-
@MikhailMalyutin do you have a small reproducer app that we can look at? |
Beta Was this translation helpful? Give feedback.
-
@MikhailMalyutin , please try adding |
Beta Was this translation helpful? Give feedback.
-
Thanks. It is working. I tried like
|
Beta Was this translation helpful? Give feedback.
@MikhailMalyutin , please try adding
implementation = String::class
to your@field:Schema
on theFile
property. Until this is handled automatically in smallrye-open-api, that hint will set the correcttype
on the schema.