0 points

swagger-jsdoc/GETTING-STARTED.md at master · Surnet/swagger-jsdoc


dashboard

Tue Oct 20 2020 06:51:46 GMT+0000 (UTC)

Posted by @duc.pt172483@gmail.com

/**
 * @swagger
 *
 * /login:
 *   post:
 *     description: Login to the application
 *     produces:
 *       - application/json
 *     parameters:
 *       - name: username
 *         description: Username to use for login.
 *         in: formData
 *         required: true
 *         type: string
 *       - name: password
 *         description: User's password.
 *         in: formData
 *         required: true
 *         type: string
 *     responses:
 *       200:
 *         description: login
 */
app.post('/login', (req, res) => {
  // Your implementation comes here ...
});
content_copy Copy

https://github.com/Surnet/swagger-jsdoc/tree/master/docs