naz / swagger-express-validator

Lightweight requrest/response validation middleware based on swagger/OpenAPI schema
MIT License
56 stars 24 forks source link

Does not work with parameters in: formData #43

Open Romick2005 opened 5 years ago

Romick2005 commented 5 years ago

Is it suppose to work with application/x-www-form-urlencoded content ty& My swaager config:

/**
 * @swagger
 * /auth/getToken:
 *   x-swagger-router-controller: User
 *   post:
 *     operationId: getToken
 *     summary: User Authentication returning a JWT.
 *     description: Authenticate a user.
 *     tags:
 *       - Authorization
 *     consumes:
 *       - application/x-www-form-urlencoded
 *     parameters:
 *       - in: formData
 *         name: email
 *         description: A user's email.
 *         type: string
 *         required: true
 *         minLength: 4
 *       - in: formData
 *         name: password
 *         description: A user's password.
 *         type: string
 *         required: true
 *         minLength: 8
 *     produces:
 *       - application/json
 *     responses:
 *       200:
 *         description: Send authorization JWT
 *       403:
 *         description: Authorization failed
 */