Forum Discussion

deco20's avatar
Occasional Visitor
4 years ago

Convert multipart/form-data to JSON

Hope I post on right place 😄 


Hello everyone I have problem and I hope that someone from forum will be able to help me ...

I`m trying to create swagger documentation for my test node app so what I want to ask is 

How to convert this multipart/form-data to application/json


 *  post:
 *      tags:
 *           - Get Trained
 *      description:  Press <b>"Try it Out"</b> then fill out the JSON from and press <b>"Execute"</b>
 *      requestBody:
 *          required: true
 *          content:
 *              multipart/form-data:
 *                  schema:
 *                      type: object
 *                      properties:
 *                          name: 
 *                              type: string
 *                          email: 
 *                              type: string
 *                          message:
 *                              type: string
 *                          chosenTraining:
 *                              type: string
 *                              enum: [asd,scd]
 *      responses:
 *          200:
 *              description: Done
So what I want when I press POST this data to be converted to application/json
No RepliesBe the first to reply