scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.4k stars 225 forks source link

Array of strings sent through formdata are converted to array with single string when recieved on nodejs server #361

Closed huzaifac137 closed 9 months ago

huzaifac137 commented 9 months ago

I am trying to send array of strings through multipart/formdata but it seems like the array as a whole is converted into array with single string value on the endpoint . I am sending another array of files in the same request and it is just working fine. GeneratedImages is causing the problem

Code:


     *      content:
     *        multipart/form-data:
     *             schema:
     *              type: object
     *              required:
     *               - heading
     *               - description
     *              properties:
     *                 heading:
     *                    type :  string
     *                    default : some heading 
     *                 description:
     *                    type: string
     *                    default: description of post     
     *                 images:
     *                     type: array
     *                     items:
     *                       type: string
     *                       default : image1
     *                       format: binary
     *                 generatedImages[]:
     *                     type: array
     *                     items:
     *                       type: string