I have upgraded a Quarkus JAX-RS REST app to the latest version and also switched to using Reactive Rest library. Using Reactive I see you have a new file upload option called FileUpload, but the generated OpenAPI for this is just an object with no fields, and the Swagger UI just shows it has an empty object.
So how can this be used so the OpenApi knows what this object is and Swagger UI can show the typical file upload button?
Here is my code:
public Response fileUploadViaAttachment(@Context SecurityContext ctx,
@Context HttpHeaders httpHeaders,
@Context HttpServerRequest httpServerRequest,
@BeanParam MultipartBody multipartBody
)
MultipartBody contains this field:
@RestForm("fileUpload")
@PartType(MediaType.APPLICATION_OCTET_STREAM)
private FileUpload fileUpload;
public FileUpload getFileUpload() {
return fileUpload;
}
public void setFileUpload(FileUpload fileUpload) {
this.fileUpload = fileUpload;
}
I tried using FileUpload in my reactive REST application but the generated OpenAPI does not build out any support for it nor does the Swagguer UI. I was expecting it to generate OpenAPI content and show a file upload button in the Swagger UI.