Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: API Documentation for Forgot and Reset Password Endpoint #275

Open
bammietop03 opened this issue Jul 24, 2024 · 0 comments
Open
Labels

Comments

@bammietop03
Copy link
Contributor

bammietop03 commented Jul 24, 2024

Description:

Add Swagger JSDoc comments to the forgotPassword and resetpassword endpoint in the auth controller to auto-generate API documentation.

Tasks:

Add JSDoc comments to the forgotPassword and resetpassword function to describe the endpoint.
Include details such as endpoint URL, HTTP method, summary, description, tags, request body schema, and response schema.
Ensure the documentation includes examples for request and response.

Example JSDoc Comment:

    /**
     * @swagger
     * /auth/forgot-password:
     *   post:
     *     summary: Request a password reset
     *     description: Allows a user to request a password reset link by providing their email address.
     *     tags: [Auth]
     *     requestBody:
     *       required: true
     *       content:
     *         application/json:
     *           schema:
     *             type: object
     *             required:
     *               - email
     *             properties:
     *               email:
     *                 type: string
     *                 description: The email address of the user.
     *                 example: user@example.com
     *     responses:
     *       200:
     *         description: Successfully requested password reset.
     *         content:
     *           application/json:
     *             schema:
     *               type: object
     *               properties:
     *                 status:
     *                   type: string
     *                   description: The status of the request.
     *                   example: success
     *                 status_code:
     *                   type: integer
     *                   description: The HTTP status code.
     *                   example: 200
     *                 message:
     *                   type: string
     *                   description: The message indicating the result of the request.
     *                   example: Password reset link sent to your email.
     *       400:
     *         description: Bad request.
     *       500:
     *         description: Internal server error.
     */

Acceptance Criteria:

  • The forgotPassword endpoint has detailed Swagger documentation.
  • The resetPassword endpoint has detailed Swagger documentation.
  • The documentation is correctly generated and accessible via Swagger UI.
@AdeGneus AdeGneus changed the title [FEAT]: API Documentation for forget and reset password Endpoint [FEAT]: API Documentation for Forgot and Reset Password Endpoint Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants