2

I have a Vert.x OpenAPI server that previously used Vert.x v3.7.0. It had a request that was used to upload files to a specified project. The definition of this endpoint looks like this in the .yaml file:

      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                ggenPath:
                   type: string

Previously it worked just fine, I could specify the path and the file to upload using Postman like this.

I had to switch to Vert.x v4.1.0. I used the migration guide found here when refactoring the code. I didn't touch the yaml API description file. However, whenever I try to send the multipart/form-data request, I instantly get "400 Bad Request". I can't even debug it, as the request doesn't reach the handler. Like I said, no major modifications in the code, just the required refactoring.

I had a similar request, but it only had a file in the form, no other fields. I was able to fix this issue there like this:

requestBody:
        content:
          application/octet-stream:
             schema:
               type: string
               format: binary

But this is not possible with multiple fields in the form. Is there something that I'm doing wrong? What could be the problem? This works with Vert.x v3.7.0, so was there some change regarding this in v4.1.0?

csuvi98
  • 61
  • 3

0 Answers0