when processed by openapi quarkiverse extension is transformed to the following Java method
@POST
@Path("/jars/upload")
@Consumes({"application/x-java-archive"})
@Produces({"application/json"})
@GeneratedMethod ("uploadJar")
public JarUploadResponseBody uploadJar(
File body
);
Currently, SonataFlow implementation is not able to invoke that method, since the generated briged to perform the operation will never work (there is not way to convert a JsonObject to a File withtou aditional logic)
This issue has been opened to add the misisng logic to create a File object from the function call arguments. In particular, for an OpenAPI operation which has a File as argument, the argument of the function call in the workflow definition must be a string with the file location in disk
After this change, it will be possible to upload files that are accessible in the local file system.
Implementation ideas
When the target class of the buildBody call is a File, assume that the paramters map contains one entry of type string and build the File object from that string.
Description
An OpenAPI operation that is defined in the spec file as
when processed by openapi quarkiverse extension is transformed to the following Java method
Currently, SonataFlow implementation is not able to invoke that method, since the generated briged to perform the operation will never work (there is not way to convert a JsonObject to a File withtou aditional logic)
This issue has been opened to add the misisng logic to create a File object from the function call arguments. In particular, for an OpenAPI operation which has a File as argument, the argument of the function call in the workflow definition must be a string with the file location in disk
A YAML example:
After this change, it will be possible to upload files that are accessible in the local file system.
Implementation ideas
When the target class of the buildBody call is a File, assume that the paramters map contains one entry of type string and build the File object from that string.