Client for multipart/mixed or multipart/form-data endpoints? #710
Unanswered
retrofreak83
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear all,
I am working on a system which needs to communicate with a REST API I have an OpenAPI spec for. One endpoint is responding in
multipart/mixed
(they also provide another one which returnsmultipart/form-data
).The client code is generated fine. However, when the client code is called to access that multipart-endpoint, an exception like this occurs:
Jakarta.ws.rs.ProcessingException: RESTEASY003145: Unable to find a MessageBodyReader of content-type multipart/form-data:boundary=MULTIPART_BOUNDARY and type class...
As REST client dependency, we use
quarkus-rest-client-jackson
, so according to these sites:https://quarkus.io/guides/rest-migration#dependencies-2
https://quarkus.io/guides/rest-client
we are using the current REST client variant of Quarkus, formerly known as "RESTEasy Reactive".
However, the documentation of the quarkus-openapi-generator plugin calls that dependency "RESTEasy Classic"
https://docs.quarkiverse.io/quarkus-openapi-generator/dev/client.html
In contrast to that, Quarkus documentation calls
quarkus-resteasy-client
"the REST Client compatible with RESTEasy Classic":https://quarkus.io/guides/resteasy-client
What surprises me is that in some places in all this documentation it is mentioned how you can write a REST server that offers endpoints with multipart responses. It is also explained how you can send a multipart request with a REST client, but there is nothing about receiving a multipart-response.
So, I am wondering whether
quarks-openapi-generator
at all?And, which additional (glue) code/annotation(s) would be needed.
While searching for a solution, I found basically information like:
@RegisterProvider(MimeMultipartProvider.class)
@PartType
and/or@FormParam
annotationsAny hints are appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions